The contracts (PerpetualVault.sol, GmxProxy.sol, KeeperProxy.sol) grant the owner exclusive rights to modify critical parameters, creating centralization risks. Key functions include:
PerpetualVault.sol:
setKeeper(address _keeper): Changes the keeper address.
setTreasury(address _treasury): Sets the fee recipient.
setMinMaxDepositAmount(uint256 _min, uint256 _max): Adjusts deposit limits.
setDepositPaused(bool _paused): Halts deposits/withdrawals.
GmxProxy.sol:
updateGmxAddresses(...): Updates GMX-related contracts.
withdrawEth(): Withdraws all ETH from the contract.
KeeperProxy.sol:
setDataFeed(...): Configures price oracles.
setKeeper(...): Modifies authorized keepers.
Validation of the flaws:
Lack of Timelocks: Changes take effect immediately (e.g., setDepositPaused).
No Multi-Sig: No requirement for multiple approvals for critical changes.
Missing Input Validation Example: setMinMaxDepositAmount does not enforce min < max.
For example: PerpetualVault.sol
For example: GmxProxy.sol
Single Point of Failure: A compromised owner account can:
Drain funds via withdrawEth().
Disable deposits (setDepositPaused(true)).
Redirect fees to a malicious address (setTreasury).
Manipulate pricing or disable keepers (setDataFeed, setKeeper).
Trust Assumption: Users must trust the owner not to act maliciously, contradicting decentralization principles.
Manual Review
Add Timelocks
Implement a delay for critical changes, allowing users to exit or dispute.
Use Multi-Sig Governance
Require multiple signatures for sensitive operations.
Add Input Validation
Ensure parameters are within safe bounds.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point. Keepers are added by the admin, there is no "malicious keeper" and if there is a problem in those keepers, that's out of scope. ReadMe and known issues states: " * System relies heavily on keeper for executing trades * Single keeper point of failure if not properly distributed * Malicious keeper could potentially front-run or delay transactions * Assume that Keeper will always have enough gas to execute transactions. There is a pay execution fee function, but the assumption should be that there's more than enough gas to cover transaction failures, retries, etc * There are two spot swap functionalies: (1) using GMX swap and (2) using Paraswap. We can assume that any swap failure will be retried until success. " " * Heavy dependency on GMX protocol functioning correctly * Owner can update GMX-related addresses * Changes in GMX protocol could impact system operations * We can assume that the GMX keeper won't misbehave, delay, or go offline. " "Issues related to GMX Keepers being DOS'd or losing functionality would be considered invalid."
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point. Keepers are added by the admin, there is no "malicious keeper" and if there is a problem in those keepers, that's out of scope. ReadMe and known issues states: " * System relies heavily on keeper for executing trades * Single keeper point of failure if not properly distributed * Malicious keeper could potentially front-run or delay transactions * Assume that Keeper will always have enough gas to execute transactions. There is a pay execution fee function, but the assumption should be that there's more than enough gas to cover transaction failures, retries, etc * There are two spot swap functionalies: (1) using GMX swap and (2) using Paraswap. We can assume that any swap failure will be retried until success. " " * Heavy dependency on GMX protocol functioning correctly * Owner can update GMX-related addresses * Changes in GMX protocol could impact system operations * We can assume that the GMX keeper won't misbehave, delay, or go offline. " "Issues related to GMX Keepers being DOS'd or losing functionality would be considered invalid."
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.