Summary
This proposal seeks to integrate Chaos Labs’ Risk Oracle into the GMX protocol, to enhance the efficiency and accuracy of market parameter updates. The Risk Oracle will enable real-time and automated adjustments to market configurations, reducing manual intervention and improving the trading experience for users.
This potential integration continues GMX’s commitment to making the protocol as transparent and antifragile as possible, ensuring that the core functions of data truth, risk-based market parameters, and protocol upkeep continue to be performed by independent leaders in the space.
Motivation
Chaos Labs is the Risk Manager for GMX DAO and protocol, performing a range of economic and security risks, including providing specific market parameters for GMX V2. These parameters are currently offered based on periodic time-based reviews and in response to specific market or associated events that affect the risk profile of pools (ex., Significant changes in pool sizes, OI, or liquidity profile on external markets that Oracles reference). These recommendations are then manually updated and reviewed continuously per the process listed above. While effective, this process is time-consuming and introduces a latency in responding to market changes. This latency results in market parameters being more conservative than otherwise, as they must also cover a reasonable range of market conditions without further updating, and thus higher fees.
By integrating the Risk Oracle, over time more and more of the updating of parameters can be automated, ensuring that market parameters, including but not limited to price impact, max open interest, and others, are adjusted in real-time based on global data from CEXs. This integration will enhance the protocol’s competitiveness by improving execution costs with more precise risk parameters, reducing price manipulation risks, and minimizing the development workload.
Rationale
Integrating Chaos Labs’ Risk Oracle is a beneficial step forward for GMX as it means continuing to move towards a more automated and responsive risk management system. The Risk Oracle will offer the protocol:
Real-Time Updates: Implement real-time updates for critical parameters like price impact, which will lead to better execution costs for traders and more competitive pricing.
Automated Adjustments: Automatically update max open interest (OI) configurations, acting as an additional safeguard against price manipulation and pool imbalances.
Enhanced Market Stability: Dynamically adjust parameters based on real-time data from CEXs and DEXs to ensure the protocol remains resilient against sudden market changes.
Resilience: Further making the protocol more antifragile and less reliant on contributors for providing all updates, while still retaining mechanisms through Admins and the Security multisig as a fallback.
Specification
Risk Oracle Integration
Data Source: GMX will read risk parameter recommendations from the Chaos Labs’ Risk Oracle.
Parameter Updates: The Risk Oracle will feed data into the GMX protocol, where a Keeper will observe updates, validate them, and execute transactions to update on-chain market configurations.
Control Mechanism: The Keeper will not have direct control over the parameters. Instead, during transaction execution, the GMX contract will read values from the Risk Oracle and use them to update the markets.
Update Frequency
Real-Time Updates: Parameters, such as price impact, will be updated in real-time to ensure optimal trading conditions.
Periodic Updates: Parameters, such as max open interest, will be updated less frequently, potentially once per hour, to maintain market stability.
Validation and Safety:
The Keeper will automatically check updates within a predefined valid range to ensure the protocol’s safety and integrity.
Initial updates will use narrower ranges for extra security.
Implementation Process
- Initially, the Oracles will have support for maximum open interest updates.
- Followed by position price impact updates
- In the future, the Chaos Labs Risk Oracles will also support updates for swap price impact, max pool size, funding rate, borrowing rate, and more.
Conclusion
Integrating Chaos Labs’ Risk Oracle into the GMX protocol will help GMX adapt to market changes quickly and efficiently by accessing real-time data from CEXs and DEXs. Automating key market updates will improve trading conditions and enhance protection against market manipulation.