-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Remove HasNoEther, HasNoTokens, HasNoContracts, and NoOwner #1254
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0a78670
remove HasNoEther, HasNoTokens, HasNoContracts, and NoOwner
frangio 9dd1308
remove unused ERC223TokenMock
frangio 8547879
remove Contactable
frangio 11cbf5b
remove TokenDestructible
frangio 4f3d67f
remove DeprecatedERC721
frangio d131f73
inline Destructible#destroy in Bounty
frangio f334bdf
remove Destructible
frangio 0538ebd
Merge remote-tracking branch 'upstream/master' into remove-has-no-x
frangio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
inline Destructible#destroy in Bounty
- Loading branch information
commit d131f73bb77c00c888e0fb7b98933610735194c4
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not strictly related to this PR since it's a Bounty concern, but doesn't this open for the possibility of a researcher finding a vulnerability, exploiting it (i.e. causing
_target.checkInvariant()to return false) and then callingclaim, only to be front-runned by the owner, who retrieves the reward and now has information on a vulnerability on his contract?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.
(if the answer is yes, we should obviously open an issue instead of addressing this here)
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.
yeah. should probably just remove the asyncTransfer to fix this
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.
It's true, that's a problem. How does removing
asyncTransferfix it though?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.
ah, I thought the atomic swap would prevent the frontrunning here, but they could still watch for claim transactions that would succeed and then destroy the contract ahead of time.
sounds like we need a commit reveal timeout here; when a researcher calls
createTargetthis starts a timeout that must expire before the contract can be destroyed. the researcher then calls claim, which checks for a valid commitment and checks the invariant, then pays out synchronously and invalidates the timeout.the timeout allows the owner to destroy the contract after it's expired, in the case that someone calls
createTargetbut doesn't exploit the target. A more comprehensive bounty contract would have researchers provide some stake of their own to prevent sybil attacks and infinitely blocking a bounty-supplier's ETH for the cost of gas.