ethereum_block_scanner.go
The method updateGasPriceV3 calculates the gas price based on the 25th percentile of priority fees added to the base fee. However, rounding up the calculated gas price before adjusting it with the resolution might lead to predictable gas price fluctuations. This can be potentially exploited by miners or other users to influence transaction inclusion or costs.
Code snippet:
Expected Behavior: The gas price should be calculated securely and should not allow for potential manipulations. Proper rounding after adjusting to the resolution can help prevent this.
Expected Behavior code snippet:
Logic:
Actual Behavior: The rounding logic can be exploited due to premature rounding up of the gas price before adjusting to the resolution.
Actual Behavior code snippet:
Logic:
