Missing checks if pairs equal tokens #124
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
Handle
defsec
Vulnerability details
Impact
The uniSwapLikeRouter.getAmountsOut, the contracts are not checking if the pairs are same.
Also, it does not check that the tokens actually match the pair.
It's easy to set faulty liquidation paths which then end up reverting the liquidation transactions.
Proof of Concept
There is check missing if the inputToken and outputToken is same.
"https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/singleJoinExit/SingleTokenJoinV2.sol#L80"
Tools Used
None
Recommended Mitigation Steps
Check inputToken != outputToken.
The text was updated successfully, but these errors were encountered: