Claims a claimer's pro-rata share of the "35% staker" bucket for each finalized epoch listed, based on how much USDC they had deposited in the Stability Pool at the time each epoch closed (approximated by their current compounded deposit — deposits are generally stable/long-lived, so this is an acceptable trade-off vs. storing a full historical snapshot per depositor per epoch).
fn claim(
env: soroban_sdk::Env,
claimer: soroban_sdk::Address,
epochs: soroban_sdk::Vec,
) -> i128
Replace this contract's Wasm in place. Instance and persistent storage are preserved. Authorised by the stored DAO address.
fn upgrade(
env: soroban_sdk::Env,
dao: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
)
fn get_epoch(env: soroban_sdk::Env, epoch_id: u64) -> Option
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
treasury: soroban_sdk::Address,
dev_fund: soroban_sdk::Address,
stab_pool: soroban_sdk::Address,
dao: soroban_sdk::Address,
partner_reg: soroban_sdk::Address,
)
fn has_claimed(
env: soroban_sdk::Env,
claimer: soroban_sdk::Address,
epoch_id: u64,
) -> bool
fn register_lp(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
lp: soroban_sdk::Address,
)
fn finalize_epoch(env: soroban_sdk::Env) -> u64
Receive protocol revenue, optionally tagged with a partner ID.
sender — the contract sending fees (engine, LP, etc.)token — the fee token address (usually USDC)amount — total fee amount in 7dp unitssource — fee type: "stabfee" | "swapfee" | "liqfee"partner_id — optional partner referral tag; pass 0 for none.
When > 0, the partner's registered share is
deducted before the protocol split.fn receive_revenue(
env: soroban_sdk::Env,
sender: soroban_sdk::Address,
token: soroban_sdk::Address,
amount: i128,
source: soroban_sdk::Symbol,
partner_id: u32,
)
fn get_epoch_tokens(
env: soroban_sdk::Env,
epoch_id: u64,
) -> soroban_sdk::Vec
fn get_current_epoch(env: soroban_sdk::Env) -> u64
fn get_epoch_revenue(
env: soroban_sdk::Env,
epoch_id: u64,
token: soroban_sdk::Address,
) -> i128
fn get_partner_epoch_revenue(
env: soroban_sdk::Env,
epoch_id: u64,
partner_id: u32,
) -> i128