You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the contract AutoCompoundingPodLp function _swapV2 if there is more than one swap the _twoHops bollean will be turned to true the problem is that _amountOutMin in line 374 shouldnt be calculated with (_amountOutMin * maxSwap[_path[0]]) / _amountIn; if there is another swa (_amountOutMin * maxSwap[_path[0]]) / _amountIn; instead should be calculated with the second maxSwap[_path[`]]
Sneaky Zinc Narwhal
Medium
_amountOutMin should be override
Summary
in the contract AutoCompoundingPodLp function _swapV2 if there is more than one swap the _twoHops bollean will be turned to true the problem is that _amountOutMin in line 374 shouldnt be calculated with
(_amountOutMin * maxSwap[_path[0]]) / _amountIn;
if there is another swa (_amountOutMin * maxSwap[_path[0]]) / _amountIn; instead should be calculated with the second maxSwap[_path[`]]https://github.com/sherlock-audit/2025-01-peapods-finance/blob/main/contracts/contracts/AutoCompoundingPodLp.sol#L374
Root Cause
in AutoCompoundingPodLp line 274 _amountOutMin will also be calculated even if there is another trade
Internal Pre-conditions
nothing
External Pre-conditions
nothing
Attack Path
nothing
Impact
might lead to revert
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: