flashbots / ethers-provider-flashbots-bundle

Flashbots provider for ethers.js
549 stars 215 forks source link

add getBaseFeeInNextBlock using the exact EIP1559 base fee calculation math #51

Closed botdad closed 3 years ago

botdad commented 3 years ago

https://twitter.com/bertcmiller/status/1443975548527591426

When calculating profit margins for submission it's useful to have a more accurate accounting of gas costs.

epheph commented 3 years ago

Tested this out, works great. After this merge, we should make another function that allows you to do a real calculation based on current block, THEN assume max explanations for the next X blocks.

Awesome PR, thanks!