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: smart tx optional prority fee #85

Closed

Conversation

sarmatdev
Copy link

Resolves #81

Copy link
Collaborator

@0xIchigo 0xIchigo left a comment

Choose a reason for hiding this comment

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

gm and thank you for your contribution! There seems to be a bit of a mix-up with resolving #81 — this isn't just about using a user-provided priority fee, as that defeats the purpose of fetching and using the most optimal priority fee. Instead, the user should provide an upper limit to cap what the priority fee used is. This way, users can limit the priority fee to a certain range instead of what is being returned by the Priority Fee API

Consider the following scenarios where we cap priority fees at 10k:

  • If the priority fee estimate based on the serialized transaction is 5k, then we'd use 5k
  • If the priority fee estimate based on the serialized transaction is 10k, then we'd use 10k
  • If the priority fee estimate based on the serialized transaction is 15k, then we'd use 10k

The idea here is to cap the priority fees at some number and take the minimum of the user-provided cap and the estimate returned by the Priority Fee API

@sarmatdev
Copy link
Author

gm ser, delivered the fix

@sarmatdev sarmatdev closed this by deleting the head repository Nov 9, 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.

Add a Priority Fee Cap For Smart Transactions
2 participants