Vaults and Tokens

Explaining vaults and underlying tokens on Nest

At its heart, Nest operates through vaults supported by advanced Ethereum standards to ensure a seamless and decentralized financial system.

Vault Tokens

Vault tokens (e.g., $nRWA) represent ownership of a Nest vault. Capital providers deposit stablecoins, such as USDC.e or pUSD, into the vault and receive these vault tokens in return. Over time, the vault tokens grow in value as the vault's underlying tokens accrue yield.

Vaults are built on ERC-4626, providing a uniform API for tokenized vaults. This ensures compatibility across DeFi protocols while enabling efficient deposit and redemption operations.

ERC-4626 Example: Deposit Implementation

solidity function deposit(uint256 assets, address receiver) external returns (uint256 shares) {
    shares = convertToShares(assets);
    _mint(receiver, shares);
    asset.transferFrom(msg.sender, address(this), assets);
}

When users want to withdraw, they return their vault tokens to the protocol, which are then burned. If the vault has sufficient liquidity, the user's withdrawal is processed directly from the vault's reserves. To maintain liquidity for these redemptions, vault managers may also sell some of the vault's underlying tokens back to yield issuers. This process allows the vault to convert underlying tokens into stablecoins, ensuring that funds are available for timely withdrawals.

Vault managers actively monitor and manage liquidity levels, balancing the vault's reserves with its yield-generating assets to ensure smooth operations and seamless redemptions for users.


Underlying Tokens

Underlying tokens are issued by yield issuers in exchange for stablecoins provided by the vault. These tokens represent the vault’s stake in decentralized lending operations. As borrowers repay loans with interest to yield issuers, the value of the underlying tokens increases, directly benefiting the vault and, consequently, the vault tokenholders.

Nest employs ERC-7540 to enable asynchronous operations. This standard decouples user interactions (e.g., deposits and redemptions) from the underlying token operations using a request/claim pattern.

ERC-7540 Example: Redemption Request

solidity function requestRedeem(
    uint256 shares,
    address controller,
    address owner
) external returns (uint256 requestId) {
    pendingRedeemRequest[controller] += shares;
    emit RedeemRequest(controller, owner, requestId, msg.sender, shares);
}

Yield issuers manage their liquidity to process these redemption requests efficiently, ensuring the system remains robust.

Last updated