Anyone who has NPM tokens can create a cover contract. To avoid spam, questionable, and confusing cover contracts, a creator has to burn 1000 NPM tokens. Additionally, the contract creator also needs to stake 4000 NPM tokens or more. The higher the sake, the more visibility the contract gets if there are multiple cover contracts with the same name or similar terms.
The contract creator will earn a steady income of 1% of all cover fees paid by the users. Initial contract creators will also earn additional 1% of the cover fees in NPM.
About Reporting Questionable or Invalid Contracts
The governance system allows NPM holders to vote to invalidate and remove any cover contract.
- The staked NPM tokens of the contract creator will be burned.
- The users having non-expired covers can withdraw their cover fee.
- The liquidity providers can withdraw their staked NPM tokens, stable-coins, and cover fees.
The liquidity providers can evaluate a cover contract and ensure that it is up to their satisfaction. One can then provide liquidity in BUSD or other supported cryptocurrency. A liquidity provider needs to also stake 250 NPM or higher.
To maximize return on investment, 25% of the idle/uncovered assets in the liquidity pool is supplied to Venus Protocol for lending. The interest received on loan is capitalized back into the liquidity pool, shared amongst all liquidity providers. The platform will deduct 2% of the profit generated to purchase (and burn) NPM tokens from decentralized exchange(s).
This feature will be available starting from the Neptune Mutual Protocol v2.
The liquidity providers collectively earn cover fees paid by the platform users. Initial liquidity provider will receive additional 10% rewards in NPM tokens.
View Source: contracts/core/lifecycle/Cover.sol
↗ Extends: CoverBase
Cover
The cover contract facilitates you create and update covers
- constructor(IStore store)
- updateCover(bytes32 key, bytes32 info)
- addCover(bytes32 key, bytes32 info, uint256 reportingPeriod, uint256 stakeWithFee, address assuranceToken, uint256 initialAssuranceAmount, uint256 initialLiquidity)
- _addCover(bytes32 key, bytes32 info, uint256 reportingPeriod, uint256 fee, address assuranceToken)
- _validateAndGetFee(bytes32 key, bytes32 info, uint256 stakeWithFee)
Constructs this contract
function (IStore store) public nonpayable CoverBase
Arguments
Name | Type | Description |
---|---|---|
store | IStore | Enter the store |
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 nonReentrant
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter the cover key |
info | bytes32 | Enter a new IPFS URL to update |
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, uint256 reportingPeriod, uint256 stakeWithFee, address assuranceToken, uint256 initialAssuranceAmount, uint256 initialLiquidity) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter a unique key for this cover |
info | bytes32 | IPFS info of the cover contract |
reportingPeriod | uint256 | The period during when reporting happens. |
stakeWithFee | uint256 | Enter the total NPM amount (stake + fee) to transfer to this contract. |
assuranceToken | address | Optional. Token added as an assurance of this cover. Assurance 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 assurance tokens are rewarded as a support to the liquidity providers when a cover incident occurs. |
initialAssuranceAmount | uint256 | Optional. Enter the initial amount of assurance tokens you'd like to add to this pool. |
initialLiquidity | uint256 | Optional. Enter the initial stablecoin liquidity for this cover. |
function _addCover(bytes32 key, bytes32 info, uint256 reportingPeriod, uint256 fee, address assuranceToken) private nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter a unique key for this cover |
info | bytes32 | IPFS info of the cover contract |
reportingPeriod | uint256 | The period during when reporting happens. |
fee | uint256 | Fee paid to create this cover |
assuranceToken | address | Optional. Token added as an assurance of this cover. |
Validation checks before adding a new cover
function _validateAndGetFee(bytes32 key, bytes32 info, uint256 stakeWithFee) private view
returns(uint256)
Returns
Returns fee required to create a new cover
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
info | bytes32 | |
stakeWithFee | uint256 |
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- Commission
- Context
- Controller
- Cover
- CoverAssurance
- CoverBase
- CoverProvision
- CoverStake
- CoverUtilV1
- cToken
- cTokenFactory
- cTokenFactoryLibV1
- Destroyable
- ERC165
- ERC20
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapV2RouterLike
- Governance
- GovernanceUtilV1
- IAccessControl
- IClaimsProcessor
- ICommission
- ICover
- ICoverAssurance
- ICoverProvision
- ICoverStake
- ICToken
- ICTokenFactory
- IERC165
- IERC20
- IERC20Metadata
- IGovernance
- IMember
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceDiscovery
- IProtocol
- IReporter
- IStore
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IVault
- IVaultFactory
- IWitness
- MaliciousToken
- Migrations
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyManager
- PriceDiscovery
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- SafeERC20
- SafeMath
- Store
- StoreBase
- StoreKeyUtil
- Strings
- ValidationLibV1
- Vault
- VaultBase
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- Witness