Contract 742828e3ea0b6cbaafa0d53baee04c4032e817cd1acfded8c183730981145f08

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CA5QANRLBXJVE7ZDDAN5MCDGQ2N6ZRGZPCS4DCUFXCHDY2IEW2ITAB3W
  • CA7O6Q3X5TDHZVVILYDCECO4OW7UEEQTLD3FM6BG6KDVVC2QGYQYVADR
  • CBCPJTSHCS57WDNEPPOL3QR5UXSS7XNADCAPX3UMCWYQDSJSS42OD75H
  • CD2R4JELADMS222RV7CDKP2JNTZBAV5OZJOJE7IRMQTT3JFDZBKKJQPN
  • CDQ3UJFH7ILVZMAAQW7RMADTOYP7LJKSIWHINQZXUIDCZ4V676IL3NJL

Interface

Blend V2 callback. Called after Blend transfers amount of token (USDC) to this contract. We execute both swap legs, transfer enough USDC back to caller (the user) so Blend's subsequent Repay request has tokens to pull, and keep any profit sent alongside.

fn exec_op(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    _fee: i128,
)

Entry point. Off-chain executor builds a tx that invokes this once.

Args chosen so the off-chain executor sizes the trade against the current signal, and passes the Aquarius pool hash it already knows from scripts/stellar-executor/probe-aquarius-swap.ts.

amount is the USDC notional we flash-borrow from Blend. min_profit is the floor: if Sushi returns fewer USDC than amount + min_profit, the tx reverts and only fees are paid.

fn execute_arb(env: soroban_sdk::Env, user: soroban_sdk::Address, params: ArbParams)

Imports

WebAssembly Text (WAT) ▶