Increase position over estimates the gas to be sent to gmx, and thus charges the users more than required.
When estimating for increase market, the execution gas fee is over estimated by the contract in relation to what is applicable to GMX.
Assuming increaseOrderGasLimit is 10 and gasPerswap is 5. estimateGasLimit would be $estimateGasLimit = IncreaseOrderGasLimit + gasPerSwap$ = 10 + 5 = 15.
using the same scenario and estimating how GMX does for increase gas (ignoring the callbackGasLimit).
$estimateGasLimit = IncreaseOrderGasLimit + gasPerSwap * swapPath.length$ = 10 + 5 * 0 = 10; this is the case since in create order, swap path is supplied as zero.
User is over charged gas.
manual
Implement increase Position estimation just as it is implemented in GMX to avoid forcing the user to pay more than is required by gmx.
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.
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.
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.