View Source: contracts/interfaces/ICover.sol
↗ Extends: IMember ↘ Derived Contracts: CoverBase
ICover
Events
event CoverCreated(bytes32 key, bytes32 info);
event CoverUpdated(bytes32 key, bytes32 info);
event CoverStopped(bytes32 indexed coverKey, address indexed deletedBy, string reason);
event WhitelistUpdated(address account, bool status);
event CoverFeeSet(uint256 previous, uint256 current);
event MinCoverCreationStakeSet(uint256 previous, uint256 current);
event MinStakeToAddLiquiditySet(uint256 previous, uint256 current);
event CoverInitialized(address indexed stablecoin, bytes32 withName);
- initialize(address liquidityToken, bytes32 liquidityName)
- addCover(bytes32 key, bytes32 info, address reassuranceToken, uint256[] values)
- updateCover(bytes32 key, bytes32 info)
- updateWhitelist(address account, bool whitelisted)
- getCover(bytes32 key)
- stopCover(bytes32 key, string reason)
- checkIfWhitelisted(address account)
- setCoverFees(uint256 value)
- setMinCoverCreationStake(uint256 value)
- setMinStakeToAddLiquidity(uint256 value)
Initializes this contract
function initialize(address liquidityToken, bytes32 liquidityName) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
liquidityToken | address | Provide the address of the token this cover will be quoted against. |
liquidityName | bytes32 | Enter a description or ENS name of your liquidity token. |
Source Code
function initialize(address liquidityToken, bytes32 liquidityName) external;
Adds a new coverage pool or cover contract.
To add a new cover, you need to pay cover creation fee
and stake minimum amount of NPM in the Vault.
Through the governance portal, projects will be able redeem
the full cover fee at a later date.
Apply for Fee Redemption
https://docs.neptunemutual.com/covers/cover-fee-redemption
As the cover creator, you will earn a portion of all cover fees
generated in this pool.
Read the documentation to learn more about the fees:
https://docs.neptunemutual.com/covers/contract-creators
function addCover(bytes32 key, bytes32 info, address reassuranceToken, uint256[] values) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter a unique key for this cover |
info | bytes32 | IPFS info of the cover contract |
reassuranceToken | address | Optional. Token added as an reassurance of this cover. Reassurance tokens can be added by a project to demonstrate coverage support for their own project. This helps bring the cover fee down and enhances liquidity provider confidence. Along with the NPM tokens, the reassurance tokens are rewarded as a support to the liquidity providers when a cover incident occurs. |
values | uint256[] | [0] minStakeToReport A cover creator can override default min NPM stake to avoid spam reports |
Source Code
function addCover(
bytes32 key,
bytes32 info,
address reassuranceToken,
uint256[] memory values
) external;
Updates the cover contract. This feature is accessible only to the cover owner or protocol owner (governance).
function updateCover(bytes32 key, bytes32 info) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter the cover key |
info | bytes32 | Enter a new IPFS URL to update |
Source Code
function updateCover(bytes32 key, bytes32 info) external;
function updateWhitelist(address account, bool whitelisted) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address | |
whitelisted | bool |
Source Code
function updateWhitelist(address account, bool whitelisted) external;
Get info of a cover contract by key
function getCover(bytes32 key) external view
returns(coverOwner address, info bytes32, values uint256[])
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter the cover key |
Source Code
function getCover(bytes32 key)
external
view
returns (
address coverOwner,
bytes32 info,
uint256[] memory values
);
function stopCover(bytes32 key, string reason) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
reason | string |
Source Code
function stopCover(bytes32 key, string memory reason) external;
function checkIfWhitelisted(address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
account | address |
Source Code
function checkIfWhitelisted(address account) external view returns (bool);
function setCoverFees(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setCoverFees(uint256 value) external;
function setMinCoverCreationStake(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinCoverCreationStake(uint256 value) external;
function setMinStakeToAddLiquidity(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinStakeToAddLiquidity(uint256 value) external;
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Controller
- Cover
- CoverBase
- CoverLibV1
- CoverProvision
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundERC20Delegator
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- Finalization
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICommission
- ICompoundERC20DelegatorLike
- ICover
- ICoverProvision
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- IMember
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceDiscovery
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- Migrations
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockStore
- MockVault
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PriceDiscovery
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- WithFlashLoan
- Witness