Vault Share Token (nVault)
The nVault token is a Soroban token contract (SEP-41 compliant) that represents a user's proportional ownership of a vault's total assets.
Interface
rust
#[contract]
pub struct VaultToken;
#[contractimpl]
impl VaultToken {
pub fn initialize(env: Env, admin: Address, name: String, symbol: String, decimals: u32);
/// Mint shares to user (called by vault on deposit)
pub fn mint(env: Env, to: Address, amount: i128) {
Self::require_vault_caller(&env); // Only vault contract can mint
// ... mint logic
}
/// Burn shares from user (called by vault on withdraw)
pub fn burn(env: Env, from: Address, amount: i128) {
Self::require_vault_caller(&env);
// ... burn logic
}
// Standard SEP-41 token interface
pub fn balance(env: Env, id: Address) -> i128;
pub fn transfer(env: Env, from: Address, to: Address, amount: i128);
pub fn allowance(env: Env, from: Address, spender: Address) -> i128;
pub fn approve(env: Env, from: Address, spender: Address, amount: i128);
pub fn total_supply(env: Env) -> i128;
pub fn name(env: Env) -> String;
pub fn symbol(env: Env) -> String;
pub fn decimals(env: Env) -> u32;
}DeFi500 Token (nDEFI)
The DeFi500 vault uses a special nDEFI token that represents diversified exposure to an index of top DeFi protocols. Monthly rebalancing adjusts the underlying allocation to track the best performers.
nDEFI token value tracks:
Top 5 DeFi protocols by risk-adjusted yield
Monthly rebalance adjusts weights
User holds 1 token = exposure to entire index