Skip to content

Merkle Distributor #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

efecarranza
Copy link

Changelog

Add contract to distribute earned fees via a merkle airdrop.
Add tests.

@agileurbanite
Copy link

@efecarranza it's unclear how fees are distributed to users? Can you share more details?

@ssallam
Copy link
Contributor

ssallam commented Mar 5, 2024

Code looks good. Is there a way to verify the epoch rewards against the added merkletree instead of just checking that there is some value included in the call?

Tests are missing testing of doing a claim and checking isClaimed. We can also add a test to create an actual merkletree and test the claim mechanism.

The FeeSharing contract accepts funds and keeps track of each NFT's balance. With this new approach we have to modify the FeeSharing contract to work with the new FeeDistributor contract.

@efecarranza
Copy link
Author

efecarranza commented Mar 6, 2024

@ssallam oops, i forgot to push the code where i reached 100% test coverage 🤦 my bad! i had all that, hope this helps.
Regarding FeeSharing, you have to send funds to it per tokenId, the idea behind FeeDistributor in my mind would be to replace that mechanism with this one.

Regarding the checking of the epoch rewards vs. the tree, I don't know if there's a way to do that, but we could pass the amount as a param.

Let me know if you'd like to meet to discuss.

@agileurbanite The user would call the function claim() in order to receive their accrued fees.

@efecarranza
Copy link
Author

@ssallam adding the design doc i had written

https://hackmd.io/POQ3g3-IS1WWnCfuPGmRVw

@efecarranza
Copy link
Author

The root can also be updated and not be done via epoch if the script is going to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants