On the patched WASM, balance(from) returns the user's strategy-share
count directly (NOT asset-equivalent USD value). Backend's
PositionSyncService is updated to handle AQUARIUS pools by deriving
asset value externally from pool reserves + total LP shares + the
strategy's LP holdings — keeps the on-chain function tiny.
fn balance(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128
fn initialize(
env: soroban_sdk::Env,
registry: soroban_sdk::Address,
asset: soroban_sdk::Address,
paired_asset: soroban_sdk::Address,
router: soroban_sdk::Address,
pool: soroban_sdk::Address,
pool_index: soroban_sdk::BytesN<32>,
)
fn share_balance(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128
Phase 1 of the split deposit. See lifecycle docs above.
fn deposit_phase1(
env: soroban_sdk::Env,
amount: i128,
from: soroban_sdk::Address,
) -> u128
Phase 2 of the split deposit. See lifecycle docs above.
fn deposit_phase2(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128
Phase 1 of the split withdraw. See lifecycle docs above.
fn withdraw_phase1(
env: soroban_sdk::Env,
amount: i128,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
) -> (i128, i128)
Phase 2 of the split withdraw. See lifecycle docs above.
fn withdraw_phase2(env: soroban_sdk::Env, from: soroban_sdk::Address) -> i128