Contract 8add2e6274f7954ba41844add612e166edf8a616e7808138f94124d522384da5

← Back to Index 📥 Download WASM

Meta

rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CDVVEWKCMRZALVWRA6M54S4TSCBROIVAINBAMRVY47J2QFI6CDKKG55A

Interface

Execute a multi-hop atomic arb.

Flow:

  1. caller authorises this invocation (must include token transfer auth).
  2. Contract pulls amount_in of token_in from caller.
  3. Each hop executes a cross-contract DEX swap.
  4. Final balance is verified against min_final_out; panics if below.
  5. Final tokens are returned to caller.

For cyclic arbs, token_in equals the last hop's output token. Returns the final output amount.

fn execute(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token_in: soroban_sdk::Address,
    amount_in: i128,
    min_final_out: i128,
    hops: soroban_sdk::Vec,
) -> i128

Imports

WebAssembly Text (WAT) ▶