The deposit() function calls gmxOracle.getLpTokenValue with wrong flag for isDeposit
.
Let's take a look at this part of the code of the deposit() function:
and take a look at the getLpTokenValue()
in GMXOracle:
As you can see, we're passing isDeposit == false
so the _pnlFactorType
will be for withdrawals.
I doubt this has much impact, depends on the way the GMX system utilizes it, but may cause some problems on the front-end for example, displaying a wrong pnlFactor. I still think this deserves a Low severity
Manual review
Pass it as true because we're depositing.
Impact: Medium Likelihood: High The impact of using a wrong price (conservative vs optimistic) is limited, especially given the users specify the slippage.
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.