obront
medium
GLP price may be slightly understated due to GMX math error, which could lead to unfair liquidations
GMX has a disclosed math error in the contracts which lead to the GLP price being slightly overstated (up to ~0.6%). The GLPOracle relies on the faulty function, and should therefore compensate for this error to avoid unfair liquidations.
There is an error in GMX's calculation for the GLP price based on a miscalculation performed when closing short positions. The details of this issue are laid out here: https://twitter.com/BatchBrewCoder/status/1605291751476002816
GMX has responded to the disclosure, acknowledging the issue and setting a benchmark that GLP prices may be understated by approximately 0.6% on Arbitrum: https://twitter.com/GMX_IO/status/1605387484656832514
While 0.6% is a small amount, it may be the difference between a user being liquidated and not. For example:
- A user puts 1000 USD into their Sentiment account
- They borrow 4950 USD against it, believing to have buffer for a 1% drop in price
- They convert their 1000 USD into GLP
- The price of GLP falls just 0.4% and the user is liquidated
Users may be unfairly liquidated because GLP price is slightly lower than it should be.
Manual Review
Do not launch a GLP Oracle until GMX has confirmed this issue is fully resolved. If necessary, add an owner controlled value into the contract that slightly increases the oracle price to ensure it accounts for this inaccuracy.