Closed sherlock-admin closed 1 year ago
Escalate for 10 USDC Any explanation why this is marked as excluded? The poc is very extensive and clearly shows how an user, who fails to redeem tokens on time before delisting, will not be able to redeem them anymore, even of protocol reslists the market. I believe this is a valid issue.
Escalate for 10 USDC Any explanation why this is marked as excluded? The poc is very extensive and clearly shows how an user, who fails to redeem tokens on time before delisting, will not be able to redeem them anymore, even of protocol reslists the market. I believe this is a valid issue.
You've created a valid escalation for 10 USDC!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Duplicate of #426 . Low
Result: Low Unique Considering this issue a low based on Sponsor comment https://github.com/sherlock-audit/2023-05-ironbank-judging/issues/426#issuecomment-1620755589
ArmedGoose
medium
After delisting the market users will not be able to redeem their supplied tokens (even after relisting)
Summary
When a market is delisted, users are not able to reedem their tokens they supplied to that market. If it is listed back, it is also not possible, because the supply amount is not updated from "previous" listing period.
Vulnerability Detail
Markets can be delisted (harddelist) by the protocol. Any suppliers to that market may be not aware of the decision and may have already some ibTokens they received when supplying to that market. However the Redeem function checks in line 412 if the market is listed, otherwise reverts. This is the first point, where users may be left with unrealized ibTokens.
Now, if the protocol wishes to list that market again, even with the same ibTokens that were left previously, users will not be able to realize them, because the supply amount will be not enough (since they did not supply after the recent listing)
Impact
Users may not be able to retrieve their funds, which is high impact, but it may happen only in some edge cases for some group of users, which is low likelihood, so the overall rating is medium.
Code Snippet
Run
forge test -vv --match-test testRedeem_redeem_after_delisting
. Observe that test passes, while two expected reverts happens -vm.expectRevert("not listed");
after delisting and thenvm.expectRevert("insufficient balance");
after re-listing. The test:Tool used
Foundry Manual Review
Recommendation
Delisting market should do more than just delete the structure. There might be also other (as another issue with Liquidations I submitted) financial dependencies of a market. Before it can be called not used, it should be made sure that there no debts that will remain after closing such market, and that all users that the market is due to, will have possibility to redeem their funds later on. There is no straightforward solution to it, but it seems reasonable to at least account the remainders into some variables instead of delete the market completely, so the market may stay in a "hidden" more and operations such as redeem could be still performed. It's similar to common pause logic - even if protocol is paused, user should be able to exit the protocol, but not enter it anymore, I believe the same should be applied to a delisted market, instead of banning it completely.