0. Disclaimers
I manage the Onyx validator with the assistance of PFC . I mostly work solo and self-study crypto ecosystems; therefore, I do not have any formal affiliation with Terraform Labs, or other major organizations like TerraCVita.
The final proposal will be put up on January 31st, 2023 for vote.
1. Preface
Please see the last discussion, Modify Luna Exchange Rate with Novel Fee Variable, to review the technical context behind this proposal.
2. Summary
This is a 2/5 discussion to propose a scalable method of encouraging arbitrage of Terra <> Luna at any price level, especially our deep-discount (“de-pegged”) levels. This discussion is focused on the financial feasibility of the “Ziggurat” proposal.
3. Motivation
Terra Classic is based on users’ willingness to take profitable trades known as arbitrage to maintain stability. If Luna trends >$1, there is an incentive to sell it for profit. If TerraUSD trends <$1, there is an incentive to buy it for under $1 and sell it at $1+. While this remains true when TerraUSD trends closely to $1, the deeper it goes, the more high-risk that trade becomes for an individual trader, and they are less able to recover value fully on an individual basis. We need to provide incentives for traders to buy a deeply-discounted TerraUSD, while also ensuring they don’t need to wait several centuries to execute this profitable trade.
4. Background
The “Ziggurat” re-peg proposal can be read in summary at this thread: Ziggurat Proposal
Ziggurats are stepped pyramids that were often made in Ancient Mespotamia. The Ziggurat served as places of worship, preserved privacy for priests and ritual at the top of the ziggurat, and in times of flooding, allowed said priests to flee to high-ground.
Like the Ziggurat, we need a flood of liquidity (capital), a private place for priests to perform rituals (a “quiet space” for devs to do their work), and most importantly, a step-wise approach to re-pegging USTC, and by extension, all of Terra.
The Soft Peg
There have been many suggestions to simply force the USTC peg to be at some “penny” of $1.00 – e.g., $0.01, $0.10, $0.25, etc. By doing this, an arbitrage opportunity is made, and stays fixed until we decide to flick that switch off.
This is the right idea, but it suffers from the question of who’s taking the trade?
Let’s take two examples.
Example 1: The over-peg premium
In this example, Terra pays $0.01 for every unit of USTC sold on-chain by pushing the value to LUNC. This is done by sending USTC from Binance to Terra Classic, then swapping it to LUNC, and sending the greater lot of LUNC back to Binance, closing it for greater profits in terms of BUSD. This means that LUNC sees sell pressure (negative price action), Terra Classic collects burn taxes on 5 instances and 1 instance spread fee. Binance pays the arbitrageur’s premium in BUSD, and Terra pays it in LUNC.
Example 2: The under-peg premium
In this example, Terra pays $0.01 for every unit of USTC sold on-chain by pushing the value to external USTC holdings. This is done by sending USTC from Terra Classic to Binance, then swapping it to LUNC (or immediately to BUSD). Then, the route can repeat by sending the greater lot of LUNC or USTC back to Terra Classic. Binance pays the arbitrageur’s premium in BUSD, and Terra pays it in LUNC.
Note on taxable events
It’s not guaranteed that full routes are used; these are “best case scenarios” for tax proponents.
Note on how LUNC sell pressure occurs on the under-peg
By soft-pegging to any given amount that deviates from the oracle, we force ourselves or another party to pay the premium. Repeating the arbitrage loop is more likely to happen on LUNC, while USTC arbitrage is closed cross-market. That is, the arbitrageur repeats the trade by sending LUNC to Terra and swapping it to USTC, then closes the USTC trade at the same time on Binance to secure the profit.
The Soft Peg, Part 2
The core symbology of Ziggurat’s steps lends to taking the ideas above and targeting “soft-pegs” that exist above or below whatever the current price of TerraUSD (USTC). We can consider each “soft-peg” target a “step” in any re-peg plan, as they more achievable in the short-term.
That’s to say, we’re going to try and peg USTC at $0.02, then $0.03, then $0.04…all the way up to $1.00, and beyond that if we’re feeling ambitious.
Approaching USTC re-peg in this manner will provide a larger suite of data to work with. What’s the best solution for pegging at each penny going up?
5. Proposal
Introduce a new arbitrageur fee lever, ArbitrageModifier()
, that alters the Luna Exchange Rate at either a premium (higher price) or discount (lower price) after oracle-fed exchange rates are voted on and cast, starting with whitelisted denom
currencies.
6. How it works
Terra uses a price-feeding system known as the Oracle module. In this process, each validator casts a Prevote
for what they believe the best exchange rate is for the given currencies (usdr
, uusd
, ukrt
) – a “price consensus” process.
This exchange rate is revealed in the Vote
Procedure. The exchange rate cast by the validator during the Prevote
is encrypted in a “salt,” or a kind of “password” in this case, and revealed alongside the exchange rates given in the Vote
. This “password” ensures that the validator didn’t try and change the price between the Prevote
and the Vote
.
We then apply this new ArbitrageModifier()
to either increase or decrease the price of USTC on-chain.
ArbitrageModifier()
would first apply to the Luna Exchange Rate, or usdr
, a.k.a. SDT/TerraSDR
. This specific denom
is pegged to the IMF’s SDR. (glossary definition)
In turn, this pushes every forex token up or down in the Luna basket. This can be considered a “global” lever for incentivizing “de-peg control.”
The wiser move is to override this global functionality for each forex token (denom
) in accordance with each country. In this case, the only whitelisted denoms
available for this modifier are uusd
and ukrt
, which is the US Dollar and Korean Won, respectively.
The following pseudo-code demonstrates such a functionality in C# syntax:
public static void ArbitrageModifier() {
public float NewExchangeRate = ExchangeRateModified;
// Create WhitelistDenoms Dictionary with KVP name:terra_denom
var WhitelistDenoms = new Dictionary<string, string>
{
{"SDT", "usdr"},
{"USD", "uusd"},
{"KRW", "ukrt"},
};
// The amount to modify the ticker currency in %.
private float ArbitrageModifierRate = 0.0015; // +0.15%
// Pass the ArbitrageModifierRate as "modifier"
private float ApplyArbitrageModifier(string ticker, float modifier)
{
float ExchangeRateModified = ticker * modifier;
return ExchangeRateModified;
}
}
In this case, the only thing the network needs to do is provide a Modifier Rate which will bump this number up or down by a given percentile.
In short, we take the exchange rate of Luna, and then provide a positive incentive for arbitrageurs to take the trade.
7. Caveats, Pros and Cons
Oracle security should not come into play here as mentioned in the first proposal, because the modified exchange rate is applied after the validators cast their vote. However, this is a direct manipulation of Terra prices, and if handled by LUNC governance (and not an automatic handler), the risk of manipulation errors are a governance burden. (i.e., voting for prices in the DAO’s favor)
With respect to the former, this also means that price action of LUNC is contingent on governance. This delivers a solid reason to increase tax rates, as a poorly constructed arbitrage modifier will punish LUNC constituents, and a well-constructed arbitrage modifier will reward them. Additionally, modifying the price in such a way also affects every other market in crypto, including, but not limited to, CEXs like Binance and DEXs like UniSwap (via wUST
), in a similar manner.
Encouraging fluid arbitrage on-chain in the form LUNC <> USTC
, beyond what we have, is the core of Terra. This allows us to determine whether swaps are viable again, and should contract the supply at a faster rate (i.e., burn a lot).
Fees taken from the ArbitrageModifier
can be used to fund the oracle pool.
Lastly, the price may converge over time to match the market rates. This would require us to turn off this modifier – implicitly selling USTC at a discount (i.e., a negative rate). This has benefits and drawbacks. Ideally, we can turn this on until prices converge (soft-peg), then turn it off and allow the market to let LUNC price recover.
Pros
Higher trading activity on USTC pairs leading to burns and profitability
Greater fees from the premium may be used to fund oracle pool (via swap/tx fees)
Prices converge over time naturally – lever turns off, LUNC price recovers or improves (especially with discount purchasing)
Cons
Higher trading activity is not guaranteed, but more likely
Potential negative price action on LUNC (due to arbitrage with USTC)
Price converge over time naturally – lever turns off, USTC sells at discount
8. Personal Thoughts
Directly modifying the price via governance feels ethically grey to me. If we understand how Terra works at its core – unsecured, synthetic capital – then creating this kind of modifier makes sense to me. It would allow predictability (to some degree) of such synthetic capital, especially when Terra stablecoins re-peg.
I am concerned about giving this handler to governance over automated parameters, but seeing as Terra tokens are synthetic in the first place, we need people who are willing to be responsible for the commissioning and decommissioning of synthetic capital (“cryptocurrencies”).
The far greater concern on this latter point is eschewing decentralization for centralization. This inadvertently creates a “DeFi bank,” but run by people and not protocols. Once the data is acquired, we should consider automating this parameter to bolster decentralization.
From a price perspective, adding this lever pushes the Terra <> Luna arbitrage in one direction or the other. By adding a premium on-chain (over-peg), we can collect more taxes, so long as it is not too high. When we turn this off at market price convergence, an automatic, negative discount applies. This allows us to lower taxes, and then recover the price of LUNC, which is likely to take a hit with this lever, but external markets using Terra capital will pay a premium.
Hence, it is extremely important we create and maintain good relationships with CEXs and other protocols/L1s that are using Terra capital already. Creating a lever that directly impacts their markets is not ideal, and we should give them an opportunity to burn their capital back to the network (demurrage in banking) to avoid being locked into Terra’s capital. This also requires a degree of collateralization that does not exist on LUNC.