-
Notifications
You must be signed in to change notification settings - Fork 178
e2e test that we drop vol. fee on ethflow native bridging order #4557
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
extrawurst
merged 4 commits into
main
from
e2e-verify-vol-fee-dropped-on-same-token-ethflow-order
Jun 26, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
435b274
drop vol. fee on ethflow sell=buy order
extrawurst 4459716
Merge branch 'main' into e2e-verify-vol-fee-dropped-on-same-token-eth…
extrawurst b2bcf58
Merge branch 'main' into e2e-verify-vol-fee-dropped-on-same-token-eth…
extrawurst 4bb494e
Merge branch 'main' into e2e-verify-vol-fee-dropped-on-same-token-eth…
extrawurst 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
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
Oops, something went wrong.
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.
Both assertions here (and the quote one above) check the absence of a fee, but nothing in this test proves the configured volume fee would otherwise apply on the ethflow path. If the wiring ever silently stopped charging the fee for an unrelated reason, this test would keep passing without exercising the same-token drop it's meant to guard.
Concretely, the volume policy only applies to
OrderClass::Limitorders (autopilot/src/domain/fee/policy.rs:92-104), and the ethflow order is classifiedLimitonly because itsfee_amountis zero (onchain_order_events/mod.rs:627-630). So the drop being tested is one of two reasons the fee could be absent.This is a low risk in practice —
volume_fee_dropped_on_same_tokeninprotocol_fee.rsalready pairs the same-token drop with a different-token positive control, and the underlyingget_applicable_volume_fee_factoris unit-tested forBUY_ETH_ADDRESS. So I'd treat this as optional, but a one-line note pointing at the existing positive-control test (or a brief comment that theLimitclassification is what makes this non-vacuous) would make the regression intent more robust to future changes.