Mirror v3: The Short Farm Overhaul

EuphoricBadger
4 min readFeb 12, 2022

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.

The one year anniversary of Mirror Protocol’s launch has come and gone. As it stands, the platform remains successful in its pursuit to provide its users with exposure to synthetic, tokenized versions of assets, real-world or otherwise. Unfortunately, users have noted a lack of development progress by the original team, even in the face of such a promising idea. It’s time for the community to step up and fix things ourselves; after all, that’s what decentralization is for — being able to take matters into our own hands.

To recap the most major changes to the platform: MIR emissions have been halved (as planned), voting parameters now require 1000 MIR instead of the original 300, and additional LP incentives have been moved from Terraswap to Astroport (both are dexes). This is about all that’s changed aside from the occasional listing/delisting of mAssets and, you know, MIR is trading quite close to all time lows at the time of writing.

What can we fix?

I’ve noted before that premiums/discounts, the price spread between the Oracle Price (real-world reference price) and the Swap Price (the exchange price), are a problem. These differences in swap and oracle prices are a result of an imbalance of the pair within the ‘xy = k’ AMM (See here for a breakdown on AMMs). This imbalance is the result of misallocated incentives to the long-side of liquidity provision and the current structure of short farming. Today, we will address reward allocations and the short-farm contract’s structure.

To refresh, Mirror v2 introduced a way to incentivize shorting an mAsset to balance dex AMMs via “short-farming”. Short-farming enables yield farming on what’s known as Delta Neutral positions which have grown quite popular despite being detrimental to the platform. Compared to other farming methods, delta-neutral positions either have a net zero effect on the AMM Pool (acting simply as a yield vampire), or don’t assist in stabilizing the premium.

How do we fix it?

Right now, short farming mints an mAsset and sells it to the pool in exchange for said interest. More specifically, mAsset is added to the pool while UST is simultaneously removed for 2 weeks (as a note, the contract locks UST from the sale of your mAsset for said 2 weeks) to hopefully balance the pool towards 0% premium/discount. In reality, users, whether it’s after the 2 week lockup or immediately, buy their mAsset back to hold a delta-neutral position and earn yield. I propose we overhaul the whole contract with already present mechanisms to get rid of that pesky 2-week lockup period and the zero-effect delta-neutral strategies. Let’s dive in.

On Mirror, a user can mint mAssets by creating a Collateralized Debt Position (CDP). Simply put, a user may lock up some form of $-value collateral to receive a newly minted mAsset in return. The current short farm already uses this, but to ill effect. We can better utilize the mint contract to solve short farming as follows: mint 2n mAsset (where n is any arbitrary number), sell 1n of the mAsset, and then provide liquidity with the other 1n mAsset + UST from the sale of mAsset. The amount of mAsset added to the AMM’s pool is the inverse of buying mAsset and then adding liquidity to the platform with more UST (Figure 1).

Figure 1 — This figure depicts a mock ‘xy = k’ constant product pool with zero fees or slippage and the effects that long farming (where the user buys the mAsset and LPs with it), and the NEW short farm

Note: On Mirror, these CDPs are overcollateralized. Overcollateralization makes it more expensive to mint an mAsset than what it costs to simply purchase the mAsset. To incentivize users to short-farm vs. long-farm given a swap to oracle imbalance, we must adjust reward allocation depending upon the cost of investment. This means taking into account the base MCR cost when determining reward weighting (Figure 2).

Figure 2 — Where ’N’ is an arbitrary amount of mAsset to be minted and X is the total mAsset in the Liquidity Pool. Given a MCR of 1.5, this would, at swap-oracle equilibrium, allocate 40% of liquidity provision rewards to Long Farmers, and 60% to Short Farmers. If swap price increases 10%, short farming reward allocation would go to 66%, and long farming rewards 34%. These percentages are related to the total amount of rewards given to all who provide liquidity, not the % APR. The sLP token definition is attached for reference.

Discussion: This equitably balances rewards allocated to sLP token providers and LP token providers while also opening the avenue for delta neutral farmers to benefit the ecosystem and earn yields for providing key liquidity to both sides of the pool. The current problem with long farming is that those who simply mint and LP are getting the short end of the stick in providing liquidity to the pool as they miss out on the short farm yields. This fixes that. Now, the only capital that short farmers or mint-LP users will miss out on, yield-wise, is the amount of overcollateralization they decide to take. I suggest that the developers that code this fix choose to make an entirely new sLP contract given that we want to sunset the old short farming contract. So long as those old sLP tokens are given rewards, some delta-neutral farmers will continue to act as yield vampires.

Moving Forward

This article is just one piece of a series of publications that seek to help steer Mirror in a better direction. Look out for my pieces on collateralization fixes and arbitrage methods!

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/

--

--