The createOrder
function in GmxProxy
makes an unchecked external call to gExchangeRouter.createOrder(params)
.
If a malicious or broken market contract is provided, it can revert, causing ETH to be locked permanently in GmxProxy
.
This results in:
Permanent Denial of Service (DoS) for order execution.
Locked ETH that cannot be recovered, leading to fund loss.
The function assumes createOrder
always succeeds.
No checks for failed transactions.
If the market contract maliciously reverts, the ETH sent to sendWnt
remains stuck in orderVault
.
Attacker registers a fake market that always reverts orders.
Calls createOrder
, causing ETH to be sent but order never executes.
ETH remains locked in orderVault
, making it unrecoverable.
Denial of Service (DoS) - Orders cannot be executed because queue.requestKey
never updates.
Permanent ETH Lock - ETH sent in sendWnt(orderVault, positionExecutionFee)
remains stuck.
Protocol Funds Loss - Repeated attacks can drain user funds, making the vault unusable.
Manual Review, Foundry
Wrap the external call in a try-catch block to revert gracefully instead of locking funds.
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.
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
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.