InsureDeFi is a decentralized insurance platform built on the Ethereum blockchain. It offers insurance policies tailored for decentralized finance (DeFi) users, protecting against various risks associated with DeFi activities. This platform aims to enhance the security and trustworthiness of DeFi protocols by mitigating the financial risks faced by users.
- Decentralized Insurance Policies: Users can purchase insurance policies directly on the blockchain without intermediaries.
- Customizable Policies: Users can choose from different policy types and customize parameters such as premium amount, coverage limit, and duration.
- Transparency and Immutability: All insurance policies and transactions are recorded on the Ethereum blockchain, ensuring transparency and immutability.
- Automatic Claim Processing: Smart contracts automatically process insurance claims based on predefined conditions, reducing manual intervention.
- Error Handling: Smart contracts include robust error handling mechanisms to ensure the integrity and security of the insurance platform.
- InsureDefiWallet.sol: Manages insurance policies for DeFi wallets.
- InsureDefiPolicy.sol: Manages insurance policies for DeFi loans.
- InsuranceFactory.sol: Acts as a factory contract for deploying instances of InsureDefiWallet and InsureDefiPolicy contracts.
- Deploy Contracts: Deploy the InsureDefiWallet, InsureDefiPolicy, and InsuranceFactory contracts to the Ethereum blockchain.
npx hardhat run scripts/deploy.ts --network <network_name>
- Interact with InsuranceFactory: Use the functions provided by InsuranceFactory to create new instances of insurance contracts.
// Example of deploying a new InsureDefiWallet contract await insuranceFactory.deployWallet();
- Purchase Insurance: Users can purchase insurance policies by calling the
buyInsurance
function on the respective contract.// Example of buying insurance for a DeFi wallet await insureDefiWallet.connect(wallet).buyInsurance(policyType, {value: premiumAmount});
- Claim Insurance: In case of a claim, users can call the
claimInsurance()
function to receive compensation.// Example of claiming insurance for a DeFi wallet await insureDefiWallet.connect(wallet).claimInsurance();
- Clone the project repository from GitHub:
git clone https://github.com/livinalt/defi-insurance.git
- Install dependencies:
npm install
- Jeremiah Samuel - Smart contract development
- Email: [email protected]
This project is licensed under the MIT License.