Description

Phoenix Guard

Decentralized insurance protocol with trustless disputes, made on ETH Belgrade hackathon.

The first case we implemented for this hackathon is insurance on tokens burned by mistake. Currently there is a big problem where more than $1,000,000 value in ETH and various ERC20 tokens gets burned every month by users which are not careful.We made a protocol where user can get insured for a desired period of time, and select tokens which he want to insure of burning. 

User can choose to insure multiple wallet addresses. Price is calculated based on the amount of addresses insured and chosen tokens. On successfull buy user gets BurnInsurance non-transferable NFT.

If it happens that user burns his tokens by mistake, and if he has valid BurnInsurance NFT, he can claim insurance from the contract. To prove that tokens are really burned, we are using "Chainlink Functions" (product currently in Beta) to run the off-chain code on decenralized way, which will check given transaction hash and if burn really happend.

If it confirms, it will write that attestation to the Ethereum Attestation Service, which will inform PheounixGuard contract that attestation happened, and that it can cover back user which burned the tokens. Cover is currently set to 50% of burned tokens, and maximum of 10 ethers.

We also implemented Metamask Snap which will guard users from burning their tokens. It has a list of addresses which are marked as not safe to send funds - those are invalid addresses (like 0x0) or contracts which doesn't implement any kind of withdrawing possibility - and if it recognizes that user trys to send tokens to one of those addresses, it will give a warning.


Presentation:
https://docs.google.com/presentation/d/12zmon5xeFrq3lyUb4HUP-1IzYnicStkqWHDY9AlSWkM/edit?usp=sharing


App: https://phoenixguard.vercel.app/

Smart contrats and frontend: https://github.com/duxxud/PhoenixGuard
Metamask snap: https://github.com/kitanovicd/Metamask-Burn-Flask

Smart contract address (Sepolia): 0x03BF388f104F3C8196ec4BEf194aE295f5EF2406

Ethereum Attestation Service Bounty:
https://github.com/duxxud/PhoenixGuard/blob/main/packages/hardhat/contracts/FunctionClient.sol#L70


Metamask Snaps Bounty:
https://github.com/kitanovicd/Metamask-Burn-Flask/blob/main/packages/snap/src/index.ts

App Demo Recording:
https://drive.google.com/file/d/13bMkqY4oPrl0rLU3_4jFGTxlE1KXpkFu/view?usp=sharing



Attachments