Contract e3fea075e435d04d8783eaca1adf93acf0c2ca50427fd3ce3a288b949a7726bb

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 25.3.0#dcbea44513feb7734af6b6c4aced2c4a7a2715d0
rsver 1.94.0

Instances

  • CBZDVCNBYFUHP4DUDAEYU7BRTRK2UF4VT7L5WAUFWNNERHTFU7AIFLKQ
  • CDZB75MYBG6KII7VRULZAHZDTJEFSCX7NUZDQKLOWHNVAK64MEHBRPQW

Interface

fn pool(env: soroban_sdk::Env) -> soroban_sdk::Address
fn asset(env: soroban_sdk::Env) -> soroban_sdk::Address
fn pause(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result<(), StrategyError>

Fair price (num, den) of one OTHER raw unit in USDC raw units used by balance_of. Defaults to (1, 1).

fn price(env: soroban_sdk::Env) -> (i128, i128)
fn vault(env: soroban_sdk::Env) -> soroban_sdk::Address
fn router(env: soroban_sdk::Env) -> soroban_sdk::Address

Single-sided zap-in: USDC -> pool shares. See deposit::execute.

fn deposit(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    amount: i128,
) -> Result<(), StrategyError>

Claim AQUA emissions for our pool position. Tokens land in the strategy contract; the rewards module sweeps them later via sweep_rewards. Callable by vault, admin, or the configured rewards_module (when bound).

fn harvest(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result
fn unpause(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result<(), StrategyError>

Withdraw amount USDC by burning the proportional fraction of shares.

fn withdraw(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    amount: i128,
) -> Result
fn is_paused(env: soroban_sdk::Env) -> bool
fn set_price(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    num: i128,
    den: i128,
) -> Result<(), StrategyError>
fn set_vault(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    new_vault: soroban_sdk::Address,
) -> Result<(), StrategyError>

Live USDC value of the strategy's holdings (realistic, swap-back priced).

fn balance_of(env: soroban_sdk::Env) -> i128
fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    vault: soroban_sdk::Address,
    asset: soroban_sdk::Address,
    other_asset: soroban_sdk::Address,
    router: soroban_sdk::Address,
    pool: soroban_sdk::Address,
    pool_index: soroban_sdk::BytesN<32>,
    usdc_index: u32,
) -> Result<(), StrategyError>
fn is_healthy(env: soroban_sdk::Env) -> bool
fn pool_index(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
fn usdc_index(env: soroban_sdk::Env) -> u32
fn other_asset(env: soroban_sdk::Env) -> soroban_sdk::Address
fn accept_admin(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result<(), StrategyError>

Pool's swap fee in bps, captured at initialize() from pool.get_fee_fraction().

fn pool_fee_bps(env: soroban_sdk::Env) -> u32
fn propose_admin(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    new_admin: soroban_sdk::Address,
) -> Result<(), StrategyError>

Sweep the strategy's full balance of token to to. Used by the rewards module to extract claimed AQUA emissions before swapping them to USDC and redepositing into the vault.

Refuses to sweep asset (USDC principal) and the paired pool token (other_asset) — those are LP-side state, not rewards.

fn sweep_rewards(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token: soroban_sdk::Address,
    to: soroban_sdk::Address,
) -> Result
fn cancel_upgrade(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result<(), StrategyError>
fn rewards_module(env: soroban_sdk::Env) -> Option
fn execute_upgrade(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result<(), StrategyError>
fn tracked_balance(env: soroban_sdk::Env) -> i128
fn max_slippage_bps(env: soroban_sdk::Env) -> u32
fn schedule_upgrade(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), StrategyError>
fn set_max_slippage(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    bps: u32,
) -> Result<(), StrategyError>
fn set_upgrade_delay(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    delay: u64,
) -> Result<(), StrategyError>

Pull all funds back to the vault. Burns ALL shares with 0 slippage gates — escape hatch, accept any loss to prevent stuck funds.

fn emergency_withdraw(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
) -> Result
fn set_rewards_module(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    new_module: Option,
) -> Result<(), StrategyError>
fn available_liquidity(env: soroban_sdk::Env) -> i128

Imports

WebAssembly Text (WAT) ▶