Get admin address.
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
Transfer all accumulated token balance to the Revenue Processor.
Callable by admin or authorized bot.
fn sweep(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
token: soroban_sdk::Address,
) -> i128
Get bot address.
fn get_bot(env: soroban_sdk::Env) -> Option
Set authorized bot (admin-only). Bot can call sweep only.
fn set_bot(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
bot: soroban_sdk::Address,
)
Update operating fee (admin-only). Capped by max_fee_bps.
fn set_fee(env: soroban_sdk::Env, admin: soroban_sdk::Address, new_fee_bps: u32)
Upgrade contract WASM (admin-only). Admin stored as standalone Address — immune to struct evolution.
fn upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
)
Sweep all accumulated token balance to an arbitrary destination.
Used by the revenue relay to redirect fees directly to the Revenue Vault
(or any other destination), bypassing the Revenue Processor.
v1.3.0 — Callable by admin or authorized bot.
fn sweep_to(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
token: soroban_sdk::Address,
dest: soroban_sdk::Address,
) -> i128
Get paused status.
fn is_paused(env: soroban_sdk::Env) -> bool
Transfer admin role (requires both old + new admin auth).
fn set_admin(
env: soroban_sdk::Env,
current_admin: soroban_sdk::Address,
new_admin: soroban_sdk::Address,
)
Extend instance TTL (callable by anyone — permissionless).
fn extend_ttl(env: soroban_sdk::Env)
Get current configuration.
fn get_config(env: soroban_sdk::Env) -> FeeCollectorConfig
Emergency pause (admin-only).
fn set_paused(env: soroban_sdk::Env, admin: soroban_sdk::Address, paused: bool)
Execute a swap through the Aquarius Router, skimming a fee from output.
Flow:
in_amount of token_in to this contractSingle TX, single signature — user signs for this contract.
token_out must be passed explicitly for auth pre-computation.
fn swap_chained(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
swaps_chain: soroban_sdk::Val,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
in_amount: u128,
out_min: u128,
) -> u128
Protocol 22+ constructor — flat args for Admin Bridge compatibility.
max_fee_bps: Immutable hard cap (recommended: 200 = 2%)fee_bps: Operating fee (recommended: 100 = 1%)fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
aquarius_router: soroban_sdk::Address,
revenue_processor: soroban_sdk::Address,
max_fee_bps: u32,
fee_bps: u32,
)
Public, permissionless sweep hook to push accumulated fees to the Revenue Vault. Can be called by anyone (e.g. automatically on Vault deposit). Prevents front-running dilution by sweeping fees before shares are issued.
fn sweep_to_vault(env: soroban_sdk::Env, token: soroban_sdk::Address) -> i128
Get revenue vault.
fn get_revenue_vault(env: soroban_sdk::Env) -> Option
Set authorized Revenue Vault (admin-only). Target for public sweep hook.
fn set_revenue_vault(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
vault: soroban_sdk::Address,
)