Skip to content
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

added claim check + bitmap #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

FreezyEx
Copy link

Credits: Uniswap MerkleDistributor

Gas Snapshot:

test_claim() (gas: -113926 (-16.069%))  
test_prove() (gas: -646558 (-60.497%))

@merklejerk
Copy link
Contributor

Ooooh thanks for bringing my attention to the missing hasClaimed check! I patched it in main. 😓
But I think this version doesn't address the vulnerability since you can still could claim multiple times for a member just by using a different index to the bitmap. I also think the bitmap is a bit distracting from the pattern being illustrated because I think bitmaps are cool enough to deserve their own guide. If you want to write one, I'd be very interested.

@FreezyEx
Copy link
Author

My bad, I forgot to add the index parameter to the generation of the tree and in the prove phase.

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.

2 participants