BLOG
【Blockchain Basics 16|How does staking work and where does the income come from? 】
introduction
“Staking” refers to locking up tokens and using them as collateral to help maintain the security of a blockchain network or smart contract.
In this article, we will discuss the basics of staking, why it exists, types of staking, how staking works and what are the sources of staking income?
What is staking? Why do we need staking?
In order to keep the blockchain secure and maintain a high degree of Byzantine fault tolerance, a Sybil resistance mechanism is needed — a way to prevent a small number of nodes from disrupting the entire network.
If a blockchain has weak Sybil resistance, then the blockchain is more vulnerable to 51% attacks, where a small number of or colluding actors could conduct malicious activities such as rewriting the blockchain history or censoring users.
A block is essentially a collection of user transactions that are verified together in the blockchain ledger update. Each block contains not only these new transaction information, but also a reference to the previous block, which is connected in chronological order through hashing to form a "blockchain".
The task of a validator or miner is to generate blocks and submit them to the network. If a majority of other validators and full nodes agree that the blocks are valid, they are added to the ledger.
Proof of Stake (PoS) is a mechanism used in blockchain to resist Sybil attacks. It requires validators to hold a certain economic "stake" in the network in order to have the opportunity to add new blocks to the blockchain.
In a PoS blockchain, anyone who reaches the minimum native token balance requirement can join the network, become a validator (staker), and participate in the generation of blocks. The staked share of a validator or the number of validators a user runs is usually proportional to the probability of being selected to generate a block - the higher the staked balance or the more validators a user runs, the greater the chance of being selected.
When validator nodes successfully create a valid block, they typically receive a staking reward from the protocol and a portion of the fees paid by users.
To prevent malicious behavior, PoS blockchains often implement a mechanism called "slashing," where validators may lose some or all of their staked tokens as a penalty if they violate the protocol rules. In addition, some PoS blockchains also deduct a portion of their staked shares as a penalty if the validator node goes offline and fails to generate a block when selected.
Implicit staking of PoW/Explicit staking of PoS and DPoS
Proof of Work (PoW) is an anti-Sybil attack mechanism, such as in the Bitcoin blockchain, which requires miners to compete by solving computational puzzles (i.e. generating a valid hash value based on the information in the block). The first miner to solve the problem and submit a block that is approved by the network as valid will receive a reward.
The Bitcoin network automatically adjusts the difficulty every 2016 blocks (approximately every two weeks) with the goal of keeping the average block time at 10 minutes. Difficulty adjustments are usually based on the number of miners participating in mining (total computing power). The more miners there are, the higher the mining difficulty will be to maintain the decentralization of the network.
In PoW, the chance of adding a new block to the blockchain is proportional to the computational power consumed. Therefore, while PoW blockchains do not have an explicit staking mechanism in the traditional sense, they implement implicit staking by purchasing expensive hardware (usually dedicated) and consuming computational power.
If miners cannot earn income from mining rewards, their investments in hardware and electricity may result in losses. If network security cannot be guaranteed, the market value of the equipment used for mining and the assets it produces may decline, in which case miners will face hidden economic losses.
The proof-of-stake (PoS) anti-sybil mechanism replaces the need for computational work by requiring cryptocurrency to be staked. That is, in a PoW system, miners compete by relying on computing power, while in a PoS system, validators compete by staking valuable tokens.
Another obvious difference is that in PoW blockchains, all miners compete openly for the opportunity to generate blocks on a first-come, first-served basis, while in PoS blockchains, validators usually take turns to generate blocks, which is usually based on a weighted randomness based on the staked share.
A variation of PoS is Delegated Proof of Stake (DPoS), which aims to separate the roles of stakeholders and validators by allowing token holders to delegate their tokens to existing validators. This separation of roles allows token holders to participate in block production and passively earn rewards, rather than being limited to being validators.
However, this approach requires compromises and trade-offs. Compared to the PoS network where every user has the opportunity to run a node and become a validator, the number of validators in the DPoS network will be much scarcer.
Staking Participants and Process
Token staking involves users participating in validator nodes and possibly staking pools.
►The pledge process is as follows:
⎖Get tokens: Stakers first need to obtain the native tokens of the PoS blockchain network. For example, users can buy ETH on CEX to start staking on Ethereum.
⎖ Locking Tokens: Stakers "lock" or "stake" their tokens by transferring them to a designated wallet or smart contract. These tokens will be temporarily held as collateral and cannot be freely used or transferred during the staking period.
⎖ Participation in consensus: Stakers participate in the consensus process of the blockchain network by running their own validator nodes or delegating tokens to other validators.
⎖ Earn Rewards: In return for participating in the consensus process, stakers receive rewards or “yield” in the form of additional tokens.
► Validation Node
In a PoS blockchain, validating nodes are responsible for verifying transactions and creating new blocks.
Validators are usually selected based on the number of tokens they stake. This stake-based selection mechanism is designed to incentivize validators to follow consensus rules, because their staked tokens may be slashed in the event of malicious behavior. Validators holding more stakes have a higher probability of being selected to verify transactions and create new blocks, because if they violate the rules, they will suffer greater token slashing losses.
► Staking Pool
Users must own at least 32 ETH to run a validator node on Ethereum. However, many users cannot afford that much ETH. Therefore, they can submit a small amount of ETH to a "staking pool".
Staking pools combine participants’ tokens and stake them together as collateral. This increases their chances of being selected as a validator. Validation rewards are then distributed proportionally to those who pooled their tokens.
► Cut
If validators are found to have violated the network rules or engaged in malicious behavior, such as attempting to double spend, forging transactions, or participating in coordinated attacks, they will be punished. This means they lose some or all of the tokens they staked as collateral on the network. The threat of losing staked tokens can incentivize validators to act honestly and contribute to the stability of the blockchain.
Pledge collection source
In the PoS blockchain, staking income comes from the following three aspects:
⎖Block Reward : The reward that validators receive for participating in the consensus process. This benefit is distributed based on the number of tokens staked by the validator and its contribution to the security and integrity of the network.
⎖Transaction Fees : Validators can also earn fees from processing transactions. These transaction fees are paid by users — the gas fees required to have their transactions included in a block and processed by the network.
⎖ MEV Rewards : Validators who participate in the Maximum Extractable Value (MEV) exercise have the opportunity to receive additional rewards. They process submitted transactions in a certain order and usually make a profit from it.
The yield from token staking may attract long-term holders who hope that the asset will appreciate, while also supporting the stable operation of the network. The yield from staking may vary depending on a variety of factors, including the network's consensus mechanism, block reward structure, transaction fee policy, and the number of tokens staked by participants.