Burns YT tokens from the designated address.
Strictly restricted to the Tokenizer contract.
from - The address burning the tokens.amount - The amount of tokens to burn.Returns Unauthorized, Paused, InvalidAmount, InsufficientBalance, or MathUnderflow.
fn burn(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireYtError>
Mints new YT tokens to the designated address.
Strictly restricted to the Tokenizer contract.
to - The address receiving the minted tokens.amount - The amount of tokens to mint.Returns Unauthorized, Paused, InvalidAmount, or MathOverflow.
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireYtError>
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
Pauses Tokenizer integrations (mint/burn/index updates), freezing core issuance.
fn pause(env: soroban_sdk::Env) -> Result<(), NovaireYtError>
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
Approves a spender to transfer up to amount of the caller's tokens.
fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
_expiration_ledger: u32,
) -> Result<(), NovaireYtError>
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
Unpauses Tokenizer integrations.
fn unpause(env: soroban_sdk::Env) -> Result<(), NovaireYtError>
fn version(env: soroban_sdk::Env) -> u32
fn decimals(env: soroban_sdk::Env) -> u32
fn metadata(env: soroban_sdk::Env) -> Result
Transfers tokens from the caller to a recipient. Checkpoints both sender and recipient before transferring balances.
Note: Transfers intentionally bypass the pause mechanism to preserve
secondary market liquidity as an escape valve during protocol emergencies.
from - The caller sending the tokens (requires auth).to - The recipient of the tokens.amount - The amount to transfer.Returns InvalidAmount, InsufficientBalance, MathOverflow, or MathUnderflow.
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireYtError>
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
fn is_paused(env: soroban_sdk::Env) -> bool
Initializes the Novaire Yield Token (YT).
admin - Protocol administrator responsible for pausing and upgrades.tokenizer - The exclusive authority allowed to mint, burn, and update yield indices.maturity_ledger - The exact ledger sequence when yield accrual permanently stops.Returns AlreadyInitialized if called more than once.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
tokenizer: soroban_sdk::Address,
maturity_ledger: u32,
sy_wrapper: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
fn is_expired(env: soroban_sdk::Env) -> Result
Accepts a pending admin transfer, finalizing the change of administration.
fn accept_admin(env: soroban_sdk::Env) -> Result<(), NovaireYtError>
fn total_supply(env: soroban_sdk::Env) -> i128
Updates the trusted Tokenizer contract address.
fn set_tokenizer(
env: soroban_sdk::Env,
new_tokenizer: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
Transfers tokens from one address to another using an allowance. Checkpoints both sender and recipient.
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireYtError>
Sets the SY Wrapper address for live yield index refresh. This is the upgrade-compatible entry point for H4: existing deployed YT Token contracts can call this without re-initialization.
fn set_sy_wrapper(
env: soroban_sdk::Env,
sy_wrapper: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
Initiates a two-step admin transfer to a new address.
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
Checkpoints a user, safely locking in their accrued yield before a balance mutation.
This function performs the core math: (current_index - user_index) * balance / 1e9
user - The address to checkpoint.Returns MathOverflow or MathUnderflow if calculation fails.
fn checkpoint_user(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
Simulates what a user is currently owed based on their balance and the live index. H4 fix: Uses the live SY exchange rate (if available) to provide an accurate real-time view of pending yield, even when the stored global index is stale.
fn claimable_yield(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
) -> Result
Resets the claimable yield for a user to zero after they successfully claim.
Strictly restricted to the Tokenizer contract.
user - The address whose claimable yield is reset.Returns Unauthorized.
fn reset_claimable(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
) -> Result<(), NovaireYtError>
Credits historical yield directly to a user's accrued yield balance.
Strictly restricted to the Tokenizer contract. Used during late minting to restore economic identity by crediting the historically backed yield that has accumulated since epoch genesis.
user - The address receiving the credit.amount - The amount of yield to credit.Returns Unauthorized or InvalidAmount if negative.
fn add_accrued_yield(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireYtError>
Updates the global yield index.
Strictly restricted to the Tokenizer contract.
new_index - The new global yield index.Returns Unauthorized, Paused, PastMaturity, or IndexCannotDecrease.
fn update_yield_index(
env: soroban_sdk::Env,
new_index: i128,
) -> Result<(), NovaireYtError>