Contract 0998bbba43a9c9e492a6f4895a4a984c102cf1d9735199c7ad57694961385948

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.91.1

Instances

  • CARN6EFA3BL3CRE5FVFTHNQTDXS5EASP64YV24H6Z5FHZ6SZ65GRHUZH

Interface

Withdraw tokens from the contract (admin only)

fn withdraw(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    to: soroban_sdk::Address,
)

Get the admin address

fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Execute a cyclic arbitrage atomically

The entire transaction reverts if the final balance is less than initial balance + min_profit. This ensures atomic safety.

Arguments

  • initiator - The caller who initiated the arbitrage
  • base_asset - The asset we start and end with (e.g., USDC)
  • legs - Vector of swap instructions
  • min_profit - Minimum profit required (reverts if not met)

Returns

  • ArbResult - Profit, fees, and legs executed
fn execute_cycle(
    env: soroban_sdk::Env,
    initiator: soroban_sdk::Address,
    base_asset: soroban_sdk::Address,
    legs: soroban_sdk::Vec,
    min_profit: i128,
) -> Result

Constructor (CAP-0058) replaces initialize Atomically sets the admin during deployment

fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Receive a flash loan callback Implements the FlashLoanReceiver trait for xycLoans/Blend integration

fn receive_flash_loan(
    env: soroban_sdk::Env,
    initiator: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    fee: i128,
    data: soroban_sdk::Bytes,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶