Contract cfcf647c7679f36405e38159095d96bbcf07e7a588d775098bc86c744a354c7b

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 27.0.0#e5cb4b52c3da8e56fc48adfd7b85d85976c1a059
rsver 1.93.0

Instances

  • CC5534SBK2XHRM57IKSF64CRU2V5XMMMY6MMUCP2AC5MVFJ2ILDKCC2A

Interface

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

Imports

WebAssembly Text (WAT) ▶