stLuna: The Next Generation of Liquid Staking on Terra

in Lido by Lido

TLDR (who has time to read long posts nowadays?)

Lido makes an upgrade of bLuna on Terra. The upgrade aims to increase Terra's liquid staking utility and decentralization. The main outcomes of the update are:

  1. A new token — stLuna — is added. Unlike bLuna, the stLuna rewards are auto-compounded.
  2. Delegations are distributed evenly among validators. Users cannot choose a validator while bonding Luna.
  3. The Lido DAO is now able to take fees from rewards.

 

Also, bLuna-Luna and stLuna-Luna pairs are going to be incentivized on Astroport.

 

Try the staking app: terra.lido.fi

Read the docs: lidofinance.github.io/terra-docs

 

Want to know more?

Terra Autumn is still not over and it wouldn't be complete without the upgrade of the main liquid staking protocol of the Terra blockchain. This post is going to uncover the changes to be made, the reasons for such changes, and the benefits of the new protocol version.

 

Why the need for an update?

bLuna's release was a big step for staking on Terra. It added the liquid staking mechanics to the Terra blockchain and made staking more user-friendly; it was also crucial for launching the Anchor protocol.

But bLuna's design has several peculiarities. Such peculiarities include:

 

Uneven distribution of delegations

At the moment, the user of the protocol has the ability to choose which validator will get the delegated Luna. Many users tend to choose validators with most delegations.

This leads to a situation in which the distribution is extremely imbalanced. So, for now, the top-2 validators have nearly 60% of delegations. With 20% of overall staked Luna staked through bLuna, it leads to decreasing the decentralization level of Terra network.

 

 

Unwieldy for using in DeFi protocols

bLuna's rewards have to be claimed by the users by interacting with the special smart contract. Any DeFi protocol that wishes to have an integration with bLuna needs to deal with the rewards claiming mechanism. It makes the integration process more complex and opaque.

 

Unwieldy for using in bridges

bLuna's rewards have to be claimed by the users by interacting with the special smart contract. Any DeFi protocol that wishes to have an integration with bLuna needs to deal with the rewards claiming mechanism. It makes the integration process more complex and opaque.

 

Unwieldy for using in LP

The rewards claiming mechanics also make bLuna less profitable when used in liquidity pools. While bLuna is locked in a liquidity pool, the rewards are distributed to the pool’s smart contract. That means that users are losing their rewards if they choose to become liquidity providers.

Because of that, the liquidity pool for bLuna is shallow. That led to a possible losing peg between bLuna and Luna. An example is liquidations on Anchor protocol that lead to a lot of bLuna-Luna exchanges made on TerraSwap. Because the cap was too small for that many deals, the bLuna price dropped to 0.88 Luna for 1 bLuna. The Anchor protocol made a set of fixes that prevent such situations, but new DeFi protocols could discard them and keep the bLuna/Luna peg brittle.

 

(Price graph taken from ALPAC4)

 

The way to make it better

Lido team reworked the protocol to keep the power of bLuna and expand the horizons of using liquid staking on Terra. It was achieved by slightly changing the bLuna token architecture and adding the new token — stLuna.

 

What is stLuna?

stLuna is a bullish Luna. stLuna and bLuna are ruled by a joint set of smart contracts. So, bLuna and stLuna are tokens that represent the same thing — staked Luna. The main distinction between them is that bLuna's rewards have to be claimed from the rewards contract and stLuna's rewards are automatically compounded. So, bLuna's price is pegged to Luna's price and stLuna's underlying amount of Luna is increasing as staking rewards are accrued.

The stLuna - bLuna conversion will permanently move towards "more Luna for 1 stLuna" as stLuna staking rewards are auto-compounded and stLuna represents the share in the stake. stLuna mechanics are more like Lido's wstETH here, so the difference will grow over time.

 

The benefits of the new version

The new protocol version is going to have a lot of benefits. Here they are:

 

1. Stake flattening

The new version of protocol keeps delegations distributed evenly among all the validators in the whitelist. The user won't have the ability to choose a validator. It means that both the protocol and Terra ecosystem become more decentralized.

Because of the huge delegation distribution imbalance, it's hard to fix it in a "natural" way (i.e., with new delegations alone). So we made the decision to perform an artificial stake flattening. All current delegations are going to be distributed among the validators evenly after the new version of protocol deployment. The details of the process are going to be published in the nearest future. The redistribution process will be spread over time to give our validators the time to process the changes.

Taking the current state of delegations imbalance, stake flattening increases Nakamoto coefficient from 7 to 12.

 

The current top-7 validators on Terra:

 

Top-12 validators on Terra if the flattening would happen right now:

 

Inb4: of course, stake flattening is not the best solution for decentralization. Validators have different uptime, different community participation, and so on. It would be fair to distribute the stake taking into account these features.

We're working on that and the current step is made to fix the current issues with delegations.

 

2. stLuna is more usable for DeFi protocols

Making the rewards being automatically re-staked makes the stLuna token more usable in DeFi protocols. Integration became much easier because any other protocol doesn't have to deal with rewards: stLuna underlying Luna amount just increasing with time (in case there are no slashing events).

 

3. stLuna is good for liquidity pools

Liquidity pools work perfectly with stLuna because of the same reasons as with DeFi protocols: they don't need to deal with rewards claiming mechanics. While stLuna and bLuna are interchangeable, it makes bLuna liquidity better (see "Instant bLuna-stLuna conversion" section for details).

The frequently asked question is "what will happen with the bLuna-Luna pair?".

The answer is that the bLuna-Luna pool will be with us for some time (the largest incentivized pool on Astroport at the start, no less!), but the stLuna-Luna pool will be better for providing liquidity in the long run, so eventually stLuna-Luna pair should mostly replace the bLuna-Luna pair. bLuna-stLuna conversion is instant and has a constant price for any size, so stLuna liquidity is at the same time bLuna liquidity.

While the bLuna-Luna pair is the most incentivized pool on Astroport, the stLuna-Luna pair is also one of the more incentivized pairs: follow the updates to learn more!

 

 

4. stLuna works well with bridges

With stLuna, no rewards need to be passed through the bridge. One can easily get the stLuna/Luna exchange rate and understand how many Lunas he or she can get for the amount of wrapped stLuna they have.

 

5. Instant bLuna-stLuna conversion

Because bLuna and stLuna are ruled by a joint set of smart contracts, it is possible to convert bLuna to stLuna and vise-versa with one smart contract call. It means that bLuna holders don’t need to unbond their Luna or sell bLuna on the market to get stLuna: they can make the exchange directly with the smart contract with no commission (except transaction fees and bLuna peg fee, which is zero if there were no slashing). Same for holders of stLuna that want to get bLuna.

The big thing is that because stLuna and bLuna are interchangeable, there is no need to keep liquidity pools for both tokens: the liquidity pool for stLuna is enough to have to provide liquidity for both tokens. Even if there are no pairs for bLuna/Luna is present, the bLuna could be instantly swapped to Luna in two possible ways:

  1. With two separate transactions: the first one converts bLuna to stLuna (user pays for gas only) and the second one swaps stLuna to Luna on DEX.
  2. With one transaction made with helper contract, which makes two swaps in a row.

The webapp with the necessary functionality to make bLuna-Luna swap handy is to be released.

 

So stLuna is going to replace bLuna?

No, not at all. stLuna is just added to bLuna as an alternative representation of staked Luna. So when bonding your Luna with Lido you can choose what type of asset you want to receive: bLuna or stLuna. For example, you'll need bLuna for Anchor and stLuna for Mars. Or you can exchange any amount of your bLuna to stLuna (and vise-versa) directly using Lido’s smart contracts (and no DEX is needed for it).

 

When is the release?

It’s already live on mainnet: terra.lido.fi!