Contract 00a1e9097339cbd1ee194a7a7f938d8d72918a7c95f89520c23c5ea2d4b8162e

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdk_spec_shaking 2
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.96.0

Instances

  • CANCOWOI6R2FZBDLZKUL6BUZJN3VONPZSUUSWFL3KF3MPG5INAF25EKY
  • CAQZ7XPUSOSBI66A4RPSNPEBI2EADBMBVUBSW6R2DYWC64QHDM3HKGIN
  • CB3WLG4QITFRELACDR74N63VEPICMQ35QW3DSAMF4KCFOITKOJSHH6RW

Interface

fn name(env: soroban_sdk::Env) -> soroban_sdk::String

Deploys any idle underlying. Permissionless — it only ever moves the vault's own cash into the position it is configured for.

fn deploy(env: soroban_sdk::Env) -> u128

Redeem shares for underlying. Thin wrapper so users are not forced to construct the DeFindex-shaped vectors.

fn redeem(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    shares: i128,
    min_underlying_out: i128,
) -> i128
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String

Share balance. Read by receipt-vault through a SEP-41 TokenClient.

Renews the holder's TTL on the way past. Shares(owner) is persistent state that is otherwise only bumped on write, so a market that holds a position without depositing or withdrawing for the entry lifetime would see its balance archived to zero while total_shares still counted it — and could then never redeem. receipt-vault reads this on every boosted-value refresh, so renewing here keeps live claims alive.

fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128

Accepts underlying and mints shares.

Deliberately does not call from.require_auth(): receipt-vault pre-authorizes only the inner token transfer (contract.rs:311-327), and that transfer's own auth requirement is what makes this safe — a caller cannot pull funds from an address that has not signed.

fn deposit(
    env: soroban_sdk::Env,
    amounts_desired: soroban_sdk::Vec,
    amounts_min: soroban_sdk::Vec,
    from: soroban_sdk::Address,
    invest: bool,
) -> i128

Permissionless: claim the configured primary reward, third-party gauge incentives and accrued swap fees, convert everything to underlying, and redeploy.

Rate-limited because each call moves the share price; without a cooldown it could be used to grind rounding in the depositor's favour.

fn harvest(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn get_idle(env: soroban_sdk::Env) -> i128
fn get_pool(env: soroban_sdk::Env) -> soroban_sdk::Address

Strategy shares are deliberately non-transferable. Users hold the bound ReceiptVault's pTokens instead; keeping this selector as a fail-closed stub preserves ABI compatibility without allowing dust holders to create unbounded persistent share entries.

fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

Burns shares and returns underlying.

Unlike deposit, this does require auth from from, because receipt-vault authorizes this exact invocation before calling it (contract.rs:420-437). Requiring it closes the forced-redemption griefing vector that the bare DeFindex shape leaves open.

fn withdraw(
    env: soroban_sdk::Env,
    withdraw_shares: i128,
    min_amounts_out: soroban_sdk::Vec,
    from: soroban_sdk::Address,
) -> soroban_sdk::Vec
fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_ticks(env: soroban_sdk::Env) -> (i32, i32)
fn is_paused(env: soroban_sdk::Env) -> bool

Permissionlessly recenters the vault's one active position.

The old position is withdrawn in full. A single guarded swap converts only the excess side into the exact token ratio quoted for the new spacing-aligned range, avoiding a wasteful sell-and-buy round trip. The call reverts atomically unless a new position is minted and at least 95% of the pre-deposit pair value is put back to work.

fn rebalance(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> bool
fn set_admin(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    new_admin: soroban_sdk::Address,
)
fn get_config(env: soroban_sdk::Env) -> Config
fn get_params(env: soroban_sdk::Env) -> Params
fn get_tokens(env: soroban_sdk::Env) -> soroban_sdk::Vec

Wires the vault to a concentrated Aquarius pool.

Pool metadata (tokens, decimals, tick spacing) is read from the pool itself rather than passed in, so a typo cannot silently point the vault at the wrong asset.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    pool: soroban_sdk::Address,
    underlying_index: u32,
    oracle: soroban_sdk::Address,
)
fn set_oracle(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    oracle: soroban_sdk::Address,
)

Pauses new deposits. Withdrawals are deliberately never pausable: the market above must always be able to pull its cash back.

fn set_paused(env: soroban_sdk::Env, admin_addr: soroban_sdk::Address, paused: bool)
fn accept_admin(env: soroban_sdk::Env)

Sells any configured reward held by the vault. Kept separate from harvest so a route can be exercised even when claiming is paused.

fn sweep_reward(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    reward_token: soroban_sdk::Address,
) -> i128

Total share supply.

fn total_supply(env: soroban_sdk::Env) -> i128
fn upgrade_wasm(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
)
fn get_max_deploy(env: soroban_sdk::Env) -> u128
fn get_underlying(env: soroban_sdk::Env) -> soroban_sdk::Address

Caps how much underlying may sit in the pool.

The realised APR of an LP position is the headline rate scaled by pool_tvl / (pool_tvl + deployed). On a thin pool an uncapped vault dilutes itself to near-zero yield, so this is a yield control, not just a risk control. 0 disables the cap.

fn set_max_deploy(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    max_deploy: u128,
)

Reconciles locally tracked liquidity against the pool's own view.

Permissionless: it can only ever replace the local number with the pool's authoritative one, so there is nothing to gain from calling it.

fn sync_liquidity(env: soroban_sdk::Env) -> u128

Permissionless TTL renewal for a share holder, for keepers that do not want to pay for a full balance read path.

fn bump_shares_ttl(env: soroban_sdk::Env, owner: soroban_sdk::Address)

Cheap simulation/read used by keepers to avoid submitting no-op rebalance transactions every polling cycle.

fn needs_rebalance(env: soroban_sdk::Env) -> bool
fn get_last_harvest(env: soroban_sdk::Env) -> u64
fn get_range_policy(env: soroban_sdk::Env) -> RangeParams
fn get_reward_route(
    env: soroban_sdk::Env,
    reward_token: soroban_sdk::Address,
) -> Option
fn get_slippage_bps(env: soroban_sdk::Env) -> u32

Forces a fresh oracle read of the NAV price ratio.

Permissionless, and the mirror of receipt-vault's refresh_boosted_underlying: keepers call it so user transactions get a current value without paying the oracle's footprint cost themselves.

fn refresh_nav_root(env: soroban_sdk::Env) -> u128

Installs the actively managed concentrated-range policy.

Changing policy does not move funds. The permissionless keeper path performs the migration only after its independent price guard passes. This separation keeps governance changes reviewable and lets existing Mainnet full-range deployments fail closed immediately after upgrade.

fn set_range_policy(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    half_width_ticks: u32,
    rebalance_margin_ticks: u32,
    rebalance_cooldown: u64,
    max_rebalance_divergence_bps: u32,
    enabled: bool,
)

Registers the Aquarius pool used to sell a reward token for underlying.

fn set_reward_route(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    reward_token: soroban_sdk::Address,
    route: Option,
)
fn set_slippage_bps(env: soroban_sdk::Env, admin_addr: soroban_sdk::Address, bps: u32)
fn get_receipt_vault(env: soroban_sdk::Env) -> Option

Overrides the Reflector asset encoding for a token, for feeds published under a symbol rather than a contract address.

fn set_oracle_symbol(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    token: soroban_sdk::Address,
    symbol: Option,
)

Permanently binds the sole ReceiptVault allowed to deposit.

The candidate must already point back at this Aquarius vault and must settle in the same underlying token. This closes both the supply-cap bypass and an admin typo that would otherwise strand the deployment.

fn set_receipt_vault(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    receipt_vault: soroban_sdk::Address,
)

Single-sided deposit wrapper for the bound ReceiptVault. The vault handles the split; direct user calls are rejected by deposit.

fn deposit_underlying(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    amount: i128,
    min_shares: i128,
) -> i128
fn get_reward_min_rate(
    env: soroban_sdk::Env,
    reward_token: soroban_sdk::Address,
) -> u128

Sets the minimum raw underlying returned per raw reward unit, scaled by REWARD_RATE_SCALE (1e7). A zero value removes the guard and therefore disables selling that reward until governance installs a new floor.

The guard is intentionally independent of the route: changing a pool must not silently weaken the fair-value floor. Keepers should alert and leave rewards idle when a legitimate market move crosses the floor; governance can then review and update it.

fn set_reward_min_rate(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    reward_token: soroban_sdk::Address,
    min_rate_scaled: u128,
)

Timestamp of the last successful oracle read. 0 means the cache has been invalidated and the next valuation must re-read the feed.

fn get_last_nav_root_at(env: soroban_sdk::Env) -> u64

Idle paired-token balance, valued in the underlying at the oracle rate.

fn get_other_idle_value(env: soroban_sdk::Env) -> i128
fn get_position_amounts(env: soroban_sdk::Env) -> Option
fn get_total_underlying(env: soroban_sdk::Env) -> i128
fn propose_upgrade_wasm(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
)
fn set_harvest_cooldown(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    seconds: u64,
)
fn set_nav_root_max_age(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    seconds: u64,
)
fn get_last_rebalance_at(env: soroban_sdk::Env) -> u64
fn get_position_liquidity(env: soroban_sdk::Env) -> u128
fn set_nav_root_max_stale(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    seconds: u64,
)

Permissionless TTL renewal for the configured mappings.

Both are persistent keys that user traffic may not touch often enough to keep alive on its own, and an archived symbol override stops the vault pricing at all — which blocks supplier exits, not just deposits.

fn bump_config_mapping_ttl(env: soroban_sdk::Env, token: soroban_sdk::Address)
fn set_oracle_max_age_mult(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    k: u64,
)
fn get_primary_reward_token(env: soroban_sdk::Env) -> Option

Permissionless position-composition refresh for keepers and recovery. Returns false without replacing the last good snapshot if Aquarius is temporarily unavailable or returns a malformed amount vector.

fn refresh_position_amounts(env: soroban_sdk::Env) -> bool

Changes the token transferred by Aquarius' primary claim() path. Reward conversion routes remain independently configurable per token.

fn set_primary_reward_token(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    reward_token: Option,
)
fn set_max_pool_divergence_bps(
    env: soroban_sdk::Env,
    admin_addr: soroban_sdk::Address,
    bps: u32,
)

Underlying redeemable for vault_shares, as a single-element vector.

receipt-vault reads index 0 as the underlying amount and sizes its min_amounts_out vector by this vector's length, so the single-asset shape here is load-bearing.

fn get_asset_amounts_per_shares(
    env: soroban_sdk::Env,
    vault_shares: i128,
) -> soroban_sdk::Vec

Imports

WebAssembly Text (WAT) ▶