Puffer UniFi Vaults
Puffer vaults are a way to earn optimized yield across top DeFi protocols, along with points from select partners by depositing your assets into our strategy vaults.
How It Works
- Deposit your assets into a Puffer vault.
- Earn yield on your assets from the vaults.
- Withdraw your assets from the vaults.
Vault Contracts
Each Puffer vault consists of a set of the following contracts:
- BoringVault
The main vault ERC20 token contract which represents the vault's share of the deposited assets. - AccountantWithRateProviders
Accountant contract with rate providers for the vault. - TellerWithMultiAssetSupport
The contract that handles deposits to the vault. - AtomicQueue
The contract that handles withdrawals from the vault in the form withdrawal queues.
Puffer Vaults
- UniFi ETH Vault
- UniFi USD Vault
- UniFi BTC Vault
Interacting with the Vaults
Getting the balance of unifiETH
(UniFi ETH Vault) for a wallet address.
const balance = await pufferClient.nucleusBoringVault
.withToken(UnifiToken.unifiETH)
.balanceOf(walletAddress);
const balanceAmount = Number(balance) / 1e18;
Getting the rate compared to another ERC20 token.
const pufETHAddress = '0xd9a442856c234a39a81a089c06451ebaa4306a72';
const rate = await pufferClient.nucleusAccountant
.withToken(UnifiToken.unifiETH)
.getRateInQuoteSafe(pufETHAddress);
const rateValue = Number(rate) / 1e18;
For more information on how to use the vault contracts, please refer to the API docs for the contract handlers: