diff --git a/package-lock.json b/package-lock.json index c681a85a..f05bfba0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@debridge-finance/dln-taker", - "version": "2.15.6", + "version": "2.15.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@debridge-finance/dln-taker", - "version": "2.15.6", + "version": "2.15.7", "license": "GPL-3.0-only", "dependencies": { "@debridge-finance/dln-client": "8.0.0", diff --git a/package.json b/package.json index db5013d8..149af50e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@debridge-finance/dln-taker", - "version": "2.15.6", + "version": "2.15.7", "description": "DLN executor is the rule-based daemon service developed to automatically execute orders placed on the deSwap Liquidity Network (DLN) across supported blockchains", "license": "GPL-3.0-only", "author": "deBridge", diff --git a/src/processors/universal.ts b/src/processors/universal.ts index e1256fe8..d3664b16 100644 --- a/src/processors/universal.ts +++ b/src/processors/universal.ts @@ -40,7 +40,8 @@ import { assert } from '../errors'; // reasonable multiplier for gas price to define max gas price we are willing to // bump until. Must cover up to 12.5% block base fee increase -const EVM_FULFILL_GAS_PRICE_MULTIPLIER = 1.125; +const EVM_FULFILL_GAS_PRICE_MULTIPLIER = 1.075; +const EVM_FULFILL_GAS_LIMIT_MULTIPLIER = 1.05; // defines max batch_unlock size const BATCH_UNLOCK_MAX_SIZE = 10; @@ -699,6 +700,7 @@ class UniversalProcessor extends BaseOrderProcessor { data: preliminaryEvmFulfillTx.data, value: preliminaryEvmFulfillTx.value.toString(), }); + evmFulfillGasLimit *= EVM_FULFILL_GAS_LIMIT_MULTIPLIER; logger.debug( `estimated gas needed for the fulfill tx with roughly estimated reserve amount: ${evmFulfillGasLimit} gas units`, ); @@ -840,9 +842,10 @@ class UniversalProcessor extends BaseOrderProcessor { }; try { - txToSend.gasLimit = await ( - this.takeChain.fulfillProvider as EvmProviderAdapter - ).estimateGas(txToSend); + const gas = await (this.takeChain.fulfillProvider as EvmProviderAdapter).estimateGas( + txToSend, + ); + txToSend.gasLimit = gas * EVM_FULFILL_GAS_LIMIT_MULTIPLIER; logger.debug(`final fulfill tx gas estimation: ${txToSend.gasLimit}`); } catch (e) { const message = `unable to estimate fullfil tx: ${e}`;