diff --git a/changelog.md b/changelog.md index d143155c19..a19f265831 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ ### Fixes +* [1672](https://github.com/zeta-chain/node/pull/1672) - paying 50% more than base gas price to buffer EIP1559 gas price increase * [1642](https://github.com/zeta-chain/node/pull/1642) - Change WhitelistERC20 authorization from group1 to group2 * [1610](https://github.com/zeta-chain/node/issues/1610) - add pending outtx hash to tracker after monitoring for 10 minutes diff --git a/zetaclient/broadcast.go b/zetaclient/broadcast.go index 97870d3791..a40fc04743 100644 --- a/zetaclient/broadcast.go +++ b/zetaclient/broadcast.go @@ -25,6 +25,12 @@ const ( DefaultBaseGasPrice = 1_000_000 ) +var ( + // paying 50% more than the current base gas price to buffer for potential block-by-block + // gas price increase due to EIP1559 feemarket on ZetaChain + bufferMultiplier = sdktypes.MustNewDecFromStr("1.5") +) + // Broadcast Broadcasts tx to metachain. Returns txHash and error func (b *ZetaCoreBridge) Broadcast(gaslimit uint64, authzWrappedMsg sdktypes.Msg, authzSigner AuthZSigner) (string, error) { b.broadcastLock.Lock() @@ -44,7 +50,7 @@ func (b *ZetaCoreBridge) Broadcast(gaslimit uint64, authzWrappedMsg sdktypes.Msg } reductionRate := sdktypes.MustNewDecFromStr(ante.GasPriceReductionRate) // multiply gas price by the system tx reduction rate - adjustedBaseGasPrice := sdktypes.NewDec(baseGasPrice).Mul(reductionRate) + adjustedBaseGasPrice := sdktypes.NewDec(baseGasPrice).Mul(reductionRate).Mul(bufferMultiplier) if blockHeight > b.blockHeight { b.blockHeight = blockHeight