Contract b8f807de22e3720bdd2c33988f9bcd73215eb4b871a334eb5fa039c9e301cfe1

← Back to Index 📥 Download WASM

Meta

rssdkver 23.4.0#673d6c4f2368d282d25da29bda55c21b8be69ca6
rsver 1.91.0

Instances

  • CBUGYTO375Z3OGOV7FFOE2KBSSSQ2RJN3PPXEJPJ657SAFFX3EOKQB4S

Interface

Repay the flash loan

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

Borrow tokens for arbitrage execution Simulates the flash loan process

fn borrow(
    env: soroban_sdk::Env,
    params: FlashLoanParams,
) -> Result<(), soroban_sdk::Error>
fn version(env: soroban_sdk::Env) -> u32

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