fn exec_op(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
token: soroban_sdk::Address,
amount: i128,
fee: i128,
)
fn prepare(
env: soroban_sdk::Env,
amount: i128,
repay_amount: i128,
min_profit: i128,
valid_until_ledger: u32,
route: soroban_sdk::Vec<
(
u32,
soroban_sdk::Address,
soroban_sdk::Vec,
soroban_sdk::BytesN<32>,
soroban_sdk::Address,
),
>,
)
Replace this contract's executable while preserving its address and instance storage. The new Wasm must already be uploaded to the ledger.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Execute a one-way owner-funded swap after a Classic phase credit.
balance_before binds this call to a fresh phase-0 receipt: existing
owner inventory is never accepted as the principal. This is still a
separate transaction from the Classic path payment, but when both are
included in one ledger the protocol applies the Classic credit before
this Soroban invocation.
fn execute_swap(
env: soroban_sdk::Env,
asset_in: soroban_sdk::Address,
asset_out: soroban_sdk::Address,
amount: i128,
min_amount_out: i128,
balance_before: i128,
valid_until_ledger: u32,
route: soroban_sdk::Vec<
(
u32,
soroban_sdk::Address,
soroban_sdk::Vec,
soroban_sdk::BytesN<32>,
soroban_sdk::Address,
),
>,
)
Prepare an owner-authorized flash loan from a selected Blend pool and reserve. The callback authenticates this exact pool and asset.
fn prepare_pool(
env: soroban_sdk::Env,
blend_pool: soroban_sdk::Address,
asset: soroban_sdk::Address,
amount: i128,
repay_amount: i128,
min_profit: i128,
valid_until_ledger: u32,
route: soroban_sdk::Vec<
(
u32,
soroban_sdk::Address,
soroban_sdk::Vec,
soroban_sdk::BytesN<32>,
soroban_sdk::Address,
),
>,
)
fn __constructor(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
blend_pool: soroban_sdk::Address,
router: soroban_sdk::Address,
asset: soroban_sdk::Address,
)
Execute an owner-funded arbitrage atomically. The owner's token balance supplies the principal, so this path avoids both Executor and Blend.
fn execute_funded(
env: soroban_sdk::Env,
asset: soroban_sdk::Address,
amount: i128,
min_profit: i128,
valid_until_ledger: u32,
route: soroban_sdk::Vec<
(
u32,
soroban_sdk::Address,
soroban_sdk::Vec,
soroban_sdk::BytesN<32>,
soroban_sdk::Address,
),
>,
)