Nexus Mutual uses the power of blockchain technology and Ethereum to allow people from all over the world to share insurance risk together without the need for an insurance company. Nexus Mutual will initially launch with one product, smart contract cover.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
contracts
migrations
.gitignore
.solhint.json
.solhintignore
.travis.yml
LICENSE
README.md
package.json
truffle-config.js
truffle.js Add truffle config Jul 12, 2018

README.md

Build Status

NEXUS MUTUAL

Nexus Mutual uses blockchain technology to bring the mutual ethos back to insurance by creating aligned incentives through smart contract code on the Ethereum blockchain.

Description

Nexus Mutual is built on the Ethereum blockchain and uses a modular system for grouping of Ethereum smart contracts, allowing logical components of the system to be upgraded without effecting the other components. Following are the key modules of Nexus Mutual.

Token Module

Token contracts maintain details of NXM Members and the NXM Tokens held by each of them. NXM tokens can be used to purchase a cover, submit a claim, underwrite smart contracts, assess a claim or transfer tokens to other addresses.

Core Contracts

  • nxmToken.sol
  • nxmToken2.sol
  • nxmTokenData.sol

Note: The smart contracts of this module had to be split in multiple smart contracts to cater to the Ethereum Gas limits. The above mentioned contracts need to be seen in conjunction

Some important functions
  • lockCN : Tokens are locked against a cover note, at the time of cover generation. These can be used to submit a claim and unused tokens can be unlocked for general use once the cover expires.
  • depositCN: Tokens are deposited while submitting a claim against a cover. These are eventually burnt in case of denial and unlocked in case of claim acceptance.
  • lock: Locks a specified amount of tokens against an address for a specified purpose and time
  • addStake: Add amount of token for staking on smart contract.

Quotation Module

Quotation contracts contain all logic associated with creating and expiring covers. Smart contract cover is the first insurance product supported by the mutual. A member can generate a quotation offchain , and fund the same via NXM tokens / currency assets(currently ETH and DAI). This creates a cover on-chain. Quotation contracts interact with Token Contracts to lock NXM tokens against a cover which are then used at the time of claim submission.

Core Contracts

  • quotation2.sol
  • quotationData.sol
Some important functions
  • makeCover : Create cover of the quotation, change the status of the quotation, update the total sum assured and lock the tokens of the cover of a quote from Quote member Ethereum address
  • makeCoverUsingNXMTokens : Make Cover using NXM tokens.

Claim Module

Claim contracts manages the entire claim lifecycle starting from submitting a claim against a cover note to taking part in claims assessment to closing a claim.

Core Contracts

  • claims.sol
  • claimsData.sol
Some important functions
  • submitClaim: Submits a claim against a cover note.
  • submitCAVote : Members who have tokens locked under Claims Assessment, can assess a claim, i.e., accept/deny a claim while the locked tokens.
  • submitMemberVote: Submits a member vote for assessing a claim.

Claim Reward Module

Claims Reward Contract contains the methods for rewarding or punishing the Claim assessors/Members based on the vote cast and the final verdict.

Core Contract

  • claimsReward.sol
Some important functions
  • changeClaimStatus: Decides the next/final status of a claim. Decision is taken based on the current state and the votes cast.
  • rewardAgainstClaim: Rewards/Punishes users who participated in claims assessment. NXM tokens are allocated as a reward for assessors who voted with the consensus. NXM tokens are locked as a punishment for assessors who voted against the consensus.

Pool Module

Pool contracts contain all logic associated with calling External oracles through Oraclize and processing the results retrieved from the same. The module also encompasses on-chain investment asset management using 0x-protocol.

Core Contract

  • pool.sol
  • pool2.sol
  • poolData.sol

Note: The smart contracts of this module had to be split in multiple smart contracts to cater to the Ethereum Gas limits. The above mentioned contracts need to be seen in conjunction

Some important functions
  • closeProposalOraclise: Closes Proposal’s voting.
  • closeEmergencyPause: Close Emergency Pause.
  • closeCoverOraclise: Expires a cover.
  • versionOraclise: Updates the version of contracts.
  • MCROraclise: Initiates Minimum Capital Requirement (MCR) calculation.
  • closeClaimsOraclise: Closes Claim’s voting.

MCR Module

MCR contracts contain functions for recording the Minimum Capital Requirement (MCR) of the system, each day, thus determining the NXM token price.

Core Contract

  • mcr.sol
  • mcrData.sol
Some important function
  • pushMCRData: Records details of (Minimum Capital Requirement)MCR for each day.
    calculateTokenPrice: Calculates the NXM Token Price of a currency.

Governance Module:

Governance contracts contain the logic for creating, editing, categorizing and voting on proposals followed by action implementation, code upgradability. These governance contracts are generated by using the GovBlocks Protocol.