The `recoverTokens()` function has no restriction on which tokens can be recovered, allowing the owner to transfer Aave aTokens (which represent deposited collateral) out of the contract, degrading the health factor of all open positions.
The `recoverTokens()` function is designed as an emergency mechanism to recover tokens accidentally sent to the contract. However, it accepts any ERC20 token address without validating whether the token is critical to the protocol’s operation.
The `recoverTokens()` function is designed as an emergency mechanism to recover tokens accidentally sent to the contract. However, it accepts any ERC20 token address without validating whether the token is critical to the protocol’s operation.
Note: Aave’s `finalizeTransfer` hook prevents transferring aTokens if it would make the position unhealthy (health factor < 1). However, the owner can still drain collateral up to the point just before liquidation, significantly degrading the health factor.
Likelihood: Low
The owner has unrestricted access to this function at any time, but the owner is a trusted role. Exploitation requires a malicious or compromised owner.
Impact: Medium
Funds are indirectly at risk. The owner can extract collateral value from the protocol by transferring aTokens to themselves, reducing the health factor of all positions and bringing them closer to liquidation.
Aave’s `finalizeTransfer` hook prevents draining all aTokens (blocks transfers that would make health factor -vvv
Add a blacklist of protected tokens that cannot be recovered:
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.
The contest is complete and the rewards are being distributed.