Contract eedbd0cd0f48eac3a7598b663b86dc5f1e9e019f1dda06a3a9f7bd4bedb42130

← Back to Index 📥 Download WASM

Meta

rssdkver 23.4.0#673d6c4f2368d282d25da29bda55c21b8be69ca6
rsver 1.91.0

Instances

  • CDJTBW6DTX5C25JXBUFUHNKYNBDP2PLEYZSHMBPAK4IEBGVF3ULMH4SK

Interface

Repay the flash loan

fn repay(env: soroban_sdk::Env, amount: i128)

Borrow tokens for arbitrage execution

fn borrow(env: soroban_sdk::Env, params: FlashLoanParams) -> i128

Get current configuration

fn get_config(env: soroban_sdk::Env) -> ArbitrageConfig

Initialize the arbitrage contract with configuration

fn initialize(
    env: soroban_sdk::Env,
    sdex_address: soroban_sdk::Address,
    amm_address: soroban_sdk::Address,
    token_a: soroban_sdk::Address,
    token_b: soroban_sdk::Address,
    fee_rate_bps: i128,
    min_profit_threshold: i128,
)

Calculate potential profit for a given amount

fn calculate_profit(
    env: soroban_sdk::Env,
    borrow_amount: i128,
    token_address: soroban_sdk::Address,
) -> i128

Imports

WebAssembly Text (WAT) ▶