Impact: Medium
Likelihood: Medium
In the GmxProxy
, there is a function named withdrawEth
that withdraws all of the ETH to the owner. However, performing this action can cause issues with the associated PerpetualVault
. If there is no ETH in GmxProxy
, the main mechanism of the protocol will break. Consequently, the Keeper
will be unable to execute the run
function due to the lack of ETH in GmxProxy
. As a result, actions such as signal changes and opening positions will become unavailable.
Breaks the main function of the protocol. Keeper won't be able to nothing so users can lost funds or get liquidated.
Alice deposits collateralToken to the PerpetualVault
Signal is sent off-chain and Keeper calls run
function to open some position for example to run swap, so GMX order got created
GMX order got executed successfully, so swap was made
GmxProxy
owner calls withdrawEth
and withdraw all of the ETH
If there is new signal and run
function will revert due to lack of ETH
PoC:
In the test file PerpetualVault.t.sol
add fallback function, because in this test protocol is owner of the GmxProxy
and should be able to receive funds
Add the following test:
Execute the following command: forge test --mt test_Run_SignalChange_Fail --rpc-url arbitrum -vvvv
Consider adding check for minimum amount of eth that won't be withdraw and won't break the Protocol
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.