Karura Parameter Recommendation Methodology

Nathan Lord
Gauntlet
8 min readJun 30, 2021

--

As mentioned in our recent blog post, Gauntlet is excited to partner with the Acala team to provide automated financial risk management for Acala and Karura. This post will describe Karura, how it relates to Acala, and how Gauntlet will calculate parameter recommendations now and in the future.

Karura Overview

Acala vs Karura vs Maker

The Acala Foundation has created both Acala and Karura. Acala is a new set of DeFi protocols set to launch on the Polkadot Network. Karura is a similar set of DeFi protocols set to launch on “Polkadot’s faster, wilder cousin,” the Kusama network. For many readers, it may be helpful to draw comparisons to Maker with whom Gauntlet also worked to provide parameter recommendations. All three systems are DAOs that allow users to deposit collateral and mint stablecoins. The main differentiating factors are the networks on which they run, which allow Acala and Karura to take advantage of cross-chain message passing (XCMP). The table below illustrates some main differences between each system:

In this blog post, we will focus on Karura. In the future, Gauntlet will provide parameter recommendations for both Karura and Acala.

Karura

The core service Karura offers is the use of Collateral Debt Positions (CDPs), which allows users to lock their collateral in the form of overcollateralized loans and mint stablecoins in return. Karura’s stablecoin offering is kUSD.

Without getting too into the weeds, we will give a quick overview of how the CDP system works and its associated risks. If you’d like a more in-depth explanation, feel free to read the Acala Whitepaper.

CDP Functionality

A user who wants to mint kUSD stablecoins on Karura must first deposit tokens of one of the accepted collateral assets (e.g., KSM). Once the user has done so, the min collateral ratio parameter determines the minimum amount of the collateral needed for a user to mint kUSD. For example, if the user deposits $100k worth of KSM, and the min collateral ratio for KSM is 2.5, then the user can mint at most $100k/2.5 = $40k worth of kUSD. This mechanism ensures that the kUSD will be collateralized even if the market price of KSM suddenly decreases.

If the market price of the CDP’s collateral asset drops low enough, the CDP may be considered “unsafe.” The parameter which determines the “unsafe” threshold is the liquidation ratio. Using the previous example, imagine the liquidation ratio is 2.0. If the value of the KSM collateral drops to $80k, then the new collateral-to-debt ratio is $80k/$40k = 2.0. Since the collateral-to-debt ratio has reached the liquidation ratio, the CDP is now considered unsafe and eligible for liquidation.

During the liquidation process, the CDP owner’s locked collateral will go up for sale in an auction. Liquidators will bid kUSD stablecoin to pay back the outstanding debt plus a liquidation penalty, which is an additional percentage of debt the CDP owner now owes due to their vault getting liquidated. For example, if the liquidation penalty is 10%, and this CDP is liquidated, the new amount of debt needed to raise is $40k * (1 + 10%) = $44k. After raising the kUSD, the remaining collateral (if any) is returned to the CDP owner.

Karura Risks

In the previous example, imagine that the KSM collateral value in the CDP decreases to $30k. We would have an undercollateralized CDP with $44k of kUSD debt and only $30k of KSM collateral. If a liquidator only bids $24k kUSD for the KSM, then the remaining $44k — $24k = $20k of kUSD will, unfortunately, need to be raised by auctioning off the protocol native KAR tokens. This $20k worth of excess debt is a metric we refer to as Insolvent Debt and is the primary metric we will look to minimize for the initial Karura launch.

Goals

Our goal at Gauntlet is to generate “conservative” parameter recommendations for the Karura V1 launch. We define “conservative” as parameters that result in at most 1% Insolvent Debt in the system after 24 hours during levels of extreme volatility (>=600% annualized). For example, imagine the total kUSD outstanding in the Karura system at the beginning of the day is $25MM. In this case, 1% Insolvent Debt would mean $250k of kUSD had to be financed using KAR throughout the day during insolvent CDP liquidations.

Deliverables

Gauntlet will accomplish these goals by simulating the Karura system under extreme volatilities and varying values of the collateral-specific Karura risk parameters listed in the table below. Gauntlet will analyze the Insolvent Debt metric and determine which parameter value combinations are most appropriate.

For now we will provide these parameter recommendations for the Kusama (KSM) collateral asset. Going forward we will deliver recommendations for other collateral assets as their release dates approach.

Methodology

Gauntlet runs thousands of Karura CDP agent-based simulations across various volatilities, parameter values, and collateral assets.

Each simulation corresponds to a 24-hour time period, where we simulate price movements and resulting CDP liquidations. In addition, we log all the relevant key metrics throughout the simulation, such as Insolvent Debt.

Before starting each simulation, we initialize CDP Users and Liquidator Agents, generate price trajectories, train slippage and impact models, and deploy relevant smart contracts on our simulated chains.

Initial CDP Positions

We generate CDP Owners for each collateral asset. Since we always err on the side of caution, we assume that the CDP Owners will collectively max out the debt ceiling parameter. As a result, if the debt ceiling tested is $10MM, all CDP Users will collectively mint $10MM worth of kUSD. Their initial collateral allocations are set using a Pareto distribution and are a function of the liquidation ratio, min collateral ratio, and liquidation penalty. We also err on the side of caution by assuming that CDP Owners will not add any more collateral to their CDPs throughout the simulation, despite any decreases in collateral prices.

Ticker-Specific Assumptions

To generate our price trajectories and train slippage and impact models, we need relevant market data. As of June 28, 2021, we know the following market statistics for KSM, on which we can train our models:

  • Annual Volatility: 200%
  • Price: $204.89
  • Average Daily Volume USD ($ADV): $200MM

Price Trajectories

Using the initial prices and annual volatilities, we generate correlated 24-hour price trajectories for each collateral asset.

Slippage Models

When a liquidator sells the collateral they just bought on an exchange, they will incur slippage costs. These are important because the slippage factor determines how much a liquidator is willing to bid for the collateral in a CDP. Therefore, we train slippage models for each collateral asset as a function of volatility, trade size, and average daily volume.

Impact Models

When a liquidator sells the collateral they just bought on an exchange, they will incur slippage, thus impacting the market price. But this slippage doesn’t necessarily permanently impact the market. For example, if the token price of KSM slips from $200 to $180 purely as the result of a liquidator’s large arbitrage sale, another agent may notice this sale and bid KSM back up to $190 within a few minutes. As a result, we train our impact models to revert to the pre-traded price using an exponential decay model.

Running the Simulation

After all the agents are initialized, CDPs opened, volatilities inflated, price trajectories and impact/slippage models trained, we are ready to start the simulation. At each time step throughout the 24-hour simulation, we update the price of each collateral asset and check to see if the price changes result in any liquidatable CDPs. If so, a Liquidator Agent will bid a certain amount of kUSD for the collateral in the liquidatable CDP. The bid amount is a function of the collateral price, profit margin, and expected slippage.

When the liquidation occurs, we save key metrics about that liquidation, including the amount of Insolvent Debt required to liquidate the CDP fully. The liquidator then immediately arbs this liquidated collateral on an exchange, resulting in slippage and price impacts. The simulation terminates after 24 hours of collateral price movements have been simulated.

We will run thousands of simulations for a given set of parameters to generate a large sample size of price trajectories and be confident in our estimate for the average 24-hour Insolvent Debt estimates. We then determine which parameters to vary to find a set that produces an acceptable “conservative” average Insolvent Debt ratio of 1%.

Current Recommendations

Given the current state of the market, Gauntlet has arrived at the following conservative parameter recommendations for the KSM collateral asset on Karura’s launch:

  • Liquidation ratio: 2.25
  • Min collateral ratio: 2.75
  • Liquidation penalty: 17%
  • Stability fee: 3%
  • Debt ceiling: $25MM

Note that these parameter suggestions are prone to change in response to market changes.

Analysis

Because collateral assets such as KSM have very low $ADVs, increasing the debt ceiling parameter resulted in the most Insolvent Debt. The $ADV of KSM is roughly $200MM, so a debt ceiling of $25MM and min collateral ratio of 2.75 means that at least $25MM * 2.75 = $68.75MM of KSM can be locked in the system at once. If the price of KSM were to decrease drastically, this could result in many CDPs simultaneously becoming liquidatable. Additionally, liquidators selling the liquidated KSM on illiquid exchanges results in a cascading market impact effect. Liquidators hit the price of KSM down, thus resulting in even more CDPs being liquidatable and thus increasing the risk of more Insolvent Debt. As liquidity increases, we look forward to recommending more aggressive parameter values.

Future Recommendations

Going forward, KSM market statistics will continue to change, and Karura will begin to accommodate more collateral assets. As a result, Gauntlet will update the ticker-specific parameters based on market changes, retrain slippage and impact models, and continue to run simulations to provide Karura with updated parameter recommendations on a weekly cadence. As noted before, we will keep a close eye on the $ADV and volatilities of each collateral asset to determine the optimal parameter recommendations.

Conclusion

Karura’s initial launch on Kusama is an exciting opportunity to use DeFi protocols within the Polkadot ecosystem. In addition, Karura provides new options for users to mint stablecoins and utilize their yield generating L-KSM for collateral or payment, without compromising the network security. We at Gauntlet look forward to providing continuous risk management for Karura and Acala at launch and beyond.

(Special thanks to Hsien-Tang Kao, Nick Cannon, and Tony Salvatore for their help on this post)

--

--