Nexus Mutual

Get Cover By ETH

Users can buy a cover from ETH or any other eligible ERC20 token. If user is paying the premium amount in ETH the getCoverByETH function is called.

    function buyCoverByETH(
        address contractAddress,
        address coverAsset,
        uint256 sumAssured,
        uint16 coverPeriod,
        uint8 coverType,
        uint256 maxPriceWithFee,
        bytes calldata data
    )

Input variables :

  • contractAddress : refers to the address of the protocol which is being insured

  • coverAsset : refers to the ERC20 token address from which payment is being made

  • sumAssured : refers to the sum being insured

  • coverPeriod : refers to the duration for which the cover is being brought

  • coverType : refers to the type of cover being bought. In case of Nexus Mutual they offer Protocol, Custodian and Yield Token covers.

  • maxPriceWithFee : refers to the quote price

  • data : this parameters contains all the signature parameters signed by nexus mutual validating the quote price

Get Cover By Token

To provide multiple payment options and enable users to buy products in their desired currency (e.g. USDT, USDC, DAI, DOT, CVR) the getCoverByToken function is called.

    function buyCoverByToken(
        address[] memory _assets,
        uint256 sumAssured,
        uint16 coverPeriod,
        uint8 coverType,
        uint256 maxPriceWithFee,
        bytes calldata data
    ) 

Input variables :

  • _assets : It is [token, contractAddress, coverAsset]. Here _token is ERC20 token address by which user wants to buy product. contractAddress and coverAsset are same as buyCoverByETH function.

  • sumAssured : refers to the sum being insured

  • coverPeriod : refers to the duration for which the cover is being brought

  • coverType : refers to the type of cover being bought. In case of Nexus Mutual they offer Protocol, Custodian and Yield Token covers.

  • maxPriceWithFee : refers to the quote price

  • data : this parameters contains all the signature parameters signed by nexus mutual validating the quote price

Last updated