Skip to content

Commit

Permalink
bump tx fees
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Nov 4, 2022
1 parent c62fab2 commit e85dea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions services/construction/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
// Multipliers used for setting tx fees to a value unlikely to be too low for current block
// inclusion. TODO: Add command-line params to set these to non-default values.
baseFeeMultiplier float64 = 2.0
tipMultiplier float64 = 1.2
tipMultiplier float64 = 2.0
)

// multiplyBigInt multiplies i and multiplier using a big.Float with the result rounded to the
Expand Down Expand Up @@ -141,10 +141,10 @@ func (a *APIService) ConstructionMetadata(
return nil, svcErrors.WrapErr(svcErrors.ErrGeth, err)
}

// Ensure the gas tip is at least 30 gwei. This is the minimum gas price recommended by the Polygon team.
// Ensure the gas tip is at least 40 gwei. This is the minimum gas price recommended by the Polygon team.
// See https://forum.polygon.technology/t/recommended-min-gas-price-setting/7604 for additional context.
// This minimum must be applied to the tip, not the cap to effectivley mitigate spam (since the tip goes to miners)
minTip := big.NewInt(30000000000) // 30 gwei
minTip := big.NewInt(40000000000) // 40 gwei
if minTip.Cmp(gasTip) == 1 {
gasTip = minTip
}
Expand Down
2 changes: 1 addition & 1 deletion services/construction/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestMetadata(t *testing.T) {
},
},
},
"happy path: native currency with low estimated gas tip overriden to 30 gwei": {
"happy path: native currency with low estimated gas tip overridden to 40 gwei": {
options: map[string]interface{}{
"from": metadataFrom,
"to": metadataTo,
Expand Down

0 comments on commit e85dea9

Please sign in to comment.