No approval is set for exchangeRouter
and GMXVault
contracts to use tokenA, tokenB and lpToken.`
Both exchangeRouter
and GMXVault
contracts are interacting with tokenA, tokenB and lpToken to deposit, withdraw and other transactions with the GMX v2.
Lets see for exchangeRouter
contract in GMXWorker.sol#L23-L44
Since the allowance is not set for exchangeRouter
, the above transaction will not work.
Further when we look at the comments in vault contract, it says that set approval for vault, but the approval is set for router.
https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXVault.sol#L117-L120
Transaction with GMX v2 contract will not work properly.
Manual review
We suggest to provide necessary allowance to exchangeRouter
vault
contracts to use the tokens for transaction.
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.