-
Notifications
You must be signed in to change notification settings - Fork 435
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
DRAFT: fix audit issue 184 #871
DRAFT: fix audit issue 184 #871
Conversation
this will cause cancels to revert
✅ Deploy Preview for nouns-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for nouns-home ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -75,6 +75,7 @@ contract StreamEscrow is IStreamEscrow { | |||
) { | |||
daoExecutor = daoExecutor_; | |||
ethRecipient = ethRecipient_; | |||
require(nounsRecipient_ != address(0), 'zero address'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please put this requirement at the top of the function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -279,6 +280,7 @@ contract StreamEscrow is IStreamEscrow { | |||
* @notice Allows the DAO to set the address that the Nouns tokens will be sent to when streams are canceled. | |||
*/ | |||
function setNounsRecipient(address newAddress) external onlyDAO { | |||
require(newAddress != address(0), 'zero address'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please add natspec that explains why we aren't accepting zero address, i.e. explain the potential griefing scenario briefly? something like:
"newAddress cannot be the zero address because that would cause all stream cancellations to revert, since the Nouns token contract does not permit sending tokens to the zero address"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
4285edb
into
verbs-stream-escrow-nouner-can-create-stream
No description provided.