Skip to content

flashburst/protocol

Repository files navigation

Neptune Mutual Covers

Decentralized Autonomous Cover Organization

Contract Creators

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.

Rewards

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.

Liquidity Providers

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.

Farming Strategy

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.

Cover Fees

The liquidity providers collectively earn cover fees paid by the platform users. Initial liquidity provider will receive additional 10% rewards in NPM tokens.

Cover Contract (Cover.sol)

View Source: contracts/core/lifecycle/Cover.sol

↗ Extends: CoverBase

Cover

The cover contract facilitates you create and update covers

Functions

Constructs this contract

function (IStore store) public nonpayable CoverBase 

Arguments

Name Type Description
store IStore Enter the store

updateCover

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

addCover

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.

_addCover

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.

_validateAndGetFee

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

Contracts

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 67.8%
  • Solidity 32.2%