Get contract statistics
fn get_stats(env: soroban_sdk::Env) -> (i128, i128)
Initialize the contract with admin and min profit
fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address, min_profit: i128)
Update minimum profit threshold (admin only)
fn set_min_profit(env: soroban_sdk::Env, caller: soroban_sdk::Address, new_min: i128)
Execute an atomic multi-hop swap
caller - The account executing the swap (must approve token transfers)legs - Vector of swap legs to executemin_final_amount - Minimum final amount to receive (enforces profit)SwapResult with execution details
fn execute_atomic_swap(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
legs: soroban_sdk::Vec,
min_final_amount: i128,
) -> SwapResult