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

Improve OP fee estimation #196

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open

Improve OP fee estimation #196

wants to merge 2 commits into from

Conversation

lok52
Copy link
Collaborator

@lok52 lok52 commented Jul 22, 2023

Improvements for OP fee estimation:

  • Account for extra RLP encoding overhead for base estimations
  • Account for oracle's scalar value for base fee estimation
  • Fix fee validation on relayer side

Results:
Relayer estimations were done using gas price values from block explorer for particular transactions. Native price feed was used for more demonstrative comparison.

Permittable deposit (link):
Size - 946 bytes
Actual fee - 0.000174409090047087 ETH
Relayer estimation - 0.000174873388706732 ETH
Difference - +0.26% (user overpays)

Transfer with four notes (link):
Size - 1542 bytes
Actual fee - 0.00052285667596097 ETH
Relayer estimation - 0.000522136726108933 ETH
Difference - -0.13% (user underpays)

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.

1 participant