Author: Terence @Forbole
Since LikeCoin joined the Cosmos ecosystem, many Chinese users have come into contact with various novelties in Cosmos. For them, some original ethereal blockchain knowledge began to directly affect themselves. Recently, I noticed that a friend found that it takes 21 days for LikeCoin to cancel the commission and get the money back . This is a good opportunity to introduce the idea of Cosmos. Cosmos is one of the integrated blockchain ecology. If you can master the knowledge of Cosmos , it will be of great help to understand the entire blockchain and even the decentralized generation .
To understand the 21-day unbonding period, it may be necessary to fully understand the fundamentals of the blockchain. In this article, I hope that without a thorough explanation of the technology, the average user will understand what is going on. In this way of explanation, it is inevitable to avoid the heavy and the light, or even get out of context, and hope that the experts will be more forgiving.
- Video|"8Q" HashQuark Li Chen: PoW spelling power, hard core! PoS fights soft power and diversity!
- Wanchain Galaxy Consensus Exploration 04 - Entrustment Mechanism
- SNZ Holding, a professional PoS pool service organization, joins the Wanchain Galaxy Consensus Node Program
- V God tells Serenity design principles to show you the uniqueness behind this magnificent project!
- Getting started with blockchain | From the perspective of attack energy and defensive energy, who is more secure with PoW and PoS?
- Brief introduction of LibraBFT algorithm
Long story short
The vast majority of blockchains in the Cosmos ecosystem use a system of proof-of-stake (BPoS). The holders of their native tokens (such as atom, likecoin) have the right to decide whether to participate in the network security of the blockchain And governance tasks to get rewards. These tasks are not qualified by ordinary people, but require technicians who have in-depth knowledge of network security and underlying technologies. They also have to bear the expenses of network infrastructure equipment such as servers and cloud storage and teams.
If the token holder is not a validator, but wishes to participate in the above tasks to obtain rewards, he can act as a delegator and delegate the token he holds to the validator, who will perform these tasks. It is the essence of staking. Participating in the maintenance of the blockchain can get rewards, but if you make a mistake or fail to meet the standard, you will be punished for reducing your rights. This punishment is related, that is, the rights and interests of the errant verifier will be reduced.
Compared with Bitcoin's proof-of-work (PoW) mechanism, the proof-of-stake (PoS) mechanism has two inherent risks, namely "no interest" and "remote attack". The 21-day unbinding period of BPoS is designed to prevent these two risks.
In short, there is no free lunch in the world. Mortgage mining is the same as many things in the world. It is to take risks in exchange for potential rewards. The main principle behind it is to look at risks and rewards, reward good and punish evil. Token holders need to carefully consider how to entrust to maintain the security of the blockchain and promote ecological growth.
Seek consensus in a decentralized network
Bitcoin is widely regarded as the first application of blockchain. Perhaps it should be said that the advent of Bitcoin makes the operating principle behind it-blockchain, widely known. Blockchain is essentially a decentralized network and is used as a public database to keep accounts. It does not have a central leader to decide what and how to record, but it is determined by public participants based on established consensus rules. This can be simply divided into two steps:
1. Someone suggested what to record 2. Participants reached consensus to pass the above proposal
But if everyone is proposing this proposal, it will be very confusing, so we must first have a mechanism to decide how to make the proposal. Proof-of-work (PoW) is an important part of this step.
Proof of Work PoW
Bitcoin, Ethereum and many other early cryptocurrencies all operate on the mechanism of PoW. Regardless of whether you are exposed to the blockchain, you are actually familiar with PoW. The most common example of PoW every day is when registering or logging into some systems (such as registering a new email address). You are asked to answer "captcha" to prove that you are not a machine:
Image source: https://www.atebits.com/tips-on-managing-captcha-in-omegle/
You give some "work" to answer captcha to "prove" that you are not a machine. Why do these systems need to do this? It is to prevent someone from trying to attack the network by creating multiple account identities. This attack method is called a Sybil Attack.
The blockchain is a public database used to keep accounts. First, someone has to propose what to record, and the blockchain is made up of thousands of computers that are linked without a central leader, and cannot identify individual computers. Identity, if someone uses a witch attack to propose content to be recorded, it may crash the network, so we also need a PoW mechanism to prevent witch attacks.
The PoW mentioned here is aimed at computers rather than humans. The captchas in the picture above are too simple for computers with powerful computing power, so we need PoW that is not easy to complete even for computers, so there is mining ( mining). I am actually very interested in explaining mining, but this is a bit off topic, so I will use a metaphor to explain it. You can imagine that I asked you to toss a coin. When you tossed the picture, you write down "1". When you tossed the number, you write down "0". Now I ask the computer to do the same thing, but there are a lot more requirements. The computer keeps tossing coins and writing down 1 or 0 until there are 20 consecutive 0s. There is no shortcut for this process. The only way to show 20 consecutive 0s is to toss continuously. Humans have to put some effort into tossing coins, and computers use electricity to toss. (20 digits is too easy for a computer? What if it is a million digits? If it is a billion digits?)
Who would be willing to use electricity to mine? Therefore, there will be rewards for successful mining, money can make ghosts grind, and even hardware equipment (ASICs) specially designed for mining and miners (mines) operating on a factory scale have appeared. Everyone is based on risk. Act with rewards.
Become a block initiator
The miners cram the pending transactions on the network into a data report with a capacity limit. This packet is a "block". The speed of the miners' competition (in the above example, tossing a coin) is the fastest. The answer is to become a block proposer and record this block on the public database of the blockchain. Therefore, PoW is not a consensus algorithm (this is a misunderstanding by many people), but a system for deciding who will become a block proposer.
Since miners use a lot of electricity and equipment to win this opportunity to initiate blocks, they will of course try to ensure that these transactions and blocks are processed in accordance with the established rules of everyone, because once the rules are not met, other participants on the network (ie Node) will oppose this block, then the miner won the coin tossing contest but will lose the reward.
Proof of Stake PoS
Due to the above characteristics of PoW, it operates slowly and consumes a lot of electricity. Miners need to invest a lot in computing equipment, so PoW competitions are actually more than money, because equipment and electricity are money, so it is better to directly Capital is used for competition, so proof-of-stake (PoS) is generated.
Under PoS, miners no longer use PoW to compete. Instead, they decide who can be based on the number of native tokens / cryptocurrencies (such as atom on Cosmos Hub or likecoin on LikeCoin Chain) holding the blockchain. The initiator of the block, because there is no more mining process, we generally change the name of the miner to be a validator to reflect that they are a bit different.
In the early days of discussing the replacement of PoW with PoS, there was a voice questioning that PoS has two theoretical potential risks, namely nothing at stake and long range attack. To explain these things, you can write a A series of articles will digress again. Allow me once again to boldly use simple metaphors rather than in-depth technical aspects to try to explain these two things.
No interest means that the verifier does something wrong without punishment. In PoW, the verifier uses a lot of power (in fact, $$) to compete. If he does something wrong, he wo n’t get a reward. White uses power ($$$), which is punishment, but PoS does not The power consumption process of PoW is a way of eliminating this indirect penalty.
Remote attack refers to tampering with history. To explain this, we must first look back at the structure of the blockchain. I often want to try two metaphors to illustrate that the opportunity has finally come!
- The parable analogy mentioned above is that a block is a datagram containing some transactions. Imagine that the next datagram (B02), in addition to some new transaction data, will also be loaded with the previous datagram (B01), and then the next datagram (B03), except for some new transaction data. In addition, it will be loaded with datagrams (B02). One bag wraps another bag, endlessly. If you go to B10, what do you do if you want to change the data loaded in B01? You have to open B10, then B09, then B08, and so on. Imagine again that every bag is sealed with a seal. If you want to open this bag, you need to break this seal. Imagine again that this seal can only be generated after an operation process that consumes a lot of power. If you want to make this seal again, you have to do the corresponding operation process again. It can be said that each additional packet (that is, more PoW), the data is more secure.
- The metaphor of the genealogy uses another metaphor, the genealogy. The younger surname is Lin. Since childhood, he has loved to read the stories of historical figures in China, but he has always had a knot: why are there not many generals whose surname is Lin? In modern times, there seems to be a Lin Zexu. Sometimes I imagine that if I am Lin Zexu's descendants, they are very powerful. Can I fake Lin Zexu's genealogy to achieve this? If I want to do this, first of all, I will rewrite the genealogy of the Lin Zexu family from now on, from generation to generation, to reflect my birth. Imagine how difficult this project is. If it was just me holding this genealogy, I might have control over how to write it. But the problem is that Lin Zexu's original generations have genealogies. I want to rewrite all the genealogy of Lin Zexu's descendants, and after the rewriting, they must all acknowledge (or at least most people will). So it ’s not easy to tamper with history with all eyes. ( There was really an emperor superstar who changed his surname because he found out that he was a descendant of a famous figure in the Tang Dynasty .)
The "distance" in a long-range attack refers not to the distance in place, but the distance in time. In the metaphor of genealogy, if my ancestors more than two hundred years ago were to be deployed as descendants for more than two hundred years, and I would tamper with history, I would use a method to add a concubine or something to Lin Zexu ’s genealogy. Later, I went to tamper with the genealogy to prepare. (After all, will the concubine write on the genealogy?) Why is it important to protect history? If you originally had ten bitcoins, but they were modified into one, would anyone believe such an account book?
Whether it is a non-interested or remote attack, it is difficult to adopt the PoW blockchain, because there are layers of PoW to guard the history, and the lack of PoW is the inherent deficiency of PoS. ( Off-topic: The above two risks are theoretical risks. Will they actually happen, or will they really conform to the laws of economic operation? Some people questioned, for example , the white paper of Supernode PoS adopted by one of the pioneers of PoS , Sunny King, in the blockchain V Systems invented by him, has another insight into nothing at stake , which is very inspiring to me. )
Proof of binding BPoS
Different PoS blockchains operate in different ways. Most of them have measures against the two major risks of non-interested and remote attacks. Cosmos Hub and most other blockchains based on Cosmos technology (such as One example is the bonded proof-of-stake (BPoS) used by LikeCoin Chain.
Under the BPoS system, the role of the validator is to maintain the security of the blockchain, which involves several major tasks:
- Operate a full-node
- Lin Ren becomes a block initiator to create blocks and reach consensus on blocks
- Vote in the governance proposal
It is conceivable that these tasks are not competent for ordinary people. Verifiers need to have a thorough understanding of blockchain, network security and underlying technology, and they must also undertake the network infrastructure equipment such as servers and cloud storage required by a stable and reliable full node. Team expenses. Furthermore, because it is PoS, it seems that there must be enough capital-to have enough money to buy enough token rights to act as a verifier.
However, because the knowledge and technical requirements required by the validator are very high, the token owner is not necessarily qualified as a validator, and some are not willing to be validators at all (for example, some venture capital purely want to be a validator) Investors), which produces a delicate supply-demand relationship: some people have the ability to be validators but not enough capital, and some people have enough capital but do not want to be validators. So there is the practice of delegation.
If the token holder is unable or unwilling to be a verifier, but wants to participate in the above tasks to obtain rewards, he can act as a delegate and delegate the token he holds to the verifier, which is quite In order to bind the rights and interests (bond), all the entrusted rights and interests from the delegator (including the self-delegation of the verifier to themselves) become the voting power of the verifier, and only the verifier with the voting rights that meet certain requirements In order to become an effective verifier to participate in the above tasks, it refers to the 125 nodes with the highest voting rights on the Cosmos Hub, and 10 nodes on the LikeCoin Chain.
Proportion of voting rights
The proportion of voting rights is calculated based on the total number of entrusted interests (not the total number of tokens). For example, suppose the total number of atoms on the Cosmos Hub is 250 million, and the number of atoms bound is 180 million. If Forbole The entrusted equity is 2 million, and Forbole's voting power is 1.11% (2,000,000 / 180,000,000). The meaning of 1.11% of voting rights is that, for a long-term average, for every 10,000 block initiator selections, Forbole will be elected 111 times.
Bonding and slashing
As mentioned above, PoS has two major risks relative to PoW, including no interest and remote attacks. The combination of the two is about making mistakes (trying to tamper with history is one of the big mistakes) how to punish. In the online world, when conceiving a punishment system, it is especially necessary to think about how to effectively implement punishment.
In PoW, when you make a mistake, you lose the reward that you thought you could get, so you use up electricity ($$$) in vain. To have a similar deterrent effect on PoS, it is to start with equity: when you make a mistake, you must slash equity ($$$). It sounds straightforward. If the verifier is found to be wrong, he can just cut his bound rights on the spot. But to do this on PoS, there are some special considerations.
To reduce rights and interests on PoS, special consideration should be given to long-range attacks. As mentioned above, long-range attacks are attempts to be deployed at a certain time in the past in order to tamper with the history of deployment in the future. If I lay out today, it may happen that the history is tampered with after 21 days. If I lay out the rights after I bind the rights, and then unbundle and go away immediately, when the network discovers my fault, it may be 21 days later. I slipped away and couldn't cut my rights.
Therefore, Cosmos's BPoS has a 21-day unbinding period. After the execution of the instruction to unbind the rights, the relevant rights will not be officially returned to the free body until 21 days have passed. If the validator involved makes a mistake, the rights and interests during the unbinding period will still be reduced.
This leads to another question: the verifier makes a mistake, is the client responsible?
In the world of Cosmos BPoS, the verifier makes a mistake. Except for the rights entrusted by himself, a certain percentage will be cut (depending on the severity of the mistake), all the rights entrusted to him will also be cut by the same percentage. Therefore, as a principal, it is necessary to carefully analyze which validator is reliable and contributes to the network before making the entrusted decision. To use a realistic analogy, when voting for a representative to represent you, you need to think carefully. (This is just the case of Cosmos, and does not mean that other PoSs are considered in this way, such as Tezos, in many cases, the client will not be punished)
Based on this principle, when you intend to directly delegate to the verifier B from the rights entrusted to the verifier A by re-delegating, it seems that your change delegation is effective immediately, but you still Facing a period of 21 days. Before the end of this period, if Verifier A needs to accept the punishment to reduce the rights and interests, the rights and interests that you are involved in during the change commission period will still be cut.
Token holders do not necessarily need to participate in the task of defending the blockchain
The above example of Cosmos Hub is also the current situation. The number of bound atoms actually accounts for only about 72% of the total. It can be seen that not all token holders will entrust. In fact, whether to participate in maintaining the security of the blockchain (directly participating as a verifier or indirectly as a principal) is the right of the token holder rather than the obligation .
Participating in the task of maintaining the security of the blockchain can obtain returns from the inflation rate and transaction fees, but if the work is wrong or does not meet the standards (such as double-sign or long-term offline), it will be punished (rights reduction slash) , Reward good and punish evil.
If it is considered that the ratio of return to risk is not attractive, the holder of the token can simply not participate, only holding the token, and the blockchain with inflation settings (such as Cosmos Hub) continues to have new atoms (annualized Inflation rate is between 7% and 20%) as a reward, so those who do not participate in the binding rights and interests will be diluted by inflation. Therefore, an important part of the token economy is how to conceive this return to risk ratio to attract more people to choose to participate in the maintenance of the blockchain.
Participating in the maintenance of blockchain security is a serious matter. Everyone should not only look at the returns and the fees of the validators. You must consider the risks and their significance to the blockchain ecology. It is your responsibility to choose validators and make entrustments. Contributing an important step in blockchain security can also support your validators to make more contributions to the community, because they are often the experts who are most familiar with the blockchain, and ultimately help the ecological growth, so that you can also benefit.
This article is not short but not deep. I hope to open an entrance for everyone who first enters LikeCoin, Cosmos, cryptocurrency and blockchain. I may not be able to fully grasp every link, and I may not necessarily explain it well, or even make mistakes. I hope you will be more forgiving, please leave a message 𧶽 教. If you think this article has helped you, I hope you can share this article so that more people can participate in the blockchain world.
In-depth understanding of the universe- Blockchain Internet , A to Z of Julian Ke Blockchain Consensus , Julian Ke and Cheryl Sukhoi Bitcoin Q & A: The Mining Process "Andreas Antono Professor Pross Emmingen Schiller explains the fallacy about the blockchain consensus algorithm. Is proof of work wasted ? Brett "Mavericks" Mussel bet proves: How do I learn to love weak subjectivity , Vitalik Butrin ( End) The delegation of the Universe Center , FAQ of Alexander Bezobchuk Verifier , Universe website
on @BigDipper : Developed by Forbole , it is the open source blockchain browser and management tool of Cosmos ecology. It is the award-winning work of Cosmos HackAtom. It has been browsed by users from 140 countries around the world since its launch.
on Terence: Co-founder of Forbole , hoping that cryptocurrency and blockchain technology can bring real autonomy and improve living standards for human beings. Forbole operates multiple verifier nodes for the PoS blockchain.