Skip to content

feat: zero network fees in relay execute flow#8181

Open
matthewwalsh0 wants to merge 1 commit intomainfrom
feat/relay-zero-network-fees-execute
Open

feat: zero network fees in relay execute flow#8181
matthewwalsh0 wants to merge 1 commit intomainfrom
feat/relay-zero-network-fees-execute

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Mar 11, 2026

Explanation

When using the Relay execute flow (EIP-7702 + execute enabled), network fees are subsidized by the relayer for cross-chain transactions. This change zeroes out the displayed source network fees in the quote normalization step so users see the correct zero cost.

For same-chain transactions, network fees are only zeroed when the quote includes a subsidized fee from the relayer.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes Relay quote normalization to report zero sourceNetwork fees under specific execute/subsidy conditions, which could impact fee display and downstream totals if the gating logic is wrong. Covered by new unit tests but still touches quote/fee computation paths.

Overview
Adjusts Relay quote normalization so fees.sourceNetwork is zeroed out when the Relay execute flow is active on EIP-7702 chains and the transaction is cross-chain, or when a subsidized fee is present (including same-chain).

Updates calculateSourceNetworkCost to accept an isSubsidized flag and short-circuit fee calculation with zero amounts (and empty gasLimits) under these conditions, and adds focused unit tests plus a changelog entry documenting the behavior change.

Written by Cursor Bugbot for commit 10fca5b. This will update automatically on new commits. Configure here.

@matthewwalsh0 matthewwalsh0 force-pushed the feat/relay-zero-network-fees-execute branch 3 times, most recently from 306ba83 to b4c7277 Compare March 11, 2026 22:14
@matthewwalsh0 matthewwalsh0 force-pushed the feat/relay-zero-network-fees-execute branch from b4c7277 to 417a524 Compare March 11, 2026 22:29
@matthewwalsh0 matthewwalsh0 force-pushed the feat/relay-zero-network-fees-execute branch from 417a524 to 10fca5b Compare March 11, 2026 22:36
@matthewwalsh0 matthewwalsh0 changed the title feat: zero network fees in relay execute flow for cross-chain transactions feat: zero network fees in relay execute flow Mar 11, 2026
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review March 11, 2026 22:47
@matthewwalsh0 matthewwalsh0 requested review from a team as code owners March 11, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant