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