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

Revert if prize has already been claimed #100

Merged
merged 1 commit into from Mar 21, 2024

Conversation

trmid
Copy link
Member

@trmid trmid commented Mar 21, 2024

The claimer already handles claims that revert and continues with the rest of the batch, so there's no need to return zero in the prize pool when a double claim occurs. Instead, it can revert so the caller can know something wrong has occurred.

This change along with a related change in the Claimer contract will mitigate the prize vault hook claim reentrancy griefing attack.

Copy link

linear bot commented Mar 21, 2024

Copy link

LCOV of commit 8ffc465 during Tests with 100% Coverage #464

Summary coverage rate:
  lines......: 100.0% (419 of 419 lines)
  functions..: 100.0% (67 of 67 functions)
  branches...: no data found

Files changed coverage rate:
                                             |Lines       |Functions  |Branches    
  Filename                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================
  src/PrizePool.sol                          | 100%    187| 100%    36|    -      0

@trmid trmid merged commit 7e31113 into main Mar 21, 2024
2 checks passed
@trmid trmid deleted the gen-1233-m-345-prize-claim-reentrancy branch March 21, 2024 22:15
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.

None yet

2 participants