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 CurveLiqArbitrage.sol#L33-#L56 function fails to validate the return values of last_prices() and coins(0) from the curvePool contract, which can lead to unexpected behavior. A user can input a malicious curvePool address to manipulate return values from these functions, causing potential calculation errors, transaction reversion, or unintended behavior within the function.
Vulnerability Details:
Function: previewUnitaryAddLiquidity
Location:
last_prices() call, which lacks validation to prevent zero or extremely large values.
coins(0) call, which may not point to an ERC-20 token with a valid decimals() function.
Impact: Division by zero, underflows, or other calculation errors.
Root Cause: Lack of validation on last_prices() and coins(0) return values.
Github username: --
Twitter username: --
Submission hash (on-chain): 0x427591f2d369cdc84151cc5950aaa0a2683c7f0c792aaacb1721a3c7c49812e5
Severity: high
Description:
Summary:
CurveLiqArbitrage.sol#L33-#L56
function fails to validate the return values oflast_prices()
andcoins(0)
from thecurvePool
contract, which can lead to unexpected behavior. A user can input a maliciouscurvePool
address to manipulate return values from these functions, causing potential calculation errors, transaction reversion, or unintended behavior within the function.Vulnerability Details:
previewUnitaryAddLiquidity
last_prices()
call, which lacks validation to prevent zero or extremely large values.coins(0)
call, which may not point to an ERC-20 token with a validdecimals()
function.last_prices()
andcoins(0)
return values.Code Reference:
Suggested Fix:
Add validation checks for both
last_prices()
andcoins(0)
before calculations:The text was updated successfully, but these errors were encountered: