Abstract ERC-4626 vaults with DAI, USDC or USDT asset invested in Curve's 3Pool, and then the 3Pool LP token (3Crv) is invested in an underlying 3Pool-based (3Crv) Meta Vault.
Scale of one asset. eg 1e18 if asset has 18 decimal places.
assetFromUsdScale
Converts USD value with 18 decimals back down to asset/vault scale. For example, convert 18 decimal USD value back down to USDC which only has 6 decimal places. Will be 1 for DAI, 1e12 for USDC and USDT.
threeCrvTokenScale
Scale of the Curve.fi 3Crv token. 1e18 = 18 decimal places
metaVault
Address of the underlying Meta Vault that implements ERC-4626.
assetPoolIndex
The index of underlying asset DAI, USDC or USDT in 3Pool. DAI = 0, USDC = 1 and USDT = 2
Functions
liquidateVault
Governor liquidates all the vault's assets and send to the governor. Only to be used in an emergency. eg whitehat protection against a hack.
Parameters
Name
Type
Description
minAssets
uint256
Minimum amount of asset tokens to receive from removing liquidity from the Curve 3Pool. This provides sandwich attack protection.
resetAllowances
Approves Curve's 3Pool contract to transfer assets (DAI, USDC or USDT) from this vault. Also approves the underlying Meta Vault to transfer 3Crv from this vault.
setRedeemSlippage
Governor function to set redeem slippage.
Parameters
Name
Type
Description
_slippage
uint256
Redeem slippage to apply as basis points i.e. 1% = 100
setDepositSlippage
Governor function to set deposit slippage.
Parameters
Name
Type
Description
_slippage
uint256
Deposit slippage to apply as basis points i.e. 1% = 100
setWithdrawSlippage
Governor function to set withdraw slippage.
Parameters
Name
Type
Description
_slippage
uint256
Withdraw slippage to apply as basis points i.e. 1% = 100
setMintSlippage
Governor function to set mint slippage.
Parameters
Name
Type
Description
_slippage
uint256
Mint slippage to apply as basis points i.e. 1% = 100