-
Notifications
You must be signed in to change notification settings - Fork 75
fix: Prevent partial fills with messages #278
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
Conversation
pxrl
left a comment
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.
I think this is OK and protects against the scenario identified. It would be nice to be able to support partial fills in order to allow multiple relayers to contribute to a complete fill, but I can't see a simple and fair way to make that work at this point.
| // a message is sent multiple times for multiple partial fills. | ||
| require( | ||
| relayExecution.relay.amount == fillAmountPreFees || relayExecution.updatedMessage.length == 0, | ||
| "invalid partial fill message" |
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.
| "invalid partial fill message" | |
| "invalid partial fill (message)" |
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.
you think this improves the error message a bit? I'm not convinced but curious what you were thinking?
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.
you think this improves the error message a bit? I'm not convinced but curious what you were thinking?
Yeah..even though I know exactly what the issue is, I have trouble parsing "invalid partial fill message" in my head. How about this?
| "invalid partial fill message" | |
| "invalid message on partial fill" |
Alternatively:
| "invalid partial fill message" | |
| "non-zero message on partial fill" |
|
Closed in favor of more flexible PR: #279 |
Protects against edge cases where a
messageis sent multiple times to therecipient, who holds an unexpected amount of tokens.