Skip to content
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

feat: make surcharges settable #461

Merged
merged 3 commits into from
Dec 6, 2024
Merged

feat: make surcharges settable #461

merged 3 commits into from
Dec 6, 2024

Conversation

BenSparksCode
Copy link
Contributor

@BenSparksCode BenSparksCode commented Dec 4, 2024

Changes:

  • Store Atlas and Bundler surcharge rates in a shared storage slot, instead of constants.
  • Allow surchargeRecipient to change these surcharge rates.
  • Removed adjustedDeposits var from _adjustAccountingForFees() as it wasn't used at all, to alleviate Stack Too Deep.

Contract Size Impact

Contract Before Only Atlas Atlas + Bundler
Atlas.sol 24,107 (469) 23,939 (637) 23,822 (754)

Gas Cost Impact

Test Before Only Atlas Atlas + Bundler Diff
Atlas Swap Intent with Basic RFQ 385,450 387,818 387,948 2,498
Ex Post Ordering 1,291,164 1,293,641 1,293,855 2,691
Chainlink OEV Standard Version 437,902 440,270 440,422 2,520
Treble Swap Metacall ERC20 to ERC20 with One Solver 682,768 685,136 685,266 2,498
Treble Swap Metacall ETH to ERC20 with One Solver 547,424 549,792 549,944 2,520

@BenSparksCode BenSparksCode marked this pull request as ready for review December 4, 2024 13:55
@BenSparksCode BenSparksCode requested review from thogard785, jj1980a, 0x1NotMe and marshabl and removed request for thogard785 December 4, 2024 13:55
Copy link
Contributor

@0x1NotMe 0x1NotMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

There are some lint errors on the build

Base automatically changed from gas-model-fixes to atlas-v1.3 December 6, 2024 08:44
@BenSparksCode BenSparksCode merged commit f21c2d9 into atlas-v1.3 Dec 6, 2024
2 of 3 checks passed
@BenSparksCode BenSparksCode deleted the set-surcharges branch December 6, 2024 08:44
@BenSparksCode BenSparksCode mentioned this pull request Dec 6, 2024
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.

3 participants