The recoverTokens() function lacks any restrictions on which tokens can be recovered, allowing the contract owner to withdraw aTokens (representing supplied collateral) and debt tokens directly from the contract without authorization or validation. Complete loss of user position value through unauthorized withdrawal of Aave collateral tokens and potential forced liquidation via debt token manipulation.
The recoverTokens() function in Stratax.sol is designed as an emergency recovery mechanism for tokens mistakenly sent to the contract. However, it lacks critical safeguards:
Any honest user with an active leveraged position risks complete loss of their collateral via recoverTokens(). No specialized exploit is needed; the owner simply calls a public function with parameters easily visible on-chain. Users cannot prevent this, and there is no recovery mechanism and this is a straightforward loss-of-funds scenario driven by normal protocol operation and malicious or compromised ownership
Users lose 100% of supplied collateral
Removing aTokens makes positions undercollateralized; Aave liquidators can seize remaining assets
Alice creates a 3x leveraged ETH position, providing 10 ETH collateral and borrowing 20 ETH via flash loan.
The Stratax contract supplies all 30 ETH to Aave as collateral and receives 30 aWETH in return. Alice's position is now live with a healthy health factor (> 1.5).
The contract owner (or an attacker after key compromise) calls recoverTokens(aWethAddress, 30e18).
All 30 aWETH are transferred to the owner's wallet. Stratax contract balance of aWETH becomes zero.
Alice's position becomes undercollateralized; health factor drops to ~0.3 (liquidatable).
Aave liquidators immediately liquidate the position. Alice loses her entire 10 ETH principal plus accrued interest debt, and the position is wiped from the protocol
Restrict recoverable tokens to a whitelist of tokens that are not position-related (e.g. not aTokens, not variable/stable debt tokens).
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.