Accepted tokens are managed by TokenManager
contract. If a token is removed from accepted tokens list a user who was using it as a collateral can withdraw that token without burning his EUROs.
Alice deposits 1 WBTC as collateral and mint 20000 EUROs.
WBTC is removed from accepted tokens for any reason (e.g. WBTC depegs).
Alice can call SmartVaultV3::removeAsset
and take back her collateral.
The vulnerability is possible due to a check in the removeAsset
function:
getTokenManager().getTokenIfExists(_tokenAddr);
check if a token is the accepted list and then the function check if a collateral can be removed only if the token is on that list here:
Previously collaterized EUROs are now no more collaterized and this could lead to EUROs depeg and consequent bank run.
Manual review.
To mitigate this issue, one approach could be to allow the removal of tokens in TokenManager
only if they are not currently being used as collateral. Alternatively, the removeAsset
function could be restructured as an admin-only function, callable exclusively from the manager
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.