We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 644965e commit be22df4Copy full SHA for be22df4
src/strategies/libs/SiloAdvancedLib.sol
@@ -140,6 +140,9 @@ library SiloAdvancedLib {
140
swapPriceImpactTolerance0
141
);
142
143
+ // explicit error for the case when _estimateSwapAmount gives incorrect amount
144
+ require(IERC20(token).balanceOf(address(this)) >= amount + feeAmount, IControllable.InsufficientBalance());
145
+
146
// pay flash loan
147
IERC20(token).safeTransfer(flashLoanVault, amount + feeAmount);
148
0 commit comments