Skip to content

flashburst/protocol

Repository files navigation

Neptune Mutual Covers

Decentralized Autonomous Cover Organization

Contract Creators

Anyone who has NEP tokens can create a cover contract. To avoid spam, questionable, and confusing cover contracts, a creator has to burn 1000 NEP tokens. Additionally, the contract creator also needs to stake 4000 NEP 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 NEP.

About Reporting Questionable or Invalid Contracts

The governance system allows NEP holders to vote to invalidate and remove any cover contract.

  • The staked NEP 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 NEP 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 NEP 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) NEP 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 NEP tokens.

Cover Contract (Cover.sol)

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

↗ Extends: CoverBase

Cover

Functions

function (IStore store, address liquidityToken, bytes32 liquidityName) public nonpayable CoverBase 

Arguments

Name Type Description
store IStore
liquidityToken address
liquidityName bytes32

updateCover

Updates the cover contract

function updateCover(bytes32 key, bytes32 info) external nonpayable onlyValidCover onlyCoverOwner nonReentrant whenNotPaused 

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 NEP in the Vault.

Through the governance portal, projects will be able redeem the full cover fee at a later date. 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 stakeWithFee, address assuranceToken, uint256 initialAssuranceAmount, uint256 initialLiquidity) external nonpayable nonReentrant whenNotPaused 

Arguments

Name Type Description
key bytes32 Enter a unique key for this cover
info bytes32 IPFS info of the cover contract
stakeWithFee uint256 Enter the total NEP 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 NEP 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 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
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%