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

Update profitability formula with gas price adjustment option #638

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

fab-10
Copy link
Collaborator

@fab-10 fab-10 commented Feb 29, 2024

Fixes https://github.com/Consensys/protocol-misc/issues/882

A new configurable amount is added to the calculated profitable priority fee per gas.
The new options to specify the amount, in wei, is plugin-linea-gas-price-adjustment, with a default of 0 wei

Other than implementing the feature, there are some refactoring:

  • Move all the profitability options in a dedicated class, since them are shared between multiple places
  • In the TransactionProfitabilityCalculator, removed the duplication of the formula

@fab-10 fab-10 force-pushed the update-profitability-formula-882 branch from 8e4d6e4 to 3e2ee8d Compare February 29, 2024 11:54
@fab-10 fab-10 changed the title Refactor profitability options and calculator + gas price adjustment … Update profitability formula with gas price adjustment option Feb 29, 2024
@fab-10 fab-10 marked this pull request as ready for review February 29, 2024 11:59
Copy link
Collaborator

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

think it makes sense, couple of minor comments

…option

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the update-profitability-formula-882 branch from 3e2ee8d to 9693de5 Compare March 5, 2024 09:22
@fab-10 fab-10 enabled auto-merge (squash) March 5, 2024 09:23
@fab-10 fab-10 merged commit d00e6f1 into main Mar 5, 2024
7 checks passed
@fab-10 fab-10 deleted the update-profitability-formula-882 branch March 5, 2024 09:33
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