ZivoeVault.sol
ERC-4626 Vault ($zVLT)
Last updated
ERC-4626 Vault ($zVLT)
Last updated
Implements an ERC-4626 vault using zSTT as the underlying asset and auto-stakes into stSTT
This contract has the following features:
Allows user to mint by depositing zSTT (alternatively, burn for zSTT)
Interfaces with a router that automates stablecoin deposits, so users can simply interact with the router and deposit USDT, USDC, etc. to mint zVLT tokens
Auto-compunds yield with compound()
function to claim any outstanding yield (generally in the form of a stablecoin, USDC) which occurs by minting more zSTT and staking into stSTT
IERC20
zSTT
The address of the zSTT token (underlying asset)
IZivoeRewards
stSTT
The address of the ZivoeRewards staking contract
IZivoeTranches
ZVT
The address of the ZivoeTranches contract
IZivoeGlobals
GBL
The address of the ZivoeGlobals contract
totalAssets()
Overrides totalAssets(), returns staked amount of zSTT (represented by stSTT)
Returns
uint256
-
stSTT balance held in the vault.
_deposit()
Overrides _deposit(), handles staking deposited zSTT (to receive stSTT)
address
caller
The caller of the function.
address
receiver
The receiver of shares.
uint256
assets
The amount of assets to deposit.
uint256
shares
The amount of shares to receive.
_withdraw()
Overrides _withdraw(), handles unstaking stSTT (to receive zSTT)
address
caller
The caller of the function.
address
receiver
The receiver of shares.
address
owner
The owner of shares.
uint256
assets
The amount of assets to deposit.
uint256
shares
The amount of shares to receive.
compound()
Claims rewards from stSTT, mints zSTT with USDC, and stakes the zSTT
address
stablecoin
The stablecoin to be compounded.
passThrough()
Returns any external tokens to the DAO.
IERC20
asset
The asset to pass through.