Contract 056e9e0c9b3698478b6227506ab1d0c19b4d6a7a133359ad3a5327c8d20763a8

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CCTNMZE33GPDTKNNG2RVHGPMY3LNEQRSWKKCHVRUHJH52YJJ72JJPZZE

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