Normal Behavior: The Stratax contract is an upgradeable implementation that uses an initialize function to set critical state variables such as the Aave pool, price oracle, and contract owner. Ideally, the deployer should be the only one able to initialize the contract immediately after deployment.
Specific Issue: The initialize function (line 144) is marked external and lacks any access control or protection within the constructor. Since the owner is set to msg.sender inside this function, a malicious actor can monitor the mempool and front-run the deployer's initialization transaction. By calling initialize first, the attacker becomes the owner and can point the protocol to malicious external contracts (e.g., a fake Aave pool or a rigged Oracle).
Likelihood:
Bots automatically detect uninitialized contracts on-chain.
Attackers can use higher gas fees (Priority Fees) to ensure their transaction is processed before the deployer's.
Impact:
Total Loss of Control: The legitimate deployer is locked out of the onlyOwner functions.
Data Manipulation: The attacker can set a malicious strataxOracle to manipulate prices and liquidate or steal user assets.
To prevent the implementation contract from being initialized, add a constructor to the Stratax contract that calls _disableInitializers():
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.