Skip to content

Commit

Permalink
Merge pull request #43 from MXCzkEVM/feat-adjust-priceoracle
Browse files Browse the repository at this point in the history
feat: adjust price oracle
  • Loading branch information
luanxu-mxc committed Aug 1, 2023
2 parents 9493a41 + 79d0486 commit 922d8cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/gasprice/gasprice.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (oracle *Oracle) SuggestTipCap(ctx context.Context) (*big.Int, error) {
}

// CHANGE(MXC): When there are network restrictions, the baseFee should be increased here to avoid transaction delays. The minimum bid is 100,000 gwei.
price = price.Add(price, new(big.Int).Div(head.BaseFee, big.NewInt(20)))
price = price.Add(price, new(big.Int).Div(head.BaseFee, big.NewInt(9)))
if head.BaseFee.Cmp(big.NewInt(1e13)) < 0 {
price = new(big.Int).Add(price, new(big.Int).Sub(big.NewInt(1e13), head.BaseFee))
}
Expand Down

0 comments on commit 922d8cf

Please sign in to comment.