From 2045947ea7a6a16527919bd6246a0a492b6b4cdc Mon Sep 17 00:00:00 2001 From: Andrey Kopylov Date: Mon, 11 Dec 2023 15:24:51 +0500 Subject: [PATCH] [defence-for-gas-limit] add comment --- src/contracts/vaultMulticall.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/contracts/vaultMulticall.ts b/src/contracts/vaultMulticall.ts index 0ce240a1..c2bfff94 100644 --- a/src/contracts/vaultMulticall.ts +++ b/src/contracts/vaultMulticall.ts @@ -104,6 +104,10 @@ const vaultMulticall = async (values: VaultMulticallInput): P } as T } + // Even though ethers tries to find the best price for gas, sometimes it's + // not enough and the transaction breaks down and users lose money for gas. + // Adding 10% to the gas limit + if (isSoloCall) { const { method, args } = params[0]