From 96a7e16721dc89bb62ede0cb178160e2403ca616 Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Thu, 15 Jan 2026 17:02:08 +0000 Subject: [PATCH] fix: polygon settler failing due to insufficient gas priority fee --- packages/financial-templates-lib/src/helpers/GasEstimator.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/financial-templates-lib/src/helpers/GasEstimator.ts b/packages/financial-templates-lib/src/helpers/GasEstimator.ts index 0348d3b084..14f22306bd 100644 --- a/packages/financial-templates-lib/src/helpers/GasEstimator.ts +++ b/packages/financial-templates-lib/src/helpers/GasEstimator.ts @@ -316,7 +316,8 @@ export class GasEstimator { throw new Error(`Bad polygon response ${json}`); const maxFeePerGas = Number(polygonResponse.fast.maxFee) * 2; - const maxPriorityFeePerGas = Number(polygonResponse.fast.maxPriorityFee); + // Polygon requires minimum 25 gwei priority fee; enforce 30 gwei minimum for safety margin. + const maxPriorityFeePerGas = Math.max(Number(polygonResponse.fast.maxPriorityFee), 30); if (Number.isNaN(maxFeePerGas) || Number.isNaN(maxPriorityFeePerGas)) { throw new Error(`Bad polygon response ${json}`);