Closed code423n4 closed 1 year ago
I believe this finding to be invalid.
Disabling routing does not mean making it impossible to interact with the pair. It is only used by LBQuoter, which is for reading from off-chain and determining a path. Trader Joe team is likely to still have a dedicated pair page to add/remove liquidity even if a pair is disabled from routing. And let's not forget anyone can directly interact with LBRouter or LBPair and always withdraw their liquidity.
We have instances of the opposite finding in this contest, those are also contested but more grounded.
This one is incorrect as the check is purely "cosmetic" and no routing is blocked.
Will give it a second look but I think this one is invalid
Closing as invalid as the list is purely informational and the finding has no basis
GalloDaSballo marked the issue as nullified
Lines of code
https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L312-L328
Vulnerability details
Impact
Loss of funds and financial value of funds.
Proof of Concept
LBFactory has
setLBPairIgnored()
to set whether the pair is ignored or not for routing, it will make the pair unusable by the router (as per the docs/NATSPEC);Permalink
However, if it's called without checking the pair contract balance, it will cause the users unable to reach their assets.
And if the
_boolean
is not setfalse
again by the owner, Alice will not be able to see her tokens in her wallet again.Tools Used
Manual Review
Recommended Mitigation Steps
It would be best to require to check whether the contract has a balance or not. So it can save the financial value of the funds. Else, there can be a pull implementation where the liquidity providers can claim their tokens.