InsuranceNFT is a decentralized application that allows users to purchase NFT-based insurance policies for their positions in a lending protocol. The insurance policies are represented as NFTs, and users can claim the insured amount if their position is liquidated.
- Integration with Lending Protocols: Fetch user positions from a lending protocol like AAVE or Compound.
- Purchase Insurance: Users can deposit USDC to purchase an NFT representing an insurance policy.
- Claim Insurance: Users can burn the NFT to claim the insured amount in USDC if their position is liquidated.
- Governance: The contract is governable, allowing for updates and management by a governance entity.
- Oracle Integration: Utilizes an oracle to determine the health of a position and whether a policy is claimable.
InsuranceNFT
: Main contract that handles the purchase, claim, and management of insurance policies.InsuranceOracle
: Oracle contract that determines whether a policy is claimable based on the health of the user's position.
-
Clone the Repository
git clone https://github.com/[YourUsername]/InsuranceNFT.git cd InsuranceNFT
-
Build Contracts
forge build
-
Deploy Contracts Replace <your_rpc_url> and <your_private_key> with your actual RPC URL and private key.
forge script script/InsuranceNFT.s.sol:InsuranceNFTScript --rpc-url <your_rpc_url> --private-key <your_private_key>
Ensure to have a local Ethereum node like Anvil running.
forge build
This project is in development. Use at your own risk. Always ensure to thoroughly test the smart contracts and have them audited before deploying them on the mainnet.
Contributions are welcome! Please read the contributing guidelines first.
MIT