SIP-2048: MaxMarketValue Risk Control Module
Author | Kaleb |
---|---|
Status | Implemented |
Type | Governance |
Network | Optimism |
Implementor | TBD |
Release | TBD |
Proposal | Loading status... |
Created | 2024-01-08 |
Motivation
Simple Summary
The sip proposes setting up a max market value control module, able to decrease the prevailing maxMarketValue
to zero on pre-configured markets exclusively. The function can only be called by an endorsed account and the maxMarketValue
parameter state on a specified market cannot altered further with the module.
Abstract
The module is a standard Gnosis Safe Module that inherits constrained control over the setMaxMarketValue
function in PerpsV2MarketSettings
.
Risk Control Module Usage
The module itself is a tool at the disposal of a Risk Committee (RC) to use when the need arises, the RC can employ the module in order to safeguard stakeholders against long tail risks as part of its' strategic vision. However, given that the formation of the RC and it's scope of responsibilities are yet to be finalized, the Spartan Council is able to, in the interim, designate an temporary Interim Risk Council (IRC) who assumes the role of supervising and putting in place the necessary framework that can utilize Risk Control Module.
It is important to mention that the formation of the RC is not within the scope of this SIP, furthermore, the IRC is not a new governance entity but an interim committee that serve under the purview and close supervision of the Spartan Council.
The IRC reports directly to the Spartan Council and is held accountable for actions and strategies employed that utilize the usage of the risk control module proposed in this SIP. Accountability takes the form of a presentation that lays out the status of the automated tools employed that utilize the risk control module, the prevailing configurations and any changes or alterations performed. The IRC would also present to the SC a report on actions taken that utilize the module. The Spartan Council can at any point withdraw this responsibility from the IRC, and in such a case, the module is to be rendered deprecated by setting the modules' status into a Paused
state.
The tactics employed by the IRC as part of it's strategic framework of operation, includes setting up the necessary off chain scripts that automatically perform risk covering during times of extraordinary market circumstances. It is important to reiterate that the IRC is accountable to the SC for all actions taken during it's time of service and it is up to the IRC to perform the necessary investigation and disclosures should the module be used.
Technical Specification
setCoverage
By default all markets are not covered by the risk control module, meaning the module cannot alter the state of the maxMarketValue
. In order for a market's oi state to be alterable by the module, the market needs to be covered
. This function allows for adding and removal of the coverage of specified markets. Note that alterations to the set of markets covered can only be configured by the protocol owner after obtaining the necessary governance sign off that includes a SCCP or SIP.
setPaused
This is a setter function that pauses the module. This can only be called by the protocol owner.
coverRisk
This is a function that takes in a Perps V2 marketKey
and is able to decrease the maxMarketValue
to zero on that market by the endorsed account.
setEndorsedAccount
This is a setter function that allows the specification of the endorsed account that can call the coverRisk
function. This can only be called by the protocol owner.
getEndorsedAccount
This is a getter function, external view, that returns the currently configured endorsed account.
Initial Specification
The configurations of the risk control module, (i.e. which markets are considered to be covered) will need to be approved and voted on in a SCCP, should this SIP be approved. It is important to mention that only long tail assets that have low oi caps and low liquidity would be configured to be covered, the vast majority of markets that have high churn (i.e. SOL, ETH, BTC, ...) would not be covered by the risk control module.
Module Downtime
Note that similar to the case of the gas price module, when ownership of PerpsV2MarketSettings
is switched over to the L1 safe (during contract updates), the MMV risk control module would be temporarily disabled.
Test Cases
- On a market that is covered
- When a endorsed account calls the
coverRisk
function- ✅ Then the transaction succeeds and the maxMarketValue of the covered market is decreased to zero
- When a random account calls the
coverRisk
function- ❌ Then transaction reverts, as the caller is not endorsed
- When a endorsed account calls the
- On a market that is not covered
- When a endorsed account calls the
coverRisk
function- ❌ Then transaction reverts, as the market is not covered
- When a endorsed account calls the
- When calling
setCoverage
- When the call is performed by an endorsed account or a random account
- ❌ Then transaction reverts, as the only the protocol owner can
setCoverage
- ❌ Then transaction reverts, as the only the protocol owner can
- When the call is performed by the protocol owner
- ✅ Then the transaction succeeds and the market is covered by the risk control module
- When the call is performed by an endorsed account or a random account
Configurable Values (Via SCCP)
- Updating the endorsed account with the
setEndorsedAccount
requires an SCCP. - Updating the state of covered markets, by calling the
setCoverage
function requires an SCCP.
Copyright
Copyright and related rights waived via CC0.