Contract 877a670a9cc15d112d0429350d00416ba9cb8bbcc6fda8092cd4bb04874f000b

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CCMFMSLLJZF4SITT2K7J5IBGY2L3WUAFBWJZHCLQVAWIERRJLJN2JCAE

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) ▶