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 a H-5 issue with all the necessary details #16

Open
wants to merge 1 commit into
base: audit-data
Choose a base branch
from

Conversation

Oleh325
Copy link

@Oleh325 Oleh325 commented May 12, 2024

Added a new finding of a high-severity issue

```
We also don't check that the winner is not `address(0)` in the `PuppyRaffle::selectWinner` function. That means that a zero address could be selected as winner, and the contract would send the prize pool to the zero address.

**Impact:** This could not only lead to a loss of fees (the contract will pay the winner more than it was supposed to) but also to a loss of the ability to pay out the winners, as the contract won't have enough funds to do so.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would always revert btw, because we OpenZeppelin's ERC721 contract will not allow minting the NFT to the zero address.

https://github.com/RamanSB/Audits/blob/master/puppy-raffle-audit.pdf

See [M-2] & [M-3]

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh indeed! Thanks for pointing that out :)

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