Developer Spec

Developers testing NEV should get pUSD (ERC-20 stablecoin like token on Plume's devnet here: https://test-faucet.plumenetwork.xyz/)

Vault Specification

Nest Egg Vault is a smart contract that allows users to deposit a stablecoin (pUSD) to earn a proportional share of yield from multiple yield-bearing components.

General Properties

  • Implements Interface: ERC-7540

    • Technically, this should implement ERC-4626 because both paths are synchronous. However in practice this does not matter, and we need it to support ERC-7540 methods in order to make these vaults composable.

  • Asset Accepted: pUSD (ERC-20)

  • Upgradeable: using OpenZeppelin contracts

  • Deployed Contract on Plume’s Devnet: NEV

  • Entry Contract for NEV: AggregateToken

Functional Requirements

In these examples, the Nest Egg Vault's symbol() is "NEV" and name() is "Nest Egg Vault".

  • Deposit

    • User deposits pUSD into the vault and receives $NEV shares in the vault

    • User should permit the vault to deposit pUSD with a specific amount of pUSD

  • Withdrawal

    • User withdraws pUSD from the vault by burning their shares of $NEV

  • Set the Conversion Rate

    • Admin can set how many shares of $NEV users will get when depositing, and how much $pUSD they'll get when withdrawing

  • Component Management

    • Admin can deposit and redeem into any of the underlying tokens at any time

  • View Functions

    • User can see general properties of the vault like name(), symbol(), totalAssets()

    • User can preview how many shares of $NEV they'll get when depositing, and how much $pUSD they'll get when withdrawing

    • User can see how many shares of $NEV they own

    • User can see the value of the shares

    • User can see the addresses of all tokens that have ever been added to the vault

Last updated