-
-
Notifications
You must be signed in to change notification settings - Fork 276
Description
In calculating maxPriorityFeePerGas as following code:
Line 75 in 1dadf04
| const adjustedPriorityFee = medianPriorityFee |
const medianPriorityFee = medianOf(priorityFees);
const adjustedPriorityFee = medianPriorityFee
.mul(settings.priorityFeePercentageMultiplier)
.divn(100);
If minimum priority fee in block history is same to the median value, then the tx having 97% of the median as
maxPriorityFeePerGas may not be accepted by txpool.
For example, let's assume the following situation.
priorityFees = [10, 10, 10, 10, 10, 11, 12, 13, 14]
median is 10 (5th element)
and adjustedPriorityFee = 9.7 (10 * 97%)
So txpool may reject the tx because of the priorityFee less than min value.
Actually, some chain uses fixed priorityFee to have the all same effectivePriorityFeePerGas in block fee history so
metamask fails to send a transaction without manual setting of gas.
Are you willing to improve this?
How about to use median * 97% but at least set it to be greater than min?