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
The function calls the odosRouterV2 contract to execute the swap without passing or verifying a minimum acceptable output amount.
Marked at @> (bool success, bytes memory result)....
Decoding Result Without Verification:
The output from the swap is decoded and returned without validating whether it satisfies any slippage tolerance or minimum output criteria.
Marked at @> return abi.decode(result, (uint256));
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The function blindly executes the swap with the assembled data without validating the
minimum output amount. This could allow MEV bots to extract value through sandwich attacks
or allow significant value loss if market conditions change between transaction submission
and execution.
No response
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered:
Perfect Coffee Aardvark
Medium
Missing Slippage Protection in Token Swaps Medium Risk
Summary
The
swapCollateralForUSDT
function in Treasury.sol executes swaps through ODOS withoutany slippage protection.
Root Cause
In Treasury.sol
Key Issues (Lines Marked @>):
External Call Without Minimum Output Check:
The function calls the
odosRouterV2
contract to execute the swap without passing or verifying a minimum acceptable output amount.Marked at @>
(bool success, bytes memory result)....
Decoding Result Without Verification:
The output from the swap is decoded and returned without validating whether it satisfies any slippage tolerance or minimum output criteria.
Marked at @>
return abi.decode(result, (uint256));
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The function blindly executes the swap with the assembled data without validating the
minimum output amount. This could allow MEV bots to extract value through sandwich attacks
or allow significant value loss if market conditions change between transaction submission
and execution.
No response
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: