Mirror v3: Adjust Mint Parameters

Mirror Protocol operates on the Decentralized Finance platform Terra. Mirror seeks to provide synthetic investment price exposure otherwise unavailable to users on the Terra ecosystem, and more generally, the crypto space.

Terra’s Mirror was the first protocol to draw attention to the Terra Ecosystem. Since then, another TFL (Terra Form Labs) original project, Anchor, has stolen the spotlight for the protocol with highest TVL on the ecosystem. Anchor is now what Mirror once was; the protocol with the highest contribution towards UST adoption. Mirror has unfortunately been left by the wayside, but remains an integral part of the Terra Ecosystem given the unique investment opportunities it provides to its users.

Part of the laggardly behavior of Mirror comes from the Minting process. As it stands mAssets (mirrored Assets) are CDPs (Collateralized Debt Positions) which require a minimum amount of collateral to be locked in exchange for an agreed ‘equivalent’ value of mAsset based on an Oracle Price (real-world reference price). The issue of the current system is that the price spread between the oracle price and the Swap Price (the exchange price), are sometimes quite large (>5%). These spreads are not ideal for those looking to trade trends that match the real-world market price swings.

The Problem

In order to specifically eradicate the premium side (swap price > oracle price), shorting/selling of an mAsset must be promoted and incentivized. Short Farming, introduced in Mirror v2, sought to address this and did so with decent success. Unfortunately, given that Mirror CDPs require overcollateralization, users must provide more than equivalent value to mint an mAsset to ensure that, given extreme oracle price volatility, the backing of mAssets remain solvent (value of collateral > oracle value of minted Asset). Most of these minimum collateral requirements are upwards of 1.5x the minted value which makes short farming and minting quite costly. I’ve discussed the specific adjustments that should be made to short farming to more equitably benefit the ecosystem here in this article, I instead seek to address the cost of minting, i.e. the MCR (Minimum Collateral Ratio).

The Solution(s)

Because MCR for many mAssets is set to 1.5, the cost of arbitraging the short side of a swap pair via minting becomes too high, even for minimally volatile assets. I propose that we manually adjust mAsset MCR on a per-mAsset basis according to their daily volatility until an automatic approach, or better solution, can be implemented. Using daily volatility to define MCR provides a decent representation of the volatility across time frames where adjusting ones collateral would be financially relevant. There are several metrics that I used to determine said daily ‘volatility’:

‘Standard Deviation’ — A staple variation metric in statistics that describes the spread of values from the mean of a data set applied to daily price ranges of an asset (High versus Low). Useful in determining the zone of likelihood as to where an additional data point might fall in predictable data-sets.

‘Positive Price Uncertainty’ — A metric (of my own design) that measures the ‘uncertainty’ of positive price change. Useful in determining base level positive price volatility (Figure 1).

Figure 1 — When mean(High, Low) > mean(Open, Close), the proportion of their differences (avgHL minus avgOC) relative to the total price range quantifies positive price exposure. Errors include times when candles gap or when open = high and close = low. Daily candles are less likely to gap vs lower time frames, thus the choice; this is also, why 5 years of data was chosen. Where ’n’ is an arbitrary decimal value up to a maximum of 0.5.

‘Average Price’ — A simple average of the daily price range over a given time period. Useful in comparing how price has moved over time.

Discussion: Liquidations occur when the value of the mAsset in a CDP violates the MCR. This tends to occur when the value of the minted mAsset increases relative to the collateral value. This means that we want to quantify the positive price volatility of the asset. We can distill daily variation up to a weighted value of 0.5 by finding the median (more outlier resistant vs averages) positive price uncertainty for a given data set ‘N’. We can further take 3 * standard deviation of daily price ranges(N) / average price(N) to determine the local price volatility of the asset over N. Adding these two components together gives, I feel, a very equitable and safe representation of price volatility. I suggest rounding these calculated MCR values to the nearest 5% (always rounding up). I have laid out the end result of these calculations below.

The data set for each mAsset consists of the last 5 years of price data, or, if there is not 5 years of data, the maximum data points available (queried February 12th, 2022). PPU (Positive Price Uncertainty), STD/AP (Standard Deviation of Price Ranges / Average Price), MCR (Minimum Collateral Ratio), MCR(r) (Minimum Collateral Ratio Rounded to nearest .05 — always up)

Note: No MCR is below 1.15. Given the current liquidation contract and the lack of significant arbitrage methods, this is, I believe, the safest yet most capital efficient we can be.

Why can we lower MCR?

Normally, lowering minimum collateral ratios would be quite concerning as it would push users to be more risky given higher capital efficiency. This could strain the liquidation contract in the event of extreme market volatility. Fortunately, somethingelse — another longtime Mirror Protocol supporter, has graciously provided key liquidation data that has been very insightful in building my MCR solution. I will outline the most important points:

Most Liquidated Collateral: The % of liquidation transactions per collateral type can be seen below.

Most Liquidated Assets: The % of liquidation transactions per mAsset can be seen below (each label represents the mAsset whose collateral was liquidated and subsequently repaid).

The above data shows that some mAssets are more likely to be liquidated versus others due to asset volatility (mETH, mTSLA, etc) where all of the top mAssets by % are either cryptocurrencies or highly speculative stocks. The lack of liquidation transactions for less volatile assets plainly depicts the need for us to equitably adjust MCRs to improve capital efficiency of the platform. To note, mETH only has had ~350 liquidation transactions on Mirror which shows just how much room there is to grow. With the aforementioned adjustments to MCR, Mirror will be able to keep up a bit better versus other synthetics platforms.

Other Potential Changes:

Liquidation Discount Reduction: I suggest that this change be concurrently implemented alongside a lowering of the liquidation premium to a 10% discount from 20%. Otherwise, bots waiting for the ‘optimal liquidation’ discount could let a CDP become insolvent before being liquidated. Such insolvency would only occur on the CDPs with 1.15 or 1.2 MCRs where insolvency may lead to cascading liquidations for a particular pair given enough market volatility.

Liquidation Redundancy: Improved capital efficiency and shorting rewards/opportunities from the short farming fix in conjunction with MCR changes will likely increase liquidations. For these MCR changes to be even more safe, liquidation contracts themselves must be adjusted and improved. Others have spoken about porting Anchor’s liquidation queue to Mirror, which I fully support. A frontend UI would also be quite useful in democratizing liquidations. Historically, only ~20 liquidators have participated in liquidations on Mirror according to the data I’ve been provided.

Safe Collateralization: On top of adjusting MCR, I suggest the interaction with the collateralization contract be adjusted to better protect users through the implementation of a collateralization threshold similar to Anchor’s borrow model. The bottom of this threshold would be a ‘safe’ value above MCR to prevent immediate liquidation that cannot be exceeded. I suggest this point be placed to allow an oracle price increase of 5% for any new mint position (specific to MCR of an mAsset).

Let me know what you think! Discussions are happening all the time: feel free to post any responses/questions with a link to this article in Mirror Protocol’s Discord and Forum, or simply comment below!

Discord: https://discord.gg/KYC22sngFn

Mirror Protocol Forum: https://forum.mirror.finance/



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store