UMAprotocol / protocol

UMA Protocol Running on Ethereum
https://uma.xyz
GNU Affero General Public License v3.0
361 stars 175 forks source link

fix: maxFeePerGas cannot be less than maxPriorityFeePerGas #4667

Closed Reinis-FRP closed 7 months ago

Reinis-FRP commented 7 months ago

Motivation

GasEstimator is using hardcoded maxPriorityFeePerGas for some of networks. This can cause errors if estimated maxFeePerGas gets below this.

Summary

Enforce that maxFeePerGas is not set below maxPriorityFeePerGas.

Details

We experienced the error recently on Polygon where estimated maxFeePerGas got below hardcoded 50 GWei maxPriorityFeePerGas

Testing

Check a box to describe how you tested these changes and list the steps for reviewers to test.

Issue(s)

Fixes #XXXX