USTC Re-Peg: "Ziggy" + Pendulum

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. This date is subject to change!

1. Previous Discussions
#1 Modify Luna Exchange Rate with Novel Fee Variable: apply a fee to uluna exchange rate after the Voting Procedure is completed called ArbitrageModifier (or similar).

#2 Ziggurat: utilizing the concept of pegging USTC “penny by penny” (step-wise) to reach our goals, a.k.a. “soft-pegging,” using the ArbitrageModifier.

#3 Ziggurat and the Exchange Rate Modifier (ERM); using dynamic peg control using the Greeks (options).

2. Summary
This is a 4/n discussion to propose a way we can “hold the peg” using simple incentives to engage in arbitrage at any price level between Terra <> Luna. We do this by applying a fee to the usdr exchange rate (“Luna”), or to the stablecoin tokens like uusd (“Terra,” or USTC in this case), and add capital controls like heavy taxation when it moves too far from an arbitrary “peg.”

This discussion iterates on the previous concepts and clarifies important issues highlighted by community feedback. The discussion points are:

  • Is modifying the exchange rate after the VoteProcedure considered “market manipulation”?
  • Do “fees” and “taxes” differ when discuss “monetary policy”?
  • Is “monetary policy” considered a form of “market manipulation”?
  • If we move forward with a proposal like this, how do we ensure it doesn’t spiral out of control?
  • Similarly, how do we ensure we’re prepared for what happens when it returns to peg?

3. Background
The proposals asks to add an automated fee – much like many other Layer-1 “gas” fee systems – that is centered around USTC itself, instead of the L1 token (in this case, LUNC). For this proposal discussion series, this modifier is called the ERM, or ExchangeRateModifier.

The ERM increases or decreases the exchange rate for USTC by a given amount, say, +-0.15%, after it’s submitted. This brings up an interesting discussion point: what triggers the ERM in the first place?

Many Layer-1s, like Ethereum, will refresh rates based on network activity, or how much people are using it. The core issue with using Ethereum (ETH) for gas is that its value changes all the time, and its supply always changes. Imagine at one moment you are paying $15 for a transaction fee, but if you wait 30 seconds, it could be $18!

We struggle with this problem on Terra Classic, except we’re in a much “safer” position because we use USTC instead of ETH. If you use it on our network, it’s the difference between $0.01 and $0.015. Not a big deal for small transactions, but start trading a lot and the half-cent adds up.

You can see some stats on Ethereum at ultrasound.money.

4. Motivation
Re-pegging USTC extends to a greater idea – repegging SDT. Don’t know what that is? It’s Terra’s version of the International Monetary Fund’s Special Drawing Rights, or SDR. In our code, we refer to it as SDT, or you might better know it as LUNC.

Wait, re-pegging LUNC? How does that work? Well, we service more than just USTC. KRTC, which is pegged to the Korean Won (KRW) makes up at least several percent of the capital that LUNC can service. We have 20 other countries we also service, or can service, with an ability to add more!

It might be more accurate to think that we re-peg SDT with about $1.5b of value, or the difference of LUNC’s market capitalization and USTC (+KRTC+other Terra stablecoins). $1.5b is a much more manageable value than $9.5b, which we’ll have to address down the line, of course.

Now, the motivation behind this proposal is the same as anybody’s – make money, direct that value back on-chain. In this sense, the ERM proposal just asks people who have USTC on other exchanges like Binance to bring it back on-chain. We also give them the opportunity to stake with us, or cash out – it is a free market, after all.

5. Addressing Market Manipulation Concerns

The Proposal asks for the exchange rate of our native tokens (LUNC, USTC, KRTC, etc) to be modified after the original prices are submitted by validators.

The core question asked by @NovaValidator is: how is this different from market manipulation?

The counter-argument here is: isn’t anything that we manually vote in market manipulation – say, the tax, or increase in gas fees? Or does this differ if we instead label these as monetary policies and then lump it in with inflation? Now it’s okay, right?

The only difference between Cosmos’ inflation module, as it were, and monetary policy in governments, is that it automatically distributes based on how much capital stake users have in the network. It is predictable on a per-block basis.

When you elect a leader to decide “how much we should inflate by” every year, we end up with an inherently unpredictable facet (humans). The additionally have their own biases – we all have a tendency to be self-preserving and in the interest of maximizing our own gains.

It would simply be easier to “elect” a program and then alter the program mutually in an open-source environment. We can observe how it works, and train its branches or prune them, as necessary.

It is, therefore, my opinion, that automated systems aren’t market manipulation, because it requires collective effort to change. If we elect a board to enact all changes, especially ones that relate tangentially to the idea of “monetary policy,” we are in danger of mirroring how our governments work already – just without having learned anything.

6. Proposal for Non-Technical People

We make a lever that moves the price of any Terra token (including SDT, or LUNC). We add a trigger that begins this, to avoid purposefully incentivizing one party or other. In code, we’d call this a conditional (if A then B)

We can think of it like a grandfather clock. For all you zoomers in the room, a grandfather clock looks like this:

Anchor_escapement_animation_217x328px

The Anchor escapement mechanism allows the clock to run with the pendulum – in this case, we determine a “soft peg” to begin the swing.

We could pre-determine when we’re going to start this – or we could code it as part of the algorithm. In this case, we want to use time – for options freaks, this might be called theta, and in the context of blockchain, we’d say number of blocks until expiry.

Let’s say we determine the “soft peg” by taking the last given exchange rate. For example, this might be USTC = $0.02. This is our “pendulum.” Now, how far can we swing?

We pick two parameters: high and low. When the price swings too high or low, we stop the mechanism. Say “high” is USTC = $0.03 and “low” is $0.01. We have a “swinging range” of $0.01.

In a way, this is like “volatility tolerance” of the algorithm. Terra’s algorithm is already designed with this in mind. Now we are adding a “time tolerance” for the algorithm. Options peeps might like analogies to vega / volga / vanna and theta respectively.

If we think about time with respect to how anchor escapement mechanisms work (pendulum in grandfather clocks), they are isochronal – or occurring in regular intervals. So, our “time tolerance” for this “soft peg swing” has to be a predefined set of blocks, say 10 blocks. (or a little over 1 minute, roughly two oracle cycles).

This allows predictability in our addition (or subtraction) of “torque” to the peg maintenance system.

7. Proposal
Add an exchange rate modifier (ERM) that derives a SoftPeg from the last-reported oracle prices cast. If the modifier’s already active (the state hasn’t changed), don’t apply the modifier. Then, determine a range of an acceptable volatility ModifierRange for this soft-peg – ±$N from SoftPeg. Finally, determine the acceptable time period for this modifier to be active by quantity of blocks, denoted ModifierBlockDuration.

To simplify this process, we apply a discount of ModifierRange / 2 if we’re “de-pegged” from SDT and a premium of ModifierRange / 2 if we’re over SDT’s peg.

8. Example

  • Capture the last-reported exchange rate for uusd is 0.020000.

This value is now SoftPeg = 20000uusd.

  • Conditional: is the modifier already applied? If so, cancel the function. Otherwise, apply it.

ModifierActive ? break() : applyModifier()

  • Determine acceptable volatility as ModifierRange, using an operator of addition or subtraction in uusd, or similar.

ModifierRange = 1500uusd
SoftPeg.high = 21500uusd
SoftPeg.low = 18500uusd
ImmediateModifier = 750uusd

  • Determine the amount of blocks for the modifier to be active.

ModifierBlockDuration = 10

  • Simulate results

The soft peg is $0.02. If the modifier’s not on yet, we turn it on. We tolerate a price swing of ±$0.0015 before shutting it off automatically. We tolerate 10 blocks of the modifier to be active before shutting it off automatically. When the guards are determined, apply a discount of $0.00075 to USTC until the guards’ conditions are met.

9. Community Bits

ELI5?

We re-peg this bad boy one soft-peg at a time. That soft-peg is whatever the validators reported last time. Since we’re de-pegged, we discount first.

Why discount first?

We need help, or in this case, someone else to make money to help stimulate our “chain economy.” If we’re over the peg, we benefit from paying people to use our chain instead of the other way around.

Can we use <other person’s> proposal?

Yeah, of course. We just need to decide on something that works for all of us, together. Some ideas I like so far is @RedlineDrifter’s Divergence Tax and proposals like @X-fileperseek’s buyback and save.

How do we benefit from this proposal?

For one, more trading creates more burning. It also creates more transactions which will send money to the oracle and community pool, which pays into the staking yield. If this mechanism is designed properly, we can actually eliminate the tax altogether and go full-force into the re-peg. You can buy LUNC or USTC at a discount depending on how it’s working at the time; discounted LUNC can potentially increase how much of the supply we need to “remove” by burning. (so, we might not even need to burn, if you think about it – since all of the LUNC would be bonded!) The most important aspect is that, if this works, we can not only re-peg, but have a methodology that keeps it there. Stable. UST.

Can you explain what you mean by “we might not need to even burn”?

When you stake (bond) LUNC to a validator, you remove it from what’s called the “float.” We benefit from having those tokens available to use, not destroying them. Burning contracts the supply; this does the same thing, but allows us to use that money collectively.

How do we know that a whale won’t come in and sell all their USTC at once? Won’t we back at square one?

We don’t, and yes, we will. This is also why we can’t peg overnight using debt restructuring (deliberate or through burns) or using reverse splits. In any of those cases, you’ve just altered supply holdings without accounting for proportionality. Even this method doesn’t guarantee that the peg will hold at a dollar. The point is that we develop solutions that can hold peg at any soft-peg level – because those methodologies are extremely transferable to other Terra stablecoins as we go global.

What about collateralizing USTC with BUSD (or another stablecoin)?

We can, but doesn’t that defeat the point of what USTC is in the first place – algorithmic and decentralized, not controlled by any institution, including Binance? This kind of proposal benefits not just Binance, but any market that’s had exposure to Terra assets. (So, all of them.) That is why it’s so important to get the finer details right and explain them so you know what you’re voting on. Fewer changes, higher impact.

Shouldn’t we test this before putting it live?

Of course. I would ask that this proposal starts by funding quants to crunch and collect data – it doesn’t necessarily have to be me. In fact, I would prefer it to be another team who can provide public testnet data. Users could additionally jump on the testnet, access a faucet (tokens provided for testing) and trying to break it – with incentives, of course. This way, we can refine the proposal for a go-live approach to handle billions in volume.

10. Personal Comments
Hopefully, this proposal should be simplified from the last iterations. I am trying to retain the nuance of the backend designs while making it easily understandable.

The reason I want to enlist quants to help gather data on a testnet is because we are ultimately trying to handle trillions in volume. Billions will be the first step, but trillions is the next step. (Remember that forex markets handle trillions in volume daily; this doesn’t even include derivatives markets, which Ethereum is more likely to be able to handle first.) We can also get the community participating in a testnet process, allowing them to understand how testnets work.

I would like people to consider that at least 40% of the USTC supply is held by Binance’s hot wallet, LFG, Ozone treasury (among many other treasuries) – basically, big holders. Re-pegging would do them right, but it may create an event where we suffer a huge price shock. Plans to address this are separate, as Ziggy is focused on “re-pegging,” not “preventing another de-peg”, though it does factor it in. We are looking, ultimately, to diffuse the risk by spreading out “who has the USTC,” but they need a reason to let go of it first – which, frankly, is going to be a re-peg.

On that note, we probably work with ~10% of the total supply. This proposal is the simplest way to appeal to the main users of the blockchain: arbitrageurs. The more robust our arbitrage mechanisms are, the more stakers benefit from their work. Think of it like earning a commission whenever forex traders used the network: if you earned 0.01% of a trade that was charged 0.02% in fees, and you got a million of those a day? You’d be sitting well year-to-year. Big picture.

18 Likes

When I see SDR,I shout out:oh my god!You guess why?Just because that’s the actual and professional use case of IMF to peg currencies of different countries. And occasionally & fortunately this ecosystem just designed by the same model.You know what is that mean?That means your proposal bring us more than repeg.You are a extraordinary genius!You bring us the most sustainable and stable structure in whole crypto world!Bravo!

And about your questions.I think that’s definitely not manipulation.It just a monetary policy.Because you can see every central bank & federal reserve & other crypto project change their policies according to the situation.Of course we are in emergency,so emergency policy is needed for us.If we don’t change anything,the situation will become worse.

I think it’s the ultimate solution for our situation now.Hope it will be tested well before implement.

Well done and thank you for your hardworking!

8 Likes

And about your questions.I think that’s definitely not manipulation.It just a monetary policy.Because you can see every central bank & federal reserve & other crypto project change their policies according to the situation.Of course we are in emergency,so emergency policy is needed for us.If we don’t change anything,the situation will become worse.

Here’s what really tickles my fancy about this proposal: you can theoretically add the ERM to any denom under SDT (TerraSDR). Meaning that we can onboard all of the countries under the supported currency list (like South Korea, Japan, the EU, the UK, etc) and they can apply their own parameters for the ERM.

Algorithmic currencies across the world. Gives me the shivers. Hoo-wee!

11 Likes

Now that would be a sight!

1 Like

It reminds me a word “decentralizing stablecoin”.People always talk about that,but no one knows what it to be like.And I think a lot before but it obviously beyonds my IQ.And now you bring it to reality.
That’s really fancy my buddy.You may creat the new era of this ecosystem and of course a new era of the whole AFT mechanism.

Nice. Let ustc burn.

2 Likes

Well done!! I think a slow approach to re-peg is what is needed. Well thought out, explained.

2 Likes

Good. But what about real ustc burns before?

Not a bad job duncan.
But this does not guarantee value to the ecosystem.

The adoption of TERRA had nothing to do with the algorithm.

it had to do with surreal incentives, which translated into an advantage in the competition.

This type of misfit we all know what it leads to.

Without a competitive perception of the changes you propose.
To say that something gains value is totally wrong. Historically, it is known that you are closer to failure than success.
With rare exceptions, humanity is all moving in the same direction,
“Get more with less effort.”

In general, the ecosystem needs mobilization and not miraculous systems.
There is a place for what you want to do, but that shouldn’t be the purpose of the ecosystem to exist.

do you want a key?
The number of arbitrations you can make is proportional to the number of mismatches.
This can give a list of priorities to be worked on in the ecosystem.

The only way another depeg is guaranteed to be avoided is by backing up all available UST with actual collateral in real world currencies.

Kujira has beaten us to that. They have an over collateralized stablecoin $USK that is easy to transfer through IBC. The only hope now for USTC is under collateralized

2 Likes

Not a bad job duncan.
But this does not guarantee value to the ecosystem.

I think guaranteeing results is a death wish. I would rather adhere to probability.

Currently, mobilizaiton, as you mention, is slow. Several discussions to-date have indicated there is not much concern for the economy; we are A-OK as long as the drip-feeder of risk-free rewards continue. I seem to be in the minority here.

Alas, sans onboarding tangible incentives through usable products, we must appeal to the users who are actually creating value on-chain – high-frequency traders. Unfortunately, most of them moved to Binance, because it’s just easier to perma-short LUNC while funding it with said rewards. I find it ironic.

6 Likes

Thank you for this proposal - I like it very much and I’ve been waiting for it … From our programmers - in vain. You talk about the mechanism and I see that you understand how weak a person is when he has the opportunity to get rich at the expense of others … How often he succumbs and how many people in the crypto world try to win something in the scam. It’s sad but it’s true. Not about that though. I thought about it a long time ago because the mechanism of the clock - market fluctuations is a very powerful tool, provided that you know how to use it correctly.
I just want confirmation of this in a simulation, that’s what you’re proposing too, and it’s necessary! I will add, however, that duplication and protection of value in other coins and networks is necessary in the current reality, there is no point in explaining why. Every good trader knows, that you need to have full exposure in your portfolio if you want to survive. Today under the cart and tomorrow on the cart. Live is live…

3 Likes

I just want confirmation of this in a simulation, that’s what you’re proposing too, and it’s necessary! I will add, however, that duplication and protection of value in other coins and networks is necessary in the current reality, there is no point in explaining why. Every good trader knows, that you need to have full exposure in your portfolio if you want to survive. Today under the cart and tomorrow on the cart. Live is live…

I would very much like to see a testnet simulation with the help of some developers. (It will take me quite a bit to stop most of what I’m doing and learn the stack!)

There are some details I’d like to refine but perhaps the proposal itself can outline, ‘hey, we need a grant (or similar) to get this tested.’ Particularly - applying a burn on the algorithm; clarifying how broad to introduce the “gas range”; and a few other things.

The interesting part of this is that it works very similarly to the old mechanism. The only difference is that it does not require new Luna to be minted in order to engage with it. I am thinking that if we include a burn on this mechanism that scales up and down as required, then we can deprecate the tax code and bring money back on-chain. Provided we can also port Luna2 dapps when this occurs, it would be very bullish for both chains.

4 Likes

Sounds incredible good

USTC REPEG COMING

3 Likes

A lot of it was written with that DEX in mind, it is just that I am strictly opposed to linking anything to the Oracle pool. Note that this iteration of the proposal doesn’t mess with oracle functionalities. Once the prices are collected and sent through MsgAggregateExchangeRate, the modifier applies then.

Alternatively, this research would contribute well to a L2 options-DEX. Other Terra Stablecoins need more love.

8 Likes

We collateralize it to a fraction of a dollar to begin with and just build up the reserve over time.

2 Likes

If the prop gets threw and fomo jumped in it will pushes from alone to 0.1$ and then it will become a meme
We need also ask binance cz for help. It will become a meme and you a legend

1 Like

@wrapped_dday
Can you expand more on SDT / SDR, particularly it’s role in the Terra Classic ecosystem, and how / why exactly it needs to be repegged as well as how it lost it’s peg? We believe this will be important knowledge for the community to be informed about when it comes to this proposal.

1 Like

Soooo… if I’m getting this right you want to manipulate price-feeds, and do it post-consensus? :thinking:

Yeah… here’s Binance, after they blacklist our whole chain:
laugh-haha

I don’t think the wider market will take kindly to us localizing decentralized consensus. :joy:

Apart from that tiny but crucial detail, nice prop! :+1:

But I doubt it’ll fly in its current form.

Shalom! :pray: