Abstract

Consensus mechanism plays an important role in blockchain. At present, mainstream consensus mechanisms include proof of work (PoW), proof of stake (PoS), and delegated proof of stake (DPoS). PoW, as is widely used in virtual currency, results in significant energy consumption; PoS and DPoS are proposed to reduce energy waste caused by PoW, but their disadvantage is that they tend to create Matthew Effect (ME): “the rich get richer.” In order to balance the discourse power of new nodes and elder ones, this paper proposes a flexible consensus mechanism called proof of engagement (PoE), based on the activity and contribution of network nodes. We analyze the incentive compatibility of PoE from the perspective of mechanism design. In our simulation experiments, we tested the profit changes under PoW, PoS, and PoE. The results illustrate it is easier for new nodes to accumulate their profits under PoE than under PoW or PoS, so as to reduce the negative impacts of ME.

1. Introduction

Bitcoin [1], since it was proposed in 2008, has been considered the most successful application of blockchain. Its ability to work properly on a distributed system relies on the genius consensus algorithms, proof of work (PoW) [2]. Bitcoin is also commonly called Blockchain 1.0. Ethereum [3], also based on PoW, is called Blockchain 2.0 for its Turing-complete smart contract system.

Despite its widespread use, PoW still has several much-criticized problems [4, 5], and one of the most serious is its energy consumption. According to digiconomist.net [6], as of October 2020, Bitcoin has consumed electrical energy 74.38 TWh per year, which is comparable to the power consumption of Venezuela. The carbon footprint of Bitcoin has reached 35.33 Mt CO2 per year, comparable to the carbon footprint of New Zealand. The reason for such a disappointing situation is that under PoW, network nodes need to run the SHA256 algorithm repeatedly until they successfully find the hash solution; then, they will be rewarded by many digital currencies; this process completely depends on the computing power of the devices. Another problem is the centralization of computing power. To increase the chances of getting a reward, the users either buy more powerful computing devices and keep them running at full capacity or join some huge mining pools [7], which causes a shift in the computing power from decentralized back to centralized [8] and greatly threatens the security of the blockchain network.

Proof of stake (PoS) [9] was originally designed to solve the energy consumption problem. Under PoS, the probability of getting a reward is affected not only by the computing power but also by the length of time a node holding the coins (coinage). Thus, to some extent, PoE reduces energy consumption and weakens the absolute control of the full-time miners and mining pools over the blockchain network. However, this easily leads to the Matthew Effect [10, 11]: the richer always gains more profits than those who are not that rich. Unfortunately, it will be hard for new users to gain their profits under PoS, and the discourse power will gradually be centralized in the hands of a few rich ones. The centralization problem is still not effectively solved; this reduces the incentive of the whole system.

To increase the incentive of the system and reduce the negative effect of ME, in the following we propose a new consensus mechanism named proof of engagement (PoE). A blockchain system under PoE is more like a work-based society, where nodes can accumulate their profits by contributing computing power to maintain the security and creating high-quality smart contracts to maintain the autonomy. In this way, new nodes will be able to gain a voice more easily; the flexibility of the whole system is also increased.

Our contributions. Our contributions are summarized as follows: (i)We propose PoE, a flexible consensus mechanism for a smart contract system based on blockchain, which shows the ability to reduce the negative impacts of ME(ii)We build the static and dynamic evaluation models of smart contracts and calculate the contract quality according to the evaluation results. We calculate the activity of a node based on its transaction volume and computing power contribution during recent periods of blocks. From the perspective of mechanism design, we analyze the incentive compatibility of PoE(iii)We propose a method to study the flexibility of different consensus mechanisms. In our simulation experiments, we test the profit changes of those 3 nodes under PoW, PoS, and PoE. The results show that PoE is more flexible than PoW and PoS. At last, we discuss the main application directions of PoE

Paper organization. We organize the remainder of this paper as follows. Some related works are listed in Section 2; models and algorithms are presented in Section 3; the incentive compatibility of PoE is analyzed in Section 4; our simulation experiments and discussions are presented in Section 5; our conclusions are summarized in Section 6.

Yuan et al. presented abstract models of PoW and PoS [12]. They modeled the rules of block production into simple inequalities.

PoW is modeled as follows:

In this model, represents the maximum target value, and represents the degree of difficulty, which is used to control the production interval of each block.

PoS is modeled as follows:

In this model, means the holding time of coins.

In recent years, researchers have been constantly improving or redesigning consensus mechanisms to make up for the deficiency of mainstream mechanisms and get adaption to different applications of blockchain.

To reduce the energy waste of PoW, various consensus mechanisms have been proposed. PoS [13, 14] is recognized as an excellent improvement. Besides, proof of luck (PoL) [15] and proof of elapsed time (PoET) [16], based on the trusted execution environments (TEE), are also practical alternatives. In such TEE, the node who becomes the bookkeeper is decided by the waiting time generated by a random number generator, according to a presupposed probability. The introduction of TEE greatly reduces energy consumption and improves the output efficiency of blocks. Proof of useful work (PoUW) [17], proposed in 2017, gets rid of the meaningless SHA256 operation in PoW and replaces it with valuable operations in the actual scene, such as computing orthogonal vector problem, 3SUM problem, and shortest path problem. PBFT [18] is completely different from the concept of PoW: rather than choosing a winner to lead but to make sure that everyone performs the same action. It does not need to consume a lot of computing power.

Several studies are committed to solving the centralization problem brought by PoW and PoS. Based on the combination of PoW and PoS, researchers proposed proof of burn (PoB) [19], proof of activity (PoA) [20], etc. PoB enforces the miners to send their coins to a specific address that cannot be found, that is, to compete for the bookkeeping right by “burning” their coins, which alleviates the Matthew Effect to a certain extent.

3. Model and Process

3.1. Generic Model

Consensus mechanisms like PoW and PoS are usually classified as the “proof-class” mechanisms, in which once the calculated value is within the target range, and a new block is produced. PoE is also a kind of proof-class mechanism. In order to model PoE, we first present the abstract definition of a consensus mechanism for the blockchain.

Definition 1. A consensus mechanism is a triple, which consists of the following: (i)A real number set (ii)A blockchain (iii)A mapping of block production

Based on Definition 1, we present the generic model of the proof-class consensus mechanisms, as is shown in Figure 1. In Figure 1, the consensus mechanism extracts the key attributes from the existing blocks as the basis for the computation, and when the computation results in a certain target solution, a new block is produced.

Under a proof-class consensus mechanism , a new block is produced if and only if follows the inequality:

represents the calculation for a solution, target represents the solution target, and represents the key attributes of network nodes for the “proof,” such as computing power in PoW and coinage in PoS; note that some of the attributes are recorded in the blockchain ledger.

Main idea. Our goal is to design a consensus mechanism with the following: (i)More flexible discourse power system(ii)Incentives for smart contract creators(iii)Preference support for different work areas

To achieve our goals, we introduce the contract quality and the node activity into PoE. Based on Definition 1, we present the generic model of PoE.

Definition 2. is a quintuple, which consists of the following: (i)A real number set (ii)A blockchain (iii)A set of network nodes(iv)A set of smart contracts(v)A mapping of block production

Under PoE, a new block is produced if and only if follows the inequality:

3.2. Calculation Model

Based on the generic model presented above, to be more specific, this section presents the calculation model of PoE. The parameters needed in our calculation model are shown in Table 1.

The engagement reflects the discourse power of node in work area , which is calculated by the following:

The quality of smart contract is as follows:

To show the professionalism of a node, the quantity and quality of smart contracts it creates must be considered. As we know, a new smart contract needs to be locally validated by other nodes (miners). Not only its feasibility, the security and algorithm complexity of a contract can also be evaluated during validation. We propose a model to evaluate the static properties of a smart contract.

The static evaluation reflects the code quality of smart contract ; it is related to some properties of the code, such as extensibility, reusability, readability, security, and scalability, and the calculation of its value is a complex software engineering problem, which is not discussed more in this paper because of the limitation of space. However, only reflects the static property of a contract from the perspective of software engineering; it cannot reflect the practicality, so it is necessary to introduce the dynamic evaluation .

The dynamic evaluation reflects the popularity of smart contract , which is indicated by the following:

In function (8), represents the current period of block, and represents the number of times contract was called during the period of . reflects how popular contract was in the last blocks.

Thanks to the Turing-complete programming language, smart contracts can perform almost any known computation, which makes them be applied to different work areas. We believe that the work area will be an important property of smart contracts in the future.

Work area is a static property of a smart contract; it is determined by the application direction of the contract. The activity of node in work area 𝑎 is calculated by the following:

In function (9), node ’s transaction volume and consumption of computing power during the last blocks show its recent activity. represents the computing power consumption for maintaining the blockchain, which includes contract validation and transaction creation and verification.

As we know, a node will be rewarded with a bonus once it successfully “dig out” a new block. In PoW and PoS, the production of new blocks has certain degrees of randomness, which makes the mechanism fairer. In PoE, randomness is preserved, so the expected profits of a node in a PoE-based blockchain should be calculated to evaluate its benefits.

The expected profit of node in a PoE-based blockchain is as follows:

In function (10), a node’s total engagement in a PoE-based blockchain is the sum of its engagement in all different work areas.

3.3. The Process of PoE

The process of consensus is divided into 2 main stages according to the different types of input and output: one is the leader election among nodes, and the other is the chain updation among transactions.

3.3.1. Leader Election

The leader election stage determines which node will become the bookkeeper.

Definition 3. The leader election stage consists of the following: (i)A set of network nodes(ii)A set of nodes’ total engagement(iii)A unique bookkeeper (iv)A encryption function (v)A range target of solutions

In a PoE-based blockchain, the process of the leader election stage is shown as Algorithm 1. In Algorithm 1, the engagement is introduced as a key attribute to gain the range of the computing target, so a node with high-level engagement is more likely to be a bookkeeper.

Input:
Output:
1. while True do
2.  for all do
3.   if then
4.    
5.    break
6.   else
7.      continue
8.   end if
9.  end for
10. end while
11. return
3.3.2. Chain Updation

The chain updation stage determines which of the validated smart contracts will be updated onto the blockchain.

Definition 4. The chain updation stage consists of the following: (i)A set of validated smart contracts(ii)A set of smart contracts to be updated(iii)A set of different work areas(iv)A set of network nodes(v) sets of nodes’ engagement in different work areas(vi)Block capacity, the maximum number of contract-addresses stored in a block(vii)A function for getting the work area of a smart contract

In a PoE-based blockchain, the validation process of smart contracts is shown as Algorithm 2 and the chain updation stage is shown as Algorithm 3.

Input:
Output:
1.
2. for do
3.    in function(3)
4.   if then
5.     add to
6.   end if
7. end for
8. return
Input:
Output:
1.
2.
3.
4. for do
5.   
6.   for do
7.    if then
8.     for do
9.      if agree then
10.       
11.       add to
12.      else
13.       continue
14.      end if
15.     end for
16.    end if
17.   end for
18. end for
19. while do
20.   
21.   for do
22.    if then
23.     add to
24.    end if
25.   end for
26. end while
27. return

In Algorithm 2, represents a threshold for the static evaluation of smart contracts. In other words, a smart contract is “qualified” when its static evaluation reaches . In Algorithm 3, network nodes vote for the validated smart contracts, and if a node agrees to contract , he/she will use his/her engagement in the same field to endorse the contract by adding to . The mechanism will determine which contracts are eventually recorded on the blockchain, based on their engagement and the block capacity.

4. Game Analysis

In this section, the incentive compatibility of our mechanism is discussed. In a PoE-based blockchain, in order to gain more profits, a node must keep active and concentrated and try to increase its contract quality.

Theorem 5. Suppose there are average activity values of node 𝑖, which satisfy , and all the other variables are constant, there is .

Proof. is estimated to be a function of the average activity of node 𝑖: Calculate derivative of function (11) with respect to 𝐻 ̄𝑖, and the outcome is as follows: Obviously, there is , so function (11) is strictly increasing. It is proved that if a node is not active enough in a PoE-based blockchain, its expected profits will strictly reduce.☐

Theorem 6. In the same period of block, suppose there are contract quality values of node 𝑖, which satisfy , and all the other variables are constant, there is .

Proof. From function (11), it is obvious that can also be estimated to be a function of . Calculate derivative of with respect to , and the outcome is as follows: Similarly there is , so the function is strictly increasing. It is proved that if a node succeeds in increasing its contract quality in the next period of block, it will be likely to gain more profits.☐

According to the theory of mechanism design [21], a direct mechanism is incentive-compatible if and only if (1) is increasing(2)For every , we have

It is given in function (9) that the computing power consumption of a node for maintaining the blockchain is positively correlated with its activity. In a PoE-based blockchain, the computing power consumption must be considered as the “mining cost” of a node.

The utility of node is calculated by the following:

In function (15), represents the average “mining cost” in the recent periods of blocks. represents the unit cost. represents the cost for increasing the contract quality; it is small enough compared to . Function (15) can also be estimated to be a function of :

Lemma 7. When is within a reasonable range, there exists a threshold which satisfies the following:

Proof. Calculate derivative of function (16): Same as function (12), decreases strictly and approaches to 0., when satisfies the following: Function (16) exhibits increasing and then decreasing. Lemma 7 stands.☐

In a PoE-based blockchain, the strategy space of node is as follows:

In function (20), represents increment space of the computing power consumption and the contract quality. Now function (15) can be expressed as follows:

Theorem 8. When satisfies function (20) and satisfies function (17), the PoE mechanism is incentive-compatible.

Proof. According to Theorem 5 and Theorem 6, it is obvious that is increasing. According to function (14), function (15), and function (21), it is easy to infer that satisfies the following: Theorem 8 stands.☐

It can be seen from the establishment of Theorem 5, Theorem 6, and Theorem 8 that as a consensus mechanism, PoE is incentive-compatible. It means that under PoE, rational nodes are more likely to choose to improve the quality of their contracts and remain active to improve their profits. This explains the feasibility of PoE.

5. Experiment and Discussion

In this section, a method of evaluating the flexibility of a consensus mechanism is proposed. According to the generic models of PoW and PoS mentioned in Section 3.1 and Algorithm 1, we first test and compare the performances of 3 nodes under 3 different mechanisms in Exp1. Then, we test the impact of the contract quality on nodes’ performances under PoE in Exp2. At last, we discuss the main application directions of PoE.

5.1. Flexibility Comparison

The 3 nodes have different characteristics and strategy preferences at the very beginning, as is shown in Table 2: node performs as a full-time miner, so he has the highest computing power and always keeps active; node performs as a lazy rich guy, so he has a high level of coinage and creates some smart contracts for transactions; node performs as a new and hard-working developer, so he keeps active and creates a number of smart contracts for different applications.

5.1.1. Profits

The profit changes of under PoW, PoS, and PoE during 400 periods of blocks are shown in Figure 2. It is directly shown in the line charts that compared to those under PoW or PoS, node accumulates its profits more quickly under PoE and surpasses and in a short time.

5.1.2. Probability Distributions

We tested ’s probability distribution of becoming the bookkeeper during 400 periods of blocks for 50 times under PoW, PoS, and PoE. The probability distributions are shown in Figure 3. Figures 2 and 3 directly indicate that node , , and have their own advantages under the 3 different mechanisms.

The flexibility of a consensus mechanism is a property which reflects the novice-friendliness and the incentive of .

Proposition 9. The flexibility of a consensus mechanism is proportional to the average probability that a new node successfully becomes the bookkeeper under during the first periods of blocks.

We do not have to prove the simple proposition presented above. Note that node is a new node in the blockchain, so we calculate the average probability of node under different mechanisms:

Obviously, node has excellent performance under PoE. Note that the cost of creating a smart contract (or improving the contract quality) is much less than increasing the computing power or increasing the coinage. Hence, it is not difficult to summarize that PoE is more flexible than PoW and PoS.

5.2. Impact of Contract Quality

In Exp2, we assume that , , and are all hard-working developers, and their characteristics are shown in Table 3.

In Exp2, the basic rules are as follows: (i)At (ii)(iii)At and there is when

Different from Exp1, we considered the average quality of smart contracts in Exp2. We improved the average contract quality of node by 0%, 30%, 60%, and 90%, respectively, and tested ’s probability distribution of becoming the bookkeeper under PoE, and the results are shown in Figure 4.

We calculate the average probability of node when is 0%, 30%, 60%, and 90% higher than the average value :

Our experimental results directly indicate that when node ’s average contract quality improves by 30%, 60%, and 90%, and its average probability to become a bookkeeper is improved by about 12.9%, 22.5%, and 31.3%.

5.3. Application Discussion

According to the characteristics of PoE, we have made some assumptions about its application directions.

5.3.1. Knowledge Payment Platforms

Higher quality, more practical knowledge deserves a higher price.

Suppose in a Q&A community, users ask and answer questions in different areas, such as medicine, finance, and law. The community will reward users with excellent answers, and the questioner also gives the answerer some appreciation for solving his/her problems. A PoE-based blockchain is suitable for building a Q&A community, for example, a senior lawyer can quickly accumulate his fame and income by answering a number of questions related to law in such a community.

5.3.2. Copyright Protection

The data should be traceable and hard to be tampered with.

Thanks to the characteristics of a PoE-based blockchain, the publication time and author information of work can be traced back and it is very difficult to be tampered with. In addition, excellent works can be endorsed by experts in the industry, so that the author’s hard work can be recognized by the industry.

5.3.3. Distributed Social Networks

High-quality content creators should be recommended to be followed by users. A more active user should have a louder voice.

Suppose on a video website, users can get coins by daily logging in and watching videos, which will be given to their favorite videos as “like.” Videos with more coins will be recommended to each user’s home page, and the video creators will be recommended to be followed. A PoE-based blockchain can meet the needs of such distributed social networks and greatly reduce the pressure of centralized storage. In addition, it can protect users’ creations from usurpation.

6. Conclusion

This study mainly investigates a novel consensus mechanism called proof of engagement. Specifically, we first present a definition of consensus mechanism and propose a generic model of proof-class consensus mechanisms, and on this basis, establish the generic and calculation models of PoE. Secondly, we present the algorithms of the consensus process. Thirdly, from the perspective of mechanism design, we analyze the incentive compatibility of our mechanism. If a node keeps active and improves its contract quality, it will always gain more profits than performing idleness. At last, we test the flexibility of our mechanism through a series of simulation experiments and discuss the main application directions of PoE. The experimental results show that a new node is more easier to increase profits if he/she maintains a high level of engagement. Our mechanism has better incentives for contract creators than PoW and PoS. This is a strong indication that to a large extent, PoE weakens the Matthew Effect. Generally speaking, PoE is a flexible, fair, and novice-friendly mechanism. This work provides a new idea for the industrial combination of blockchain; it will bring benefits to the development of smart contracts and distributed autonomous systems such as DApp, DAO, and DAS.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported in part by the National Natural Science Foundation of China under Grant 61872313, in part by the Key Research Projects in Education Informatization in Jiangsu Province under Grant 20180012, in part by the Yangzhou Science and Technology under Grant YZ2020174 and Grant YZ2019133, and in part by the Open Project in the State Key Laboratory of Ocean Engineering, Shanghai Jiao Tong University under Grant 1907.