Untrusted Pool Configuration Enables Full Fund Drain
Description:
The contract allows setting an arbitrary address as the lending pool during Stratax::initialize:
No validation is performed to ensure that _aavePool is a legitimate Aave V3 pool.
Later, during the flash-loan lifecycle, Stratax grants token approvals and performs external calls assuming the pool is trusted:
This creates a trust boundary violation:
Stratax gives spending approval to aavePool
Then executes arbitrary external code controlled by that address
A malicious pool can exploit the granted allowance or manipulate execution flow
This is not a classic same-function reentrancy, but a callback-driven malicious integration attack, where control flow is handed to an untrusted contract before the operation is finalized.
Because Stratax is upgradeable and the pool address is configurable, this becomes a realistic risk in:
Misconfiguration during deployment
Governance compromise / upgrade attack
Incorrect address on new networks
Integration testing environments reused in production
Impact:
If a malicious or incorrect pool is configured, it can:
Use the allowance granted by Stratax to transfer tokens out of the contract
Manipulate the execution flow during flashLoanSimple → executeOperation
Drain user-supplied collateral before the position is finalized
Cause permanent loss of funds without violating ERC20 rules
The protocol fully relies on the assumption that aavePool is honest, but that assumption is never enforced on-chain.
This makes the system fragile to configuration or governance errors.
Proof of Concept:
A malicious pool can exploit the approval granted during Stratax::_executeOpenOperation.
This demonstrates that a malicious pool can abuse allowances granted by Stratax during execution.
Recommended Mitigation:
The fix is not adding nonReentrant.
This issue is caused by trusting an unverified external dependency.
Hardcode or immutably set the official Aave pool:
Set in constructor (or initializer once) and never allow arbitrary replacement.
Ensure the configured address is the real Aave deployment:
Grant exact allowances only when needed and reset afterward:
Or use:
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.