> For the complete documentation index, see [llms.txt](https://www-covercompared.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www-covercompared.gitbook.io/docs/covercompared-dapp/defi-covers/nexus-mutual.md).

# 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.

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

#### Input variables :&#x20;

* 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&#x20;
* 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.

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

#### Input variables :&#x20;

* \_assets : It is \[*token, contractAddress, coverAsset]. Here \_*&#x74;oken is ERC20 token address by which user wants to buy product. contractAddress and coverAsset are same as buyCoverByETH  function.&#x20;
* sumAssured : refers to the sum being insured&#x20;
* 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
