fn __constructor(env: soroban_sdk::Env, args: YtInitArgs)
One-shot minter bootstrap. See pt_token::PtToken::initialize_minter.
fn initialize_minter(env: soroban_sdk::Env, minter: soroban_sdk::Address)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn decimals(env: soroban_sdk::Env) -> u32
fn maturity(env: soroban_sdk::Env) -> u64
fn minter(env: soroban_sdk::Env) -> soroban_sdk::Address
fn total_supply(env: soroban_sdk::Env) -> i128
Current global yield index (WAD-scaled). Source of truth for
every settle. Updated only by push_yield_index.
fn global_yield_index(env: soroban_sdk::Env) -> i128
Per-user snapshot of the global index as of user's last
settle. Returns 0 if user has never had a balance change.
fn user_yield_index(env: soroban_sdk::Env, user: soroban_sdk::Address) -> i128
What user would receive if drain_accrued(user) ran right
now, without mutating state. Combines the persisted
AccruedYield bucket with the not-yet-settled delta.
fn accrued_yield(env: soroban_sdk::Env, user: soroban_sdk::Address) -> i128
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
expiration_ledger: u32,
)
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
Mint with a fresh index snapshot.
to's settle runs before the balance increments (when bal == 0,
settle is a no-op for accrual but always writes the snapshot —
the C-02 line). The caller (YS) is expected to have already
pushed the current global index in via push_yield_index.
fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
Burn from a holder. from's settle runs first, so any pending
yield is credited to their accrued pot before their balance
shrinks — burning a position never costs yield that has
already accrued against it.
fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)
Push a new global yield index (WAD-scaled) into YT.
Minter-only. Enforces strict monotonicity: new_index must
be >= GlobalYieldIndex. A regression is rejected with
Error::OracleRejected because that is the kind of bug the
rate oracle would surface upstream; downstream consumers
already treat that variant as "abort the action".
Delta-cap and oracle-staleness checks live in YS (which owns the rate source); YT trusts its minter to have validated.
fn push_yield_index(env: soroban_sdk::Env, new_index: i128)
Settle user's pending yield into the AccruedYield bucket,
then zero the bucket and return the total.
Minter-only. Called by YS during claim_yield after it has
pushed the latest global index, so the drain accounts for every
wei user is owed up to the call site.
fn drain_accrued(env: soroban_sdk::Env, user: soroban_sdk::Address) -> i128