Contract 565bf705b56cf0e6790b7734c26ced74631ce24c19e4e2f416644ebf45e744cd

← Back to Index 📥 Download WASM

Meta

rssdkver 23.4.0#673d6c4f2368d282d25da29bda55c21b8be69ca6
rsver 1.91.0

Instances

  • CAHQ26NPSD6WX2LBVZV662EWL3JJAZVLVLSNEHKEQDBPCPD77L56EITF
  • CAZMC7BOIB7NWOHLAGT3LK4YJSRMJEYR3KMDDZC2WYMIQODF6HGV6QGY
  • CB3G2QOI2EVCEVUZWOMSMQGKGF76A2UKV46GLHUPM3QVUSRA4JROUI2D
  • CDEVWXEIX4DSZEDRJ7T6RIIT6RO33EKWXSZXX53GMTR625GA7KZXX5QH

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) ▶