How Lido Works

in Ethereum, Research by Vasiliy Shapovalov

Lido DAO is a community that builds liquid staking technology for Ethereum. Lido software allows users to stake the network without maintaining staking infrastructure or losing the utility of their capital. Staking with Lido is primed to start along with Phase 0 of Ethereum 2.0.

When a user uses a Lido smart contract to stake ether, a user mints stETH (staked ETH) ERC20 utlity tokens that correspond to the user’s staked ETH balance on the Ethereum Beacon Chain along with staking rewards accrued or penalties associated wity their validator key in the Beacon Chain. When transactions are enabled on the beacon chain - which does not yet have a target date but is estimated to be over 18 months away. After withdrawals are enabled, users will be able to receive their ether balance on the beacoin chain when they burn their stETH. Until then, stETH can be transferred and used unlike beacon chain ether.

Lido has a lot of moving parts by necessity so the system, along with design goals and constraints, are described below in simple terms.

Design goals and constraints

Staking during the first stages of Ethereum 2.0 means accepting the risk that your ETH will be frozen until transfers are available in Ethereum 2.0 (Phase 1.5 or Phase 2), which is expected to happen next year at the earliest. Until that time, no one will be able to withdraw staked ether or staking rewards and, for example, sell them on an exchange.

To validate the beacon chain, a staker needs to deposit 32 ethers, specify a validating public key, and specify a withdrawal address where the staker’s assets and rewards will stay frozen until transfers are enabled. Until then, the only two activities you can do on the beacon chain are to validate and to stop validating. During this time, stakers must run the validation infrastructure, facing the risk of having their stake reduced in the case of misconfiguration.

There is a risk of loss or loss of rewards, which occurs if the validator is slashed for misbehaving. This can happen, for example, due to a bug in the validator's node code or due to connectivity issues. This risk makes Ethereum staking especially unattractive in Phases 0 and 1, when the staker has, for a middling reward, to bear market risk while being unable to unstake.

Lido aims to allow users to stake ether without losing the ability to otherwise use the utlity of their stake. Lido will be a decentralized infrastructure for issuing a liquid token that has a degree of flexibility compared to self-staking.

The primary goals of Lido are:

  • To offer flexibility to users to earn rewards on deposits smaller than 32 ether, and without restriction on deposits different than a multiple of 32 ether;
  • To provide the stETH token as a building block for other applications and protocols (e.g., as collateral in lending or other DeFi solutions);
  • To provide an alternative to exchange staking, self-staking, and other semi-custodial and decentralized protocols.

Lido is designed as a simple-to-use protocol with community governance. The protocol has to follow the changes in the underlying blockchain mechanisms.

Lido’s structural components

The following is a broad description of the components of the Lido staking protocol:

  1. Staking pool: protocol to manage deposits, staking rewards, and withdrawals

         a. node operators registry

         b. withdrawal credentials

         c. oracles

         d. rewards

    2.  stETH: liquid staking token that maintains balance corresponding 1-to-1 to your share of beacon chain ether

    3.  DAO: Aragon DAO that governs protocol parameters

Staking pool

The staking pool is the core smart contract of Lido. The contract is responsible for ether deposits and withdrawals; minting and burning stETH tokens; delegating funds to node operators; applying fees to staking rewards; and accepting updates from the oracle contract. Node operators' manager logic is extracted to a separate contract, NodeOperatorsRegistry.

Users will send ether to the staking pool contract to be minted stETH tokens in return. That ether will be distributed between node operators to maintain uniform distribution and deposited to be validated by their validators. Withdrawal credentials for that ether will be set either to threshold signature of distributed custody or, if withdrawal to eth1 addresses will get accepted by the community, to an upgradeable smart contract that will handle withdrawals when they are enabled.

Node operators also validate transactions on the beacon chain. The DAO selects node operators and adds their addresses to the NodeOperatorsRegistry contract. Authorized node operators have to generate a set of keys for the validation and also provide them with the smart contract. As ether is received from users, it is distributed in chunks of 32 Ether between all active node operators. The staking pool contract contains a list of node operators, their keys, and the logic for distributing rewards between them.

Oracle is a contract that keeps track of balances of the DAO's validators on the beacon chain. The balances can go up because of reward accumulation and can go down due to slashing and staking penalties. Oracles are assigned by the DAO. Data is sent daily and is used to provide an accurate balance of stETH tokens for users. On days where there have been rewards, a small amount of stETH tokens are minted to the node operators and to the DAO's insurance and development fund, representing a reward fee.

stETH token

stETH is an ERC20 token that represents staked ether in Lido. Tokens are minted upon deposit and burned when redeemed. stETH token balances correspond to the ethers that are staked using the Lido smart contract. stETH token’s balances are updated when the oracle reports change in total stake every day.

Lido DAO

We believe a DAO is an optimal structure for launching the Lido protocol. If we were to launch Lido without decentralised governance, users would be required to trust a single point of failure to maintain a 1:1 relationship of ETH to stETH.

Instead, we believe by distributing governance of such parameters to a decentralised community you reduce the risk to the user.

In addition:

  • Lido is highly dependent on the design and restrictions of the beacon chain;
  • Ethereum 2.0 staking protocol may change and therefore Lido should be upgradable;
  • An insurance provider must be selected and terms for slashing insurance must be negotiated;
  • DAO governance is preferable than one person or a developer's team for making decisions about changes in Lido; and
  • A DAO will be able to cover the costs of developing and upgrading the protocol from the DAO token treasury.

The DAO will accumulate staking rewards from the Lido smart contract, which can be used in the insurance and development funds, distributed by the DAO.

Join Us

As we approach launch, we’re opening channels in our discord and inviting collaboration. We think this is a fundamentally important piece of infrastructure in the Ethereum ecosystem, we’d love to build it with you. If you’d like to help build Lido, please email [email protected].

Or, join the Lido Discord.

Thx,
VS