Pauses the Vault, freezing all deposits, withdrawals, and share transfers.
env - The environment.Returns StorageMissing if not initialized, traps if caller is not admin.
fn pause(env: soroban_sdk::Env) -> Result<(), NovaireVaultError>
Deposits underlying tokens into the Vault and mints Vault shares to the depositor.
Internally transfers the underlying tokens to the Vault, and then deposits them directly into the downstream SY Wrapper.
depositor - The address initiating the deposit (requires auth).amount - The amount of underlying tokens to deposit.The exact amount of Vault shares (1:1 with SY shares) minted to the depositor.
Returns Paused, InvalidAmount, StorageMissing, or MathOverflow.
fn deposit(
env: soroban_sdk::Env,
depositor: soroban_sdk::Address,
amount: i128,
) -> Result
Unpauses the Vault, restoring normal operations.
fn unpause(env: soroban_sdk::Env) -> Result<(), NovaireVaultError>
Returns the current protocol version.
fn version(env: soroban_sdk::Env) -> u32
Returns a comprehensive struct containing the Vault's current configuration and health metadata.
fn metadata(env: soroban_sdk::Env) -> Result
Withdraws underlying tokens by burning Vault shares.
Internally withdraws from the downstream SY Wrapper and transfers the underlying tokens back to the withdrawer.
withdrawer - The address initiating the withdrawal (requires auth).shares - The amount of Vault shares to burn.The exact amount of underlying tokens returned to the withdrawer.
Returns Paused, InvalidAmount, InsufficientShares, StorageMissing, or MathUnderflow.
fn withdraw(
env: soroban_sdk::Env,
withdrawer: soroban_sdk::Address,
shares: i128,
) -> Result
Returns true if the Vault is currently paused.
fn is_paused(env: soroban_sdk::Env) -> bool
Returns the exact share balance of a specific user.
fn balance_of(env: soroban_sdk::Env, user: soroban_sdk::Address) -> i128
Initializes the Novaire Yield Vault.
admin - The address of the protocol administrator.sy_wrapper - The address of the hardened SY Wrapper contract.underlying - The address of the underlying asset token (e.g., USDC).Returns AlreadyInitialized if called more than once.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
sy_wrapper: soroban_sdk::Address,
underlying: soroban_sdk::Address,
) -> Result<(), NovaireVaultError>
Accepts a pending admin transfer, finalizing the change of administration.
fn accept_admin(env: soroban_sdk::Env) -> Result<(), NovaireVaultError>
Withdraws underlying tokens by burning Vault shares, but sends the tokens to a specific receiver.
withdrawer - The address initiating the withdrawal (requires auth).receiver - The address that will receive the underlying tokens.shares - The amount of Vault shares to burn.The exact amount of underlying tokens returned to the receiver.
Returns Paused, InvalidAmount, InsufficientShares, StorageMissing, or MathUnderflow.
fn withdraw_for(
env: soroban_sdk::Env,
withdrawer: soroban_sdk::Address,
receiver: soroban_sdk::Address,
shares: i128,
) -> Result
Returns the downstream SY Wrapper Address.
fn get_sy_wrapper(
env: soroban_sdk::Env,
) -> Result
Initiates a two-step admin transfer to a new address.
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), NovaireVaultError>
Transfers Vault shares directly to another address.
from - The address sending the shares (requires auth).to - The address receiving the shares.amount - The amount of shares to transfer.Returns Paused, InvalidAmount, InsufficientShares, MathOverflow, or MathUnderflow.
fn transfer_shares(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), NovaireVaultError>
Returns the total amount of Vault shares in circulation.
fn total_vault_shares(env: soroban_sdk::Env) -> i128