If a market is delisted, it is impossible for a user to redeem tokens
Summary
Iron Bank has both a softDelist and a hardDelist function with the assumption that softDelistMarket will be called first to allow users to withdraw and then eventually the market will be completely delisted using hardDelistMarket. However there is no information about how long this softDelist period will be. Therefore, users should have the ability to remove their assets even after the market is hard delisted. Currently, the only way for users to remove collateral from Iron Bank is through the redeem function, but there is a require(m.config.isListed, "not listed");, which will cause a revert if user's try to redeem this delisted asset.
Although there is a seize function that allows an owner to transfer delisted assets, if there are thousands of liquidity suppliers, it would be up to the owner to keep track all of these and send their assets back to them manually after a delist.
Vulnerability Detail
See summary.
Impact
If a market is delisted, all liquidity suppliers that didn't remove their assets during the softDelist period, will have their funds stuck.
Schpiel
medium
If a market is delisted, it is impossible for a user to redeem tokens
Summary
Iron Bank has both a
softDelist
and ahardDelist
function with the assumption thatsoftDelistMarket
will be called first to allow users to withdraw and then eventually the market will be completely delisted usinghardDelistMarket
. However there is no information about how long thissoftDelist
period will be. Therefore, users should have the ability to remove their assets even after the market is hard delisted. Currently, the only way for users to remove collateral from Iron Bank is through theredeem
function, but there is arequire(m.config.isListed, "not listed");
, which will cause a revert if user's try to redeem this delisted asset.Although there is a
seize
function that allows an owner to transfer delisted assets, if there are thousands of liquidity suppliers, it would be up to the owner to keep track all of these and send their assets back to them manually after a delist.Vulnerability Detail
See summary.
Impact
If a market is delisted, all liquidity suppliers that didn't remove their assets during the softDelist period, will have their funds stuck.
Code Snippet
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/pool/IronBank.sol#L412 https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/pool/MarketConfigurator.sol#L282 https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/pool/MarketConfigurator.sol#L305
Tool used
Manual Review
Recommendation
Consider adding a function that allows users to transfer assets out of Iron Bank after a market has been hard delisted.