Pause deposits and distributions. Withdraw + claim are NEVER pausable.
fn pause(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Deposit AQUA into the vault. Sets a 1-year lock. Each deposit resets lock_until to now + lock_duration.
fn deposit(env: soroban_sdk::Env, user: soroban_sdk::Address, amount: i128)
Resume deposits and distributions.
fn unpause(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Upgrade contract WASM
fn upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
)
Withdraw AQUA principal + claim all pending rewards. Hard panic if lock has not expired. No early exits.
fn withdraw(env: soroban_sdk::Env, user: soroban_sdk::Address)
Get whether the vault is paused.
fn is_paused(env: soroban_sdk::Env) -> bool
Transfer admin
fn set_admin(
env: soroban_sdk::Env,
current_admin: soroban_sdk::Address,
new_admin: soroban_sdk::Address,
)
Extend contract instance TTL.
fn extend_ttl(env: soroban_sdk::Env)
Get a user's deposit info.
fn get_deposit(env: soroban_sdk::Env, user: soroban_sdk::Address) -> UserInfo
Protocol 22+ constructor — flat args for Admin Bridge compatibility.
reward_0..3 are the 4 reward token addresses [KPOP, ESP, KOL, PSY].
fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
aqua_token: soroban_sdk::Address,
reward_0: soroban_sdk::Address,
reward_1: soroban_sdk::Address,
reward_2: soroban_sdk::Address,
reward_3: soroban_sdk::Address,
lock_duration_secs: u64,
)
Claim accumulated reward tokens without withdrawing AQUA. Available anytime — only the AQUA principal is locked.
fn claim_rewards(env: soroban_sdk::Env, user: soroban_sdk::Address)
Public: extend a user's storage TTL. Anyone can call.
fn extend_user_ttl(env: soroban_sdk::Env, user: soroban_sdk::Address)
Get vault config.
fn get_vault_config(env: soroban_sdk::Env) -> VaultConfig
Deposit reward tokens into the vault and update rewardPerToken.
caller must hold and authorize the transfer of amount of token.
token must be in the whitelist (KPOP/ESP/KOL/PSY).
fn distribute_revenue(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
reward_token: soroban_sdk::Address,
amount: i128,
)
Get pending (unclaimed) rewards for a user across all reward tokens.
fn get_pending_rewards(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
) -> soroban_sdk::Vec<(soroban_sdk::Address, i128)>
Get total AQUA deposited in the vault.
fn get_total_deposited(env: soroban_sdk::Env) -> i128