Skip to content

Latest commit

 

History

History
132 lines (84 loc) · 9.27 KB

README.md

File metadata and controls

132 lines (84 loc) · 9.27 KB

🫶 Donation Appreciation

Donation Appreciation is a donation dApp that accepts shitcoins (all ERC20 tokens). A donation campaign is registered in the smart contract, and it determines a runtime and $USDC target for the donation. When the donation hits the target value (in $USDC), UniSwap is used to swap all tokens for $USDC, before transferring the $USDC to the donation recipient address. To check if the donation ERC20 holdings are greater than the donation target before swapping, we created an EigenLayer AVS that verifies this.

⚙️ Built using EigenLayer, The Graph, Uniswap NextJS, Hardhat, and Wagmi.

  • 🗳️ Quickly create a donation campaign: On our frontend it's easy to setup a new campaign, just define a a campaign name, set a target (in $USDC) and you're ready to go.
  • 🪝 New Uniswap hooks: TODO
  • 🪙 Accept all ERC20: Donations can accept any ERC20 tokens, which will be swapped to $USDC at the end of the campaign.
  • 📈 Multiple ways to hit target: Reach your donation targets either by new donations or by increase in token price of current donations.
  • 🔐 Secured with Eigenlayer AVS: We use a custom EigenLayer AVS to verify the target is reached before swapping all ERC20 tokens to $USDC.

Diagram

diagram

Screenshots

Landing Page Create Campaign
Landing Page Create Page
Campaigns Overview Campaign details
Overview Page details Page

Hackathon tracks

Uniswap Foundation - Track 3: Pool Operators & Research

We customized the PoolSwapTest.sol to create the PoolBatchSwapTest contract, enabling efficient batch token swaps using the IPoolManager interface. This contract processes multiple swap parameters in a single transaction, making the process more gas-efficient. This solution is not only useful for our platform, but also showcases the novel applications of batch swapping that are possible on Uniswap. We deployed and verified the contract on Sepolia testnet, and included a testfile in a seperate repo (using Foundry).

Eigenlayer - Best use of EigenLayer AVS

We created our own Eigenlayer AVS to verify the total value of the donated ERC20 in a single campaign are at least equal to the campaign target in $USDC. When the EigenLayer stakers verify this, the campaign can close, swap all tokens to the target value in $USDC. When the swap is completed but the value turns out to be lower than the campaign target, validators get slashed. It's easy to verify, so the bonding period to withdraw can be very short in our case.

Also we fixed a bug in the Hello World repo, which caused issues when executing the make commands. After the hackathon we will submit a PR to the repo for this. Also we added 1 additional step in the readme, to help people get started more easily.

The Graph - Best New Subgraph

To query campaigns we created a subgraph that qustores eries newly created campaigns as Campaign entities. When donations are made or the campaign is closed, the Campaign entity is updated. We use the subgraph to query campaigns and show them on the overview page. Also we query individual campaigns to show the donation status and amounts on the campaign page.

Linea - Build any dapp on Linea

Smart contract deployed and verified here:

Mantle

Mantle - Best DeFi project

We created a unique batch swap feature to make our donation dApp more gas efficient. This batch swap feature is a seperate smart contract, that can be used for many novel applications. Both our DonationContgract and PoolBatchSwapTeset are deployed on Mantle.

Mantle - Best UX/UI project

Our donation tool accepts any ERC20 token and multiple ones can be sent in one transaction. This not only saves gas, but is probably the only way to directly donate all the random memecoins or other tokens sitting in our wallets.

Creating a fundraising campaign is also a matter of a few clicks. Anyone can start accepting donations in any token, and eventually have them automatically converted to USDC.

Optimism - Prototype a Superchain Superpower

The BatchSwap contract can leverage new usecases, such as the Donation Appreciation showcases. The BatchSwap is a gas efficient way to convert your portfolio to stables or ETH with one single transaction. We deployed our donation contract and batch swap contracts to Optimism.

Polygon - Launch a Creative MVP on Polygon Cardona

We created a unique donation platform that allows new ways of raising funds. The target can be reached by shilling the bags of the donation contract, making the donation campaign being able to hit their targets without additional donations. Deploying on the Cardona testnet was straight forward and easy, but we had trouble verifying the contracts.

Zircuit - Best Hackathon Project on Zircuit

Deploying in Zircuit was very easy, and also verification of the contracts was very straight forward. Only issue was the frontend intergration. On the Scaffold-ETH 2 starter repo we could integrate almost all chains using viem, but Zircuit isn't available yet. See the available chains here. We added it manually in our project, and will submit a PR to viem to make it available for future developers.

Links

Next steps

What can be improved?

  • Cross-chain campaigns - Currently, each campaign lives on a single chain. We are investigating the possibility of making campaigns cross-chain. This means executing the swap function on each chain simultaneously. Is it possible to have an EigenLayer AVS that validates data across different chains?
  • Filter out potential malicious actors - Use new AVS to filter donation creators (only accept legitimate fundraisers).
  • Optional filtering of accepted tokens - Campaigns could be directed to a more specific community.

Team

This project was build at EthPrague 2024 by: