Summary
This report analyzes the wstETH/USD Chainlink oracle proposed by Chainlink and provides parameter recommendations for the wstETH/USDe and wstETH/wETH swap pools on GMX. Our findings reveal significant deviations between the Chainlink stETH/USD oracle and on-chain prices, primarily due to the oracle not integrating the major source of stETH liquidity, which is on-chain. To address potential arbitrage risks and protect LPs, we recommend specific swap fees and price impact factors.
Introduction
In response to Chainlink’s suggested wstETH oracle, we have conducted an analysis to assess its suitability for use on GMX. We provide parameter recommendations for the wstETH/USDe and wstETH/wETH swap pools. According to Chainlink’s proposal, the wstETH/USD feed is constructed by taking the wstETH/stETH conversion rate from the Lido contract and multiplying it by the stETH/USD price stream.
Analysis of the stETH/USD Oracle
Comparison with On-Chain Prices
To evaluate the quality of the stETH/USD Chainlink price stream, we compared it to the most liquid stETH/ETH market, which is the Curve stETH/ETH pool on Ethereum. We then multiplied the on-chain stETH/ETH price by the ETH/USD price to derive an on-chain stETH/USD price.
Observations
Our analysis revealed significant deviations between the Chainlink oracle-derived stETH/USD price and the on-chain derived stETH/USD price. This implies that the Chainlink stETH/USD price stream is suboptimal, as it does not account for the primary source of stETH liquidity, which is the on-chain Curve pool. These deviations can lead to inaccurate pricing on GMX and open opportunities for arbitrage exploitation.
Impact on GMX Swap Markets
Deviation in wstETH/wETH Exchange Rates
We examined the expected wstETH/wETH exchange rate on GMX by taking the wstETH’s oracle price (as per Chainlink’s proposed method) and dividing it by the ETH/USD price. We then compared this rate to the on-chain wstETH/wETH prices on Arbitrum to assess deviations.
Results
Price Deviation Percentiles (in basis points):
Percentile |
Deviation (bps) |
95% |
11 |
99% |
19 |
99.5% |
29 |
99.9% |
62 |
These results indicate that in up to 0.5% of cases, the price deviation can be as high as 29 bps, and in rare cases (0.1%), up to 62 bps. Such deviations can lead to substantial arbitrage opportunities if not properly mitigated.
Recommendations for Swap Fees and Price Impact Factors
Swap Fee Recommendations
To protect LPs and minimize arbitrage risks, we recommend setting the swap fees as follows:
- wstETH/wETH Swap Pool: Set the swap fee to 30 bps.
- wstETH/USDe Swap Pool: Set the swap fee to 25 bps, which is 5 bps less than the wstETH/wETH pool due to additional swaps needed in arbitraging through USDe.
Setting the swap fee at these levels ensures that it exceeds the typical price deviations in 99.5% of cases, making it economically unviable to exploit small deviations while still allowing reasonable liquidity provision and trading.
Swap Price Impact Factors
We also recommend the following price impact factors:
- Negative Price Impact Factor: 1e-8
- Positive Price Impact Factor: 5e-9
Impact Analysis
For a swap pool with approximately $2 million in liquidity:
- A trade creating a 1% imbalance ($20k) incurs a price impact fee of approximately 9 bps.
- A 5% imbalance ($100k) results in a price impact fee of about 26 bps.
- A 10% imbalance ($200k) leads to a price impact fee of approximately 47 bps.
Combined with the base swap fee, large trades causing significant imbalances become economically unattractive for arbitrageurs, thereby protecting the swap pools from exploitation.
Considerations for the wstETH/USDe Market
Since the wstETH/USDe market can be used for arbitrage when wstETH/wETH arbitrage opportunities occur (e.g., wstETH–USDe–USDC–wETH on GMX), it is crucial to maintain similar swap fee and price impact parameters to those of the wstETH/wETH pool. This consistency ensures that arbitrageurs cannot exploit discrepancies between the two markets.
Due to the additional swaps required when arbitraging through USDe, we recommend setting the base swap fee for the wstETH/USDe pool slightly lower at 25 bps, while keeping the same price impact factors as the wstETH/wETH pool to prevent potential exploits during significant price deviations.
Recommendations
Based on our analysis, we recommend the following parameters for the swap pools:
Pool |
Swap Fee (Negative) |
Swap Fee (Positive) |
Price Impact Factor (Negative) |
Price Impact Factor (Positive) |
wstETH/wETH |
30 bps |
30 bps |
1e-8 |
5e-9 |
wstETH/USDe |
25 bps |
25 bps |
1e-8 |
5e-9 |
Conclusion
In summary, the Chainlink stETH/USD oracle, as currently proposed, does not adequately reflect the true market price of stETH due to its lack of on-chain liquidity data integration. This mispricing presents risks for accurate wstETH valuation on GMX and opens up arbitrage opportunities that could harm LPs.
By implementing the recommended swap fees and price impact factors, we can mitigate these risks, ensuring that the swap pools remain robust, fair, and economically viable for LPs and traders alike.