Inside GmxProxy.sol, within the createOrder function, safeApprove is granted to gmxRouter, but the token transfer is executed using gExchangeRouter.
The function approves gmxRouter but then transfers the tokens using gExchangeRouter. Since gExchangeRouter has not been granted approval, the token transfer may fail.
Token Transfer Failure: Since the approval is given to gmxRouter but the transfer is executed using gExchangeRouter, the transaction might revert due to missing approval.
Potential Security Risk: Improper handling of approvals and transfers can lead to unexpected contract behavior and failed transactions.
Manual Code Review
Solidity Static Analysis Tools
Ensure that the approval is granted to the entity performing the token transfer.
This ensures that the address executing the token transfer has the required approval.
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.