Impossible Redeeming an underlying asset for token that was previously allowed to be deposited but is not allowed again.
setAllowedToken function
set the status of a token to either true or false. setting a token in which a liquidity provider have deposited into the thunderloan contract back to false, deleting all information associated to that token including the AssetToken Liquidity provider hold as a receipt to redeem their asset will render the AssetToken useless as the underlying Token associated with the AssetToken is no longer a valid token in the contract and in turn will get liquidity provider funds stuck in the contract forever.
Liquidity Provider funds get stucked in the contract forever
Add the function below to thunderloan.t.sol
run with forge test --mt testFailsetAllowedTokenToFalse -vvvv
foundry
The team should make sure Liquidity Provider who have deposited into the contract when it accept the token should still be able to withdraw their token when it does not accept it again to avoid stucking funds in the contract.
They can also check the AssetToken contract attached to that underlying token is not holding any amount of the underlying Token before removing it from allowedToken.
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.