Skip to content

perf: update fastswap gas limits#917

Merged
owen-eth merged 1 commit intomainfrom
optimize-fastswap-gas-limit
Apr 13, 2026
Merged

perf: update fastswap gas limits#917
owen-eth merged 1 commit intomainfrom
optimize-fastswap-gas-limit

Conversation

@owen-eth
Copy link
Copy Markdown
Contributor

@owen-eth owen-eth commented Apr 7, 2026

Describe your changes

Switched gas limit calculation from Barter's gasLimit (heavily padded, avg ~917k) to gasEstimation × 2.5 + 135k (permit) / + 152k (ETH). The fixed overhead covers settlement contract + permit2 gas, and the 2.5x multiplier covers swap route variance. Validated against 454 txs with zero failures. Reduces avg gas limit from ~917k to ~436k (52%), directly cutting bid costs proportionally.

Issue ticket number and link

Fixes # (issue)

Checklist before requesting a review

  • I have added tests that prove my fix is effective or that my feature works
  • I have made corresponding changes to the documentation

@owen-eth owen-eth requested a review from harshsingh1002 April 7, 2026 18:43
@owen-eth owen-eth merged commit 09b55b1 into main Apr 13, 2026
7 checks passed
@owen-eth owen-eth deleted the optimize-fastswap-gas-limit branch April 13, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants