Kwenta State Log

A living document defining the state of Kwenta

KIP-124: Gauntlet Partnership

Summary

Kwenta DAO will enter partnership with Gauntlet to perform risk analysis and ongoing parameter tuning for Quanto Perps.

Abstract

Quanto Perps introduces a lot of parameter surface area that will need to be actively be managed by the council, CCs, and community.

Gauntlet has years of experience in DeFi risk management and specialties in onchain perpetual futures parameter tuning. Gauntlet will aid the council in recommendations and active changes for live system parameters.

The partnership with Gauntlet will be an engagement term over 1 year.

Motivation

With the increased complexities and subsequent risks of building out an in-house protocol, it's important to service ongoing monitoring of risk and adjust parameters accordingly.

Quanto Perps will introduce a wide set of parameters that will need to be managed. For example, parameters like open interest caps, liquidation parameters (buffer, fee ratio, margin), maker & taker fees, funding velocity, and skew scale are all levers that need to be actively managed to balance a strong trading experience with a system protected from tail risk. Acting too aggressively puts LPs at risk and acting too conservatively creates a poor trading experience. The responsibility of parameter tuning is compounded by each market added to the system where each new asset introduces new set of risk into the equation.

In order to aid this management, engaging an experienced and qualified third party risk counsel like Gauntlet is the ideal solution.

Specification

A short blurb about Gauntlet:

Gauntlet is an end-to-end solution provider for on-chain market risk management. Founded in 2018, we have experience protecting DeFi protocols throughout market cycles and black swan risk events. We achieve this via active monitoring of on-chain positions and liquidity to make regular as well as urgent risk parameter adjustments to keep clients optimized to current market conditions.

Gauntlet’s platform quantifies risk, runs economic stress tests, and calibrates parameters dynamically through a joint optimization function. We use agent-based simulation models tuned to historical and current market data to model tail market events and interactions between different users within DeFi protocols. As new risk scenarios are observed in the market, we adjust our methodologies to account for them, leveraging new parameters and risk mitigation mechanisms developed by our clients. Gauntlet’s methods mature and evolve as the industry does.

Gauntlet's Goals

  • Complete and publish a comprehensive market risk methodology for Kwenta.
  • Complete ETLs for relevant data feeds. Timelines are dependent on the completion of ETL work.
  • Build custom Parameter Optimization and Risk Models for the Kwenta protocol.
  • Continuously refit, update assumptions, and analyze model outputs.
  • Optimize the target metrics below while controlling for the open interest imbalance risk. The target metrics for optimization are:
    • Maximize protocol trading volume - Maximize capital efficiency for traders
    • Minimize open interest imbalance risk
  • Provide a process for new markets to be onboarded and parameters to be set for new supported token types.
  • Communication with the Kwenta DAO including, but not limited to the following
    • Protocol parameter changes
    • Details of methodology

Timelines

The total engagement timeline is 52 weeks.

Phase 1

WeeksActivityDescription
1-4Optimization and Risk Management Methodology- Analyze the protocol mechanics and parameters
- Develop the parameter recommendation methodology
- Write and publish the methodology
4-5Initial Recommendations- Deliver initial parameter recommendations

Phase 2

WeeksActivityDescription
6-9 (or 4 weeks after protocol mainnet deployment )Data Integration- Data modeling
- Build data ingestion and transformation pipeline for all relevant data
10-11 (or 2 weeks after data integration)Monitoring and Alerts- Implement monitoring and alerts for the key metrics
10-12 (or 3 weeks after data integration)Dashboard Integration- Design community facing dashboard
- Productionize dashboard and share it with the Kwenta DAO
12-15Model Development- Implement simulation or quantitative models for parameter optimization
- Write unit and integration tests
- Deliver automated parameter recommendations
TBDProposal Tooling Development- Integrate proprietary tooling to submit onchain calls to Quanto Perps contract
15-52On-going Risk Management- Recurring parameter recommendations based on methodology defined in phase 1
- Monitoring of market conditions and “off cycle” recommendations as needed

Requirements for Partnership

Risk Guardian Contract

Create an onchain "Risk Guardian" role for Gauntlet over the Quanto Perps contracts to delegate control over parameter changes. These changes should have a 1 day timelock that can be fast tracked (in the event of an emergency) or vetoed by the Kwenta Council. Gauntlet will develop infrastructure to interface with the Risk Guardian contract.

Event Data

In order for Gauntlet to properly establish their ETL pipeline Kwenta will need to provide a constant stream of data from the live protocol. The preferred method of doing this will be through event emissions from the chain.

Gauntlet is looking for the following data including, but not limited to:

  • Maker and Taker positions
  • Protocol configuration
  • Market configuration
  • Funding rates
  • Vaults
  • Historical liquidations

Kwenta will need to provide:

  • Contract addresses for ingesting on-chain event data

Currently as it stands, Kwenta may be using Shadow to emit events from contracts offchain. If this is the case Kwenta may additionally need to provide a Shadow RPC node for Gauntlet's use.

Constraints from Gauntlet:

  • Gauntlet will not provide recommendations if the endpoint is down. This is risky because Gauntlet cannot observe the current state of the market and borrowers.
  • Gauntlet’s Risk Dashboard will not be updated if the endpoint is down. Gauntlet may present a banner to indicate to users that the client endpoint is down and the dashboard is out of date.
  • During downtime, the risk of the system is on the protocol team/DAO and any insolvencies that occur are not due to any negligence from Gauntlet.

Requirements from Gauntlet:

  • 90%+ uptime to prevent the need to backfill data
  • Should the endpoint go down, Gauntlet requires a 72-hour working day window to deliver updated parameter recommendations.
  • Ad hoc analysis is blocked without the endpoint being up.
  • The endpoint should not change without 2 weeks' prior notice.
  • API endpoint returns up-to-date data (e.g., the latest event or state update is within 24 hr)
  • Data returned from the endpoint should be complete. Returning partial data is strongly discouraged.

Cost

The treasuryDAO will be responsible for negotiating and ensuring costs are within budget for the DAO.

Copyright and related rights waived via CC0.