View Source: contracts/interfaces/ICover.sol
↗ Extends: IMember ↘ Derived Contracts: CoverBase
ICover
struct AddCoverArgs {
bytes32 coverKey,
string info,
string tokenName,
string tokenSymbol,
bool supportsProducts,
bool requiresWhitelist,
uint256 stakeWithFee,
uint256 initialReassuranceAmount,
uint256 minStakeToReport,
uint256 reportingPeriod,
uint256 cooldownPeriod,
uint256 claimPeriod,
uint256 floor,
uint256 ceiling,
uint256 reassuranceRate,
uint256 leverageFactor
}
struct AddProductArgs {
bytes32 coverKey,
bytes32 productKey,
string info,
bool requiresWhitelist,
uint256 productStatus,
uint256 efficiency
}
struct UpdateProductArgs {
bytes32 coverKey,
bytes32 productKey,
string info,
uint256 productStatus,
uint256 efficiency
}
Events
event CoverCreated(bytes32 indexed coverKey, string info, string tokenName, string tokenSymbol, bool indexed supportsProducts, bool indexed requiresWhitelist);
event ProductCreated(bytes32 indexed coverKey, bytes32 productKey, string info);
event CoverUpdated(bytes32 indexed coverKey, string info);
event ProductUpdated(bytes32 indexed coverKey, bytes32 productKey, string info);
event ProductStateUpdated(bytes32 indexed coverKey, bytes32 indexed productKey, address indexed updatedBy, bool status, string reason);
event VaultDeployed(bytes32 indexed coverKey, address vault);
event CoverCreatorWhitelistUpdated(address account, bool status);
event CoverUserWhitelistUpdated(bytes32 indexed coverKey, bytes32 indexed productKey, address indexed account, bool status);
event CoverCreationFeeSet(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 stablecoin, bytes32 friendlyName)
- addCover(struct ICover.AddCoverArgs args)
- addCovers(struct ICover.AddCoverArgs[] args)
- addProduct(struct ICover.AddProductArgs args)
- addProducts(struct ICover.AddProductArgs[] args)
- updateProduct(struct ICover.UpdateProductArgs args)
- updateCover(bytes32 coverKey, string info)
- updateCoverCreatorWhitelist(address[] account, bool[] whitelisted)
- updateCoverUsersWhitelist(bytes32 coverKey, bytes32 productKey, address[] accounts, bool[] statuses)
- disablePolicy(bytes32 coverKey, bytes32 productKey, bool status, string reason)
- checkIfWhitelistedCoverCreator(address account)
- checkIfWhitelistedUser(bytes32 coverKey, bytes32 productKey, address account)
- setCoverCreationFee(uint256 value)
- setMinCoverCreationStake(uint256 value)
- setMinStakeToAddLiquidity(uint256 value)
Initializes this contract
function initialize(address stablecoin, bytes32 friendlyName) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
stablecoin | address | Provide the address of the token this cover will be quoted against. |
friendlyName | bytes32 | Enter a description or ENS name of your liquidity token. |
Source Code
function initialize(address stablecoin, bytes32 friendlyName) 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(struct ICover.AddCoverArgs args) external nonpayable
returns(address)
Arguments
Name | Type | Description |
---|---|---|
args | struct ICover.AddCoverArgs |
Source Code
function addCover(AddCoverArgs calldata args) external returns (address);
function addCovers(struct ICover.AddCoverArgs[] args) external nonpayable
returns(vaults address[])
Arguments
Name | Type | Description |
---|---|---|
args | struct ICover.AddCoverArgs[] |
Source Code
function addCovers(AddCoverArgs[] calldata args) external returns (address[] memory vaults);
function addProduct(struct ICover.AddProductArgs args) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
args | struct ICover.AddProductArgs |
Source Code
function addProduct(AddProductArgs calldata args) external;
function addProducts(struct ICover.AddProductArgs[] args) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
args | struct ICover.AddProductArgs[] |
Source Code
function addProducts(AddProductArgs[] calldata args) external;
function updateProduct(struct ICover.UpdateProductArgs args) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
args | struct ICover.UpdateProductArgs |
Source Code
function updateProduct(UpdateProductArgs calldata args) external;
Updates the cover contract. This feature is accessible only to the cover owner or protocol owner (governance).
function updateCover(bytes32 coverKey, string info) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter the cover key |
info | string | Enter a new IPFS hash to update |
Source Code
function updateCover(bytes32 coverKey, string calldata info) external;
function updateCoverCreatorWhitelist(address[] account, bool[] whitelisted) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address[] | |
whitelisted | bool[] |
Source Code
function updateCoverCreatorWhitelist(address[] calldata account, bool[] calldata whitelisted) external;
function updateCoverUsersWhitelist(bytes32 coverKey, bytes32 productKey, address[] accounts, bool[] statuses) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
accounts | address[] | |
statuses | bool[] |
Source Code
function updateCoverUsersWhitelist(
bytes32 coverKey,
bytes32 productKey,
address[] calldata accounts,
bool[] calldata statuses
) external;
function disablePolicy(bytes32 coverKey, bytes32 productKey, bool status, string reason) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
status | bool | |
reason | string |
Source Code
function disablePolicy(
bytes32 coverKey,
bytes32 productKey,
bool status,
string calldata reason
) external;
function checkIfWhitelistedCoverCreator(address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
account | address |
Source Code
function checkIfWhitelistedCoverCreator(address account) external view returns (bool);
function checkIfWhitelistedUser(bytes32 coverKey, bytes32 productKey, address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
account | address |
Source Code
function checkIfWhitelistedUser(
bytes32 coverKey,
bytes32 productKey,
address account
) external view returns (bool);
function setCoverCreationFee(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setCoverCreationFee(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
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundDaiDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundDaiDelegator
- 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