diff --git a/packages/relayer/processor/is_profitable.go b/packages/relayer/processor/is_profitable.go index 8ce2436b39f..f4081a88220 100644 --- a/packages/relayer/processor/is_profitable.go +++ b/packages/relayer/processor/is_profitable.go @@ -35,9 +35,9 @@ func (p *Processor) isProfitable( return shouldProcess, errImpossible } - // if processing fee is higher than baseFee * gasLimit, + // if processing fee is higher than baseFee * 2 +gasTipCap + gasLimit, // we should process. - estimatedOnchainFee := (destChainBaseFee + gasTipCap) * uint64(gasLimit) + estimatedOnchainFee := ((destChainBaseFee * 2) + gasTipCap) * uint64(gasLimit) if fee > estimatedOnchainFee { shouldProcess = true } diff --git a/packages/relayer/processor/is_profitable_test.go b/packages/relayer/processor/is_profitable_test.go index 85df082a860..f4e942999ba 100644 --- a/packages/relayer/processor/is_profitable_test.go +++ b/packages/relayer/processor/is_profitable_test.go @@ -33,7 +33,7 @@ func Test_isProfitable(t *testing.T) { { 1, "profitable", - 600000000600001, + 7000000000600001, 600000, 1000000000, 1,