setAllowedToken(token, false) removes a token from the protocol by deleting its AssetToken mapping entry, with no check that deposits still exist:
Liquidity providers' underlying lives inside the AssetToken, and the only way to retrieve it is redeem(), which is gated by revertIfNotAllowedToken. Once the token is disallowed, isAllowedToken returns false, so every redeem() reverts with ThunderLoan__NotAllowedToken. The deposited funds are permanently locked - there is no other withdrawal path.
Likelihood: Low - requires the owner to disallow a token that still holds deposits. The owner is trusted, but this is an easy, irreversible foot-gun with no on-chain guard.
Impact: High - all liquidity providers in that token permanently lose access to their deposited underlying; the funds become unrecoverable.
An LP deposits, the owner disallows the token, and the LP can no longer redeem. Runnable Foundry test (extend BaseTest):
Run forge test --mt test_PoC_setAllowedTokenFalseLocksDeposits -vv; it passes, showing redemption is permanently blocked.
Block disallowing a token that still has outstanding deposits, or provide an emergency redemption path that does not depend on the allowed-token check:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.