Users are forced to lose funds with the fixed slippage values on the project. #170
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-260
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/TokenisableRange.sol#L198-L199
https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/TokenisableRange.sol#L258-L259
https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/TokenisableRange.sol#L299-L300
https://github.com/code-423n4/2023-08-goodentry/blob/71c0c0eca8af957202ccdbf5ce2f2a514ffe2e24/contracts/PositionManager/OptionsPositionManager.sol#L477
Vulnerability details
Impact
Users lose funds to sandwich attack due to hardcoded high slippage.
Proof of Concept
The various slippage amount are used on the project which will force users to lose funds to sandwich attack. Slipages of 5% and even 100% slippage are forced on users causing users to lose all funds.
amount0Min
andamount1Min
mean 100% slippage which could allow buts steal all the funds.Tools Used
Manual Review
Recommended Mitigation Steps
Allows users to pass the minimum amount(AmountMin) they are willing to take instead of hardcoding the slippage.
Assessed type
Uniswap
The text was updated successfully, but these errors were encountered: