CryptoMarry (CM) allows marriage partners to create shared crypto account and manage crypto assets. Notable features:
- If partners both agree for the marriage partnership, a distinct contract will be created.
- CM allows for joint management of crypto assets including sending/receiving ERC20 and ERC721 tokens, and integration to Uniswap and Compound.
- CM has built in voting mechanism to reach consensus between partners. Voting is done through LOVE tokens.
- LOVE tokens can be claimed depending on the balance of the marriage contract, or can be bought according to the exchange rate and the cap.
- If partners decide to divorce, the CM protocol provides settlement mechanisms, including:
- Splitting ETH balance
- Splitting ERC20 balance
- Splitting NFT assets
- Partners may decide to add other family members to the contract who can participate in the management of the crypto assets.
- Partners can mint tiered NFT certificates that certify the existance of account within the CM.
- CM has several other convenience functions such as sponsored transactions.
A few main contracts include:
-
WaverContract
An entry contract where partners can create marriage contracts. This is the main contract that gives access to a proxy contract.
-
WaverImplementation
A proxy contract that carries logic behind reaching consensus and management of crypto assets.
To run CM contracts, pull the repository from Github, and install its dependencies. You will need npm installed.
git clone https://github.com/altyni86/CryptoMarry_Contracts.git
cd CryptoMarry_Contracts
npm install
You can compile contracts through:
npx hardhat compile
Testing has approximately 82.63% coverage.
npx hardhat test
Some scenario based external intagration tests are run separately by forking ETH mainnet.
npx hardhat run --network localhost scripts/7_external_integration_test.js
You can deploy the contracts through:
npx hardhat run scripts/deploy.js
- Hardhat config is set for Forking - Local or Rinkeby Networks. You will need to include necessary information to env file.
- Due to issues in OpenZeppelin npm installations,
ERC2771ContextUpgradeable.sol
has been copied to contracts folder.