Conversation
HOOK-826 Fix vulnerability related to bidders who revert on refunds
Currently, a bidder can prevent themselves from being outbid by reverting on refunds received. |
…vulnerability-related-to-bidders-who
regynald
approved these changes
May 2, 2022
Contributor
regynald
left a comment
There was a problem hiding this comment.
Small nit. Can discuss later
| @@ -0,0 +1,25 @@ | |||
| pragma solidity ^0.8.10; | |||
|
|
|||
| import "../../../interfaces/IHookCoveredCall.sol"; | |||
Contributor
There was a problem hiding this comment.
Should we start doing direct imports instead of long relative import paths like this?
Maybe if it's a ../ relative is fine. Otherwise direct
Contributor
Author
|
What is direct?
*Jake Nyquist*
*CEO @ Hook ( https://hook.xyz )*
Telegram: @jakenyquist
Twitter: @jake_nyquist
…On Mon, May 2 2022 at 2:11 PM, Regynald Augustin < ***@***.*** > wrote:
***@***.**** approved this pull request.
Small nit. Can discuss later
In src/test/utils/mocks/MaliciousBidder.sol (
#4 (comment) ) :
> @@ -0,0 +1,25 @@
+pragma solidity ^0.8.10;
+
+import
"../../../interfaces/IHookCoveredCall.sol";
Should we start doing direct imports instead of long relative import paths
like this?
Maybe if it's a../ relative is fine. Otherwise direct
—
Reply to this email directly, view it on GitHub (
#4 (review) ) ,
or unsubscribe (
https://github.com/notifications/unsubscribe-auth/ACD6HPZBH757VIYMIY4NEZ3VIALFJANCNFSM5UP3JZMQ
).
You are receiving this because you authored the thread. Message ID: <hookart/protocol/pull/4/review/959386403
@ github. com>
|
Contributor
https://docs.soliditylang.org/en/v0.8.11/path-resolution.html#imports |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When a bidder is outbid, we return the money to them. Currently, they are able to cause the competing bid's call to revert by bidding with a contract that throws when payments are sent.
This fixes that issue and creates a test case to ensure that, even if a bidder attempts to avoid refunds, someone else can outbid them (and settle etc).