If the owner calls ThunderLoan::setAllowedToken
to remove an assetToken, users that have deposits on that asset token won't be able to redeem funds.
ThunderLoan::setAllowedToken
is a restricted owner function, used to add or remove AssetTokens
. Users are only able to deposit to an assetToken after the owner calls this function to allow them, and add it to the ThunderLoan::s_tokenToAssetToken
mapping.
If the owner calls ThunderLoan::setAllowedToken
with allowed
function param set to false
, this will delete the mapping, without validating if there are any deposits on the contract. Users trying to ThunderLoan::redeem
their tokens from the protocol will get a revert error ThunderLoan__NotAllowedToken
as the token no longer exists on the mapping.
Even if the owner tries to add the token back, using ThunderLoan::setAllowedToken
, the contract will deploy a new AssetToken
for that token address.
High - freeze of user funds, as users won't be able to redeem. The owner can still make an upgrade to the smart contract to create a new function that allows users withdraw frozen funds, but if the owner is not available,does not want to upgrade, or loses access to owner wallet, funds will be lost forever.
Running the test will output:
Foundry
Manual Review
Validate if the AssetToken
contract has funds before deleting it from the ThunderLoan::s_tokenToAssetToken
mapping.
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.