Contract ff87fcf1ebd5d0926cf67981d16278b54adb1868ce725d5eb1856d26b6479bd5

← Back to Index 📥 Download WASM

Meta

rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.94.1

Instances

  • CB7H5YLRXKY42NL4A3754QVWLPG2Q5P5NI4EIUD3FODEDQ7HDCC4YWDG
  • CC2XR3LFBAOZ6ZCA54O5FMGD2VXVAKGOXEVQPL65WXUAB3OCKQ4KNRKJ

Interface

Atomic arb cycle. Caller specifies the route; contract just orchestrates.

User's tx signature authorizes:

  • This cycle_swap call
  • All nested venue swap calls (the Soroban auth tree off-chain SDK auto-builds via simulateTransaction)
  • All token transfers the venues do internally (also via auth tree)

Returns the principal_token balance delta (must be >= min_amount_out or the transaction reverts).

fn cycle_swap(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    principal_token: soroban_sdk::Address,
    amount_in: i128,
    min_amount_out: i128,
    hops: soroban_sdk::Vec,
) -> i128

Imports

WebAssembly Text (WAT) ▶