Contract d474103e3f153f19053515b93acee13d6353c80f53a74086f4abd77f9d2e7be1

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.96.0

Instances

  • CDI67DYNXPYM3CBSVBZV3LK7NS7WAEJA26GAZZI6XSJTU3BCXQ2CCMKQ

Interface

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.

Arguments

  • sender — the contract sending fees (engine, LP, etc.)
  • token — the fee token address (usually USDC)
  • amount — total fee amount in 7dp units
  • source — 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

Imports

WebAssembly Text (WAT) ▶