Several initialization functions are vulnerable to front-running attacks, which could lead to malicious actors improperly initializing the contracts with harmful values.
The initialize
function in the UpgradeBranch.sol
, MarketOrderKeeper.sol
and LiquidationKeeper.sol
contracts can be front-run, allowing an attacker to initialize the contract with malicious values.
UpgradeBranch: An attacker could front-run the initialization and set their own address as the owner, gaining control over the contract.
MarketOrderKeeper: An attacker could front-run the initialization and set their own address as the owner, gaining control over the contract and also can set invalid or malicious values for the parameters, disrupting the contract's functionality.
LiquidationKeeper: An attacker could front-run the initialization and set their own address as the owner, gaining control over the contract and also can set an invalid or malicious address for the perpsEngine parameter, causing the contract to malfunction.
manual review
** Factory Pattern**: Consider using a factory contract to deploy and initialize contracts in one transaction, preventing front-running.
Deployment Scripts: Ensure deployment scripts have robust protections against front-running attacks.
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.