-
Notifications
You must be signed in to change notification settings - Fork 75
improve: Add appliedRelayerFeePct to FillRelay event #133
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
| bool isSlowRelay | ||
| ) internal { | ||
| emit FilledRelay( | ||
| relayHash, |
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 removed this to get around a stack too deep error but also realized we don't use relayHash in the current client code so its a reasonable delete
|
Note, this PR will require changing the |
…tocol/contracts-v2 into npai/fill-relay-event
Emitting both the original and the updated
relayerFeePctallows off-chain clients to distinguish between correctly and incorrectly sped upfillRelaycalls with updated relayer fee %'s. Currently, the client has no way to determine if aFillRelayevent emitted by a speed up relay (i.e. callingfillRelayWithUpdatedFee) was a valid fill or not.The current exploit would be to call
fillRelayfor adepositwith ALL of the correct params except forrelayerFeePct, which the attacker would set to something lower than expected like0. Clients would not be able to easily detect if this modifiedrelayerFeePct=0came from a correctfillRelayWithUpdatedFeecall.