getLpTokenAmount is called with isDeposit=False for Deposit
In GMXOracle, the function getLpTokenValue, together with the slippage input from user, is used to calculate the expected lp token output in many interactions. (including deposit and withdrawal). It makes use of a toggle isDeposit
to indicate the pnlFactorType
and pass it ultimately to the GMX native method in syntheticReader.getMarketTokenPrice
.
However, during the call getLpTokenValue
in GMXDeposit library, the call is done with isDeposit = false
GMXDeposit.sol
https://github.com/Cyfrin/2023-10-SteadeFi/blob/main/contracts/strategy/gmx/GMXDeposit.sol#L97
From the design of GMXVault, keeper or the
the expected lp amount would be inaccurate for deposit.
correctly pass in isDeposit = True for GMXDeposit.
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.