The Terra Protocol is designed to guarantee Terra’s stability and facilitate its broad adoption. Most cryptocurrency protocols choose to pursue one of the two, and very few have succeeded at either. Terra’s design is unique in that it elegantly balances between the two, diverting resources where they are needed the most. In an earlier post we discussed the major components of the protocol. Here we dive deeper into the stability mechanism and discuss the efficient allocation of resources between stability and adoption.
The Importance of Miners
Recall that Terra runs on an independent Proof of Stake blockchain based on Tendermint. To participate in the consensus mechanism, miners acquire and stake Luna. They propose blocks at a frequency proportional to their Luna stake, so we can think of Luna as mining power on the Terra network. In addition to this, Luna facilitates expansion and contraction of Terra’s supply to keep its price stable at the peg. The protocol acts as a market maker for Terra and uses Luna to buy and sell at the target price, meaning that it mints Luna to buy Terra and earns Luna when selling Terra. The supply of Luna thus absorbs changes in demand for Terra. The stability of Terra relies on the protocol maintaining both sides of this contract.
In summary, miners play a foundational role in the security and stability of Terra. They provide the former by participating in PoS consensus. They provide the latter by absorbing short-term volatility in Terra demand. Stable demand for mining is a core requirement for both security and stability.
The Miner’s Calculus
The protocol has two ways of rewarding miners for their work:
- Transaction fees: All Terra transactions pay a small fee to miners. Fees default to 0.1% and are capped at 1% (and 1SDR), meaning that transacting with Terra will be much cheaper than transacting with traditional payment options such as credit cards
- Seigniorage (Luna burn): When demand for Terra increases, the system mints Terra and earns Luna in return. This is called seigniorage — the value of newly minted currency minus the cost of issuance (which in this case is zero). The system burns a portion of earned Luna, which makes mining power scarcer. The remaining portion of seigniorage goes to the Treasury to fund fiscal stimulus. The allocation of seigniorage between Luna burn and the Treasury represents an important tradeoff.
To understand rewards from the perspective of a miner, we look at the basic calculus one has to go through to determine the viability of a long-term commitment to mining on the Terra network. After fixed costs, the profit (or loss) from a mining operation for a single unit of mining power (1 Luna) comes down to rewards minus cost of work for that unit. A bit more formally, during a future work period t, profit or loss for a unit of mining power equals
Frequent alternations between profit and loss — positive and negative P(t) — would create highly unstable mining demand. The goal of the protocol is to make this calculus easier and more predictable. With that in mind, most of the uncertainty in P(t) comes down to the first term, ie unit mining rewards. As a consequence, unit mining rewards are the primary consideration for making a long-term commitment to the network. Stable unit mining rewards produce stable demand for mining, while volatile unit mining rewards produce the opposite.
By default, there is uncertainty both in total rewards (from fees) and in the supply of Luna, so both terms contribute to the volatility in unit rewards. First, rewards from fees tend to increase when the economy grows and tend to decrease when the economy shrinks. Second, Luna supply tends to decrease when the economy grows (because Luna is burned from seigniorage), and it tends to increase when the economy shrinks (because new Luna is issued to buy back Terra). The implication is that unit mining rewards have a tendency to move strongly in the direction of the economy, either up or down. By extension this also applies to mining demand.
Predictable Mining Rewards
In order to create mining demand that is long-term stable, the protocol creates predictable rewards in all economic conditions. To achieve this, the protocol uses transaction fees and the rate of Luna burn as levers to oppose changes in unit mining rewards. Transaction fees affect total rewards, while the rate of Luna burn affects Luna supply — the two determinants of unit mining rewards. The basic logic is the following:
If unit mining rewards are increasing:
- decrease fees
- decrease Luna burn
If unit mining rewards are decreasing:
- increase fees
- increase Luna burn
While working to smooth out fluctuations in miner compensation, the protocol also targets stable growth in line with the long-term growth of the Terra economy. This is a natural reward for their long-term commitment to serving the network.
To formalize those ideas, we discuss the mechanism to smooth out unit mining rewards in more detail (slightly simplified). Fees and the rate of Luna burn — the “stability levers” — are adjusted every week in response to changes in unit mining rewards. We define the rate of Luna burn as follows: what portion (%) of seigniorage does the protocol use to buy back and burn Luna, as opposed to depositing to the Treasury? Let f_t , b_t and R_t be transaction fees, the rate of Luna burn and unit mining rewards at time t respectively. Then the rule for adjusting the values of f and b is the following:
The update rules should now make clear what we mean when we say that fees (and Luna burn rate) oppose changes in unit mining rewards: the current value, f_t , is multiplied by the inverse change in unit mining rewards. For example, if unit mining rewards were cut in half then fees would double in response, and conversely if unit mining rewards were to double fees would be cut in half in response. The result is scaled by a small growth factor, 1+g , that permits gradual growth in unit mining rewards commensurate with the long-term growth rate of the economy.
Putting the Mechanism to Test
How well does the mechanism work in practice? We have run extensive simulations to stress-test and refine it under a breadth of assumptions. In what follows we share and discuss a representative example that applies significant stress to the mechanism and sheds light on how it achieves its objective. We consider a simulated 10 year period during which the Terra economy experiences both rapid growth and severe turbulence. We demonstrate how the protocol adjusts its stability levers in response to economic conditions, and how those adjustments in turn shape unit mining rewards.
The first graph shows simulated weekly transaction volume and its annual moving average. Transaction volume can be thought of as the GDP of the Terra economy. The economy experiences rapid growth followed by a severe multi-year recession that wipes out 93% of GDP over 3 years and requires 6 years for full recovery. This scenario is a stern test — if it were describing the price of Bitcoin it would be by far the longest bear market in its history and tied for worst in terms of drawdown (equal to the 93% drop between June and November 2011). While we think that Terra’s adoption-driven demand will be far more stable than Bitcoin’s speculation-driven demand, the stability mechanism has been designed to confidently withstand Bitcoin-level volatility.
The second graph shows transaction fees and the Luna burn rate, the two levers used by the protocol to smooth out fluctuations in unit mining rewards. We observe that both move opposite to the direction of the economy (which is also the default direction of unit mining rewards).
The third graph shows the annual moving average of unit mining rewards. The growth target we have set in this example is 15% annually. As was designed, unit mining rewards experience steady growth with low volatility, unperturbed by the cycles in Terra’s GDP. The adjustments in fees and the Luna burn rate have successfully absorbed the expected volatility in unit mining rewards and created predictable growth. This is achieved with fees that average less than 0.5% (with a momentary peak at the 1% maximum) and a Luna burn rate that averages roughly 50% (meaning that on average 50% of seigniorage is granted to the Treasury).
Allocating Risk and Resources
At its core, the Terra Protocol is a set of rules for allocating risk and resources efficiently. The primary source of risk is demand for Terra. The primary resource is seigniorage. How does the protocol manage them?
A system that receives a risky input and produces a stable output needs some way of absorbing risk internally. Demand for Terra is an external risk, so to create future certainty about Terra’s price the protocol inevitably needs to trade off certainty about some other variable in the system. In the short term Terra demand risk is absorbed by miners via Luna dilution. This is a problem, seeing as stable mining demand is a core stability requirement. Predictable rewards are key for stable mining demand, so the protocol transfers the uncertainty from mining rewards somewhere else: transaction fees and Treasury funding. The two stability levers are able to absorb volatility in Terra demand in the most severe economic conditions. In the process, seigniorage is more heavily allocated towards the Treasury during periods of growth (favoring adoption) and towards burning Luna during periods of duress (favoring stability). In practice the protocol is trading off some certainty in fees and Treasury funding for high certainty in the stability of Terra. We believe this is a favorable tradeoff for users, and one which will come easily as Terra gains broad adoption and has a track record of adding value to their lives. Terra’s users are its most stable foundation.
Many thanks to Do Kwon, Marco Di Maggio and Evan Kereiakes for their contributions to this design