Skip to content

Commit

Permalink
feat: increase SuggestTipCap of basefee 5%.
Browse files Browse the repository at this point in the history
  • Loading branch information
luanxu-mxc committed Jul 15, 2023
1 parent 8f67f38 commit 6341370
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eth/gasprice/gasprice.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) {
if price.Cmp(oracle.maxPrice) > 0 {
price = new(big.Int).Set(oracle.maxPrice)
}

// CHANGE(MXC): When there are network restrictions, the baseFee should be increased here to avoid transaction delays.
price = price.Add(price, new(big.Int).Div(head.BaseFee, big.NewInt(20)))

oracle.cacheLock.Lock()
oracle.lastHead = headHash
oracle.lastPrice = price
Expand Down

0 comments on commit 6341370

Please sign in to comment.