View Source: contracts/interfaces/IVault.sol
↗ Extends: IMember, IERC20 ↘ Derived Contracts: VaultBase
IVault
struct VaultInfoType {
uint256 totalPods,
uint256 balance,
uint256 extendedBalance,
uint256 totalReassurance,
uint256 myPodBalance,
uint256 myShare,
uint256 withdrawalOpen,
uint256 withdrawalClose
}
struct AddLiquidityArgs {
bytes32 coverKey,
uint256 amount,
uint256 npmStakeToAdd,
bytes32 referralCode
}
Events
event GovernanceTransfer(address indexed to, uint256 amount);
event StrategyTransfer(address indexed token, address indexed strategy, bytes32 indexed name, uint256 amount);
event StrategyReceipt(address indexed token, address indexed strategy, bytes32 indexed name, uint256 amount, uint256 income, uint256 loss);
event PodsIssued(address indexed account, uint256 issued, uint256 liquidityAdded, bytes32 indexed referralCode);
event PodsRedeemed(address indexed account, uint256 redeemed, uint256 liquidityReleased);
event FlashLoanBorrowed(address indexed lender, address indexed borrower, address indexed stablecoin, uint256 amount, uint256 fee);
event NpmStaken(address indexed account, uint256 amount);
event NpmUnstaken(address indexed account, uint256 amount);
event InterestAccrued(bytes32 indexed coverKey);
event Entered(bytes32 indexed coverKey, address indexed account);
event Exited(bytes32 indexed coverKey, address indexed account);
- key()
- sc()
- addLiquidity(struct IVault.AddLiquidityArgs args)
- accrueInterest()
- removeLiquidity(bytes32 coverKey, uint256 amount, uint256 npmStake, bool exit)
- transferGovernance(bytes32 coverKey, address to, uint256 amount)
- transferToStrategy(IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount)
- receiveFromStrategy(IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount)
- calculatePods(uint256 forStablecoinUnits)
- calculateLiquidity(uint256 podsToBurn)
- getInfo(address forAccount)
- getStablecoinBalanceOf()
function key() external view
returns(bytes32)
Arguments
Name | Type | Description |
---|
Source Code
function key() external view returns (bytes32);
function sc() external view
returns(address)
Arguments
Name | Type | Description |
---|
Source Code
function sc() external view returns (address);
Adds liquidity to the specified cover contract
function addLiquidity(struct IVault.AddLiquidityArgs args) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
args | struct IVault.AddLiquidityArgs |
Source Code
function addLiquidity(AddLiquidityArgs calldata args) external;
function accrueInterest() external nonpayable
Arguments
Name | Type | Description |
---|
Source Code
function accrueInterest() external;
Removes liquidity from the specified cover contract
function removeLiquidity(bytes32 coverKey, uint256 amount, uint256 npmStake, bool exit) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter the cover key |
amount | uint256 | Enter the amount of liquidity token to remove. |
npmStake | uint256 | Enter the amount of NPM stake to remove. |
exit | bool | Indicates NPM stake exit. |
Source Code
function removeLiquidity(
bytes32 coverKey,
uint256 amount,
uint256 npmStake,
bool exit
) external;
Transfers liquidity to governance contract.
function transferGovernance(bytes32 coverKey, address to, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter the cover key |
to | address | Enter the destination account |
amount | uint256 | Enter the amount of liquidity token to transfer. |
Source Code
function transferGovernance(
bytes32 coverKey,
address to,
uint256 amount
) external;
Transfers liquidity to strategy contract.
function transferToStrategy(IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
token | IERC20 | |
coverKey | bytes32 | Enter the cover key |
strategyName | bytes32 | Enter the strategy's name |
amount | uint256 | Enter the amount of liquidity token to transfer. |
Source Code
function transferToStrategy(
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external;
Receives from strategy contract.
function receiveFromStrategy(IERC20 token, bytes32 coverKey, bytes32 strategyName, uint256 amount) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
token | IERC20 | |
coverKey | bytes32 | Enter the cover key |
strategyName | bytes32 | Enter the strategy's name |
amount | uint256 | Enter the amount of liquidity token to transfer. |
Source Code
function receiveFromStrategy(
IERC20 token,
bytes32 coverKey,
bytes32 strategyName,
uint256 amount
) external;
function calculatePods(uint256 forStablecoinUnits) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
forStablecoinUnits | uint256 |
Source Code
function calculatePods(uint256 forStablecoinUnits) external view returns (uint256);
function calculateLiquidity(uint256 podsToBurn) external view
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
podsToBurn | uint256 |
Source Code
function calculateLiquidity(uint256 podsToBurn) external view returns (uint256);
function getInfo(address forAccount) external view
returns(info struct IVault.VaultInfoType)
Arguments
Name | Type | Description |
---|---|---|
forAccount | address |
Source Code
function getInfo(address forAccount) external view returns (VaultInfoType memory info);
Returns the stablecoin balance of this vault This also includes amounts lent out in lending strategies
function getStablecoinBalanceOf() external view
returns(uint256)
Arguments
Name | Type | Description |
---|
Source Code
function getStablecoinBalanceOf() external view returns (uint256);
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundStablecoinDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundStablecoinDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- INeptuneRouterV1
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NeptuneRouterV1
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness