# Proof of Engagement: A Flexible Blockchain Consensus Mechanism

Authors: Yuntao Xu; Xingyu Yang; Jiale Zhang; Junwu Zhu; Maosheng Sun; Bing Chen
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## 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.


---

## Body

## 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 PoEPaper 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.


## 2. Related Work

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:(1)Fdiffblockheader⟶SHA256SHA256blockheader<MaxTargetdiffIn this model,MaxTarget represents the maximum target value, and diff represents the degree of difficulty, which is used to control the production interval of each block.PoS is modeled as follows:(2)SHA256SHA256timestamp<target×CoinAge.In this model,CoinAge 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 mechanismM≔<ℝ,×B,fM> is a triple, which consists of the following:
(i)
A real number setℝ(ii)
A blockchain×B=B0,B1,⋯,Bk(iii)
A mappingfM:ℝ⟶Bk+1 of block productionBased on Definition1, 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.Figure 1
The generic model of a proof-class mechanism.Under a proof-class consensus mechanismMp, a new block is produced if and only if fMp follows the inequality:
(3)Calculation<target×attribute.Calculation represents the calculation for a solution, target represents the solution target, and attribute 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 areasTo achieve our goals, we introduce the contract quality and the node activity into PoE. Based on Definition1, we present the generic model of PoE.Definition 2.
PoE≔<ℝ,×B,I,×C,fPoE> is a quintuple, which consists of the following:
(i)
A real number setℝ(ii)
A blockchain×B=B0,B1,⋯,Bk(iii)
A setI=i1,⋯,in of network nodes(iv)
A set×C=×Ci∪×C−i of smart contracts(v)
A mappingfPoE:ℝ⟶Bk+1 of block productionUnder PoE, a new block is produced if and only iffPoE follows the inequality:
(4)Calculation<target×contractquality×activity.


### 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 Table1.Table 1
Parameters in PoE model.
SymbolDescriptionΩiaNodei’s engagement in work area aCiaSmart contract applied in work areaa, created by node iQCQuality of smart contractC, QC∈0,1StaCStatic evaluation value of smart contractCDynCDynamic evaluation value of smart contractCθAdjustable parameter to control the value ofQCHiaNodei’s activity in work area akBlock periods in a PoE-based blockchainTiaNodei’s transaction volume in work area aγiaNodei’s computing power consumption in work area aPiNodei’s expected profits in a PoE-based blockchainThe engagementΩia reflects the discourse power of node i in work area a, which is calculated by the following:
(5)Ωia=1+∑QCia×Hia.The qualityQC of smart contract C is as follows:
(6)QC=StaC×DynC×θ.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 evaluationStaC reflects the code quality of smart contract C; 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, StaC 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 DynC.The dynamic evaluationDynC reflects the popularity of smart contract C, which is indicated by the following:
(7)DynC=∑k=k¨−Δkk¨CallCountCkΔk.In function (8), k¨ represents the current period of block, and CallCountCk represents the number of times contract C was called during the period of Bk. DynC reflects how popular contract C was in the last Δk 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 areaa is a static property of a smart contract; it is determined by the application direction of the contract. The activity of node i in work area 𝑎 is calculated by the following:
(8)Hia=∑k=k¨−Δkk¨Tiak+γikaΔk.In function (9), node i’s transaction volume and consumption of computing power during the last Δk 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 profitPi of node i in a PoE-based blockchain is as follows:
(9)Pi=reward×∑a=a1amΩia∑x=1nΩx.In function (10), a node’s total engagement Ωx in a PoE-based blockchain is the sum of its engagement in all m 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 setI=i1,⋯,in of network nodes(ii)
A setΩ=Ωi1,⋯,Ωin of nodes’ total engagement(iii)
A unique bookkeeperb(iv)
A encryption functioncalculation(v)
A range target of solutionsIn a PoE-based blockchain, the process of the leader election stage is shown as Algorithm1. 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.Algorithm 1: Leader election.
Input:I,Ω,targetOutput:b1. while True do2.  for alli∈I do3.   ifcalculation.result<target×Ωi then4.b⟵i5.    break6.   else7.      continue8.   end if9.  end for10. end while11. returnb


#### 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×C~=C1,⋯,Cj of validated smart contracts(ii)
A set×Č=C1,⋯,Ct of smart contracts to be updated(iii)
A setA=a1,⋯,am of different work areas(iv)
A setI=i1,⋯,in of network nodes(v)
n sets ×Ωia=Ωia1,⋯,Ωiam of n nodes’ engagement in different work areas(vi)
Block capacityV, the maximum number of contract-addresses stored in a block(vii)
A functiongetWorkArea for getting the work area of a smart contractIn a PoE-based blockchain, the validation process of smart contracts is shown as Algorithm2 and the chain updation stage is shown as Algorithm 3.Algorithm 2: Validation process of smart contracts.
Input:×C=C1,⋯,Cn,S^Output:×C~=C1,⋯,Cm1.×C~⟵null2. forC∈×C do3.S⟵StaC in function(3)4.   ifS≥S^ then5.     addC to ×C~6.   end if7. end for8. return×C~Algorithm 3: Chain updation of smart contracts.
Input:×C~,A,I,×Ωia,VOutput:×Č1.×Č⟵null2.L⟵null3.v⟵04. forC∈×C~ do5.ΩC⟵06.   fora∈A do7.    ifa==getWorkAreaC then8.     fori∈I do9.      if agree then10.ΩC⟵ΩC+Ωia11.       addΩC to L12.      else13.       continue14.      end if15.     end for16.    end if17.   end for18. end for19. whilev<V do20.v⟵v+121.   forΩCi∈L do22.    ifΩCi==maxL then23.     addCi to ×Č24.    end if25.   end for26. end while27. return×ČIn Algorithm2, S^ represents a threshold for the static evaluation of smart contracts. In other words, a smart contract is “qualified” when its static evaluation reaches S^. In Algorithm 3, network nodes vote for the validated smart contracts, and if a node agrees to contract C, he/she will use his/her engagement in the same field to endorse the contract by adding Ωiato ΩC. The mechanism will determine which contracts are eventually recorded on the blockchain, based on their engagement ΩC and the block capacity.


## 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 mechanismM≔<ℝ,×B,fM> is a triple, which consists of the following:
(i)
A real number setℝ(ii)
A blockchain×B=B0,B1,⋯,Bk(iii)
A mappingfM:ℝ⟶Bk+1 of block productionBased on Definition1, 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.Figure 1
The generic model of a proof-class mechanism.Under a proof-class consensus mechanismMp, a new block is produced if and only if fMp follows the inequality:
(3)Calculation<target×attribute.Calculation represents the calculation for a solution, target represents the solution target, and attribute 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 areasTo achieve our goals, we introduce the contract quality and the node activity into PoE. Based on Definition1, we present the generic model of PoE.Definition 2.
PoE≔<ℝ,×B,I,×C,fPoE> is a quintuple, which consists of the following:
(i)
A real number setℝ(ii)
A blockchain×B=B0,B1,⋯,Bk(iii)
A setI=i1,⋯,in of network nodes(iv)
A set×C=×Ci∪×C−i of smart contracts(v)
A mappingfPoE:ℝ⟶Bk+1 of block productionUnder PoE, a new block is produced if and only iffPoE follows the inequality:
(4)Calculation<target×contractquality×activity.


## 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 Table1.Table 1
Parameters in PoE model.
SymbolDescriptionΩiaNodei’s engagement in work area aCiaSmart contract applied in work areaa, created by node iQCQuality of smart contractC, QC∈0,1StaCStatic evaluation value of smart contractCDynCDynamic evaluation value of smart contractCθAdjustable parameter to control the value ofQCHiaNodei’s activity in work area akBlock periods in a PoE-based blockchainTiaNodei’s transaction volume in work area aγiaNodei’s computing power consumption in work area aPiNodei’s expected profits in a PoE-based blockchainThe engagementΩia reflects the discourse power of node i in work area a, which is calculated by the following:
(5)Ωia=1+∑QCia×Hia.The qualityQC of smart contract C is as follows:
(6)QC=StaC×DynC×θ.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 evaluationStaC reflects the code quality of smart contract C; 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, StaC 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 DynC.The dynamic evaluationDynC reflects the popularity of smart contract C, which is indicated by the following:
(7)DynC=∑k=k¨−Δkk¨CallCountCkΔk.In function (8), k¨ represents the current period of block, and CallCountCk represents the number of times contract C was called during the period of Bk. DynC reflects how popular contract C was in the last Δk 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 areaa is a static property of a smart contract; it is determined by the application direction of the contract. The activity of node i in work area 𝑎 is calculated by the following:
(8)Hia=∑k=k¨−Δkk¨Tiak+γikaΔk.In function (9), node i’s transaction volume and consumption of computing power during the last Δk 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 profitPi of node i in a PoE-based blockchain is as follows:
(9)Pi=reward×∑a=a1amΩia∑x=1nΩx.In function (10), a node’s total engagement Ωx in a PoE-based blockchain is the sum of its engagement in all m 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 setI=i1,⋯,in of network nodes(ii)
A setΩ=Ωi1,⋯,Ωin of nodes’ total engagement(iii)
A unique bookkeeperb(iv)
A encryption functioncalculation(v)
A range target of solutionsIn a PoE-based blockchain, the process of the leader election stage is shown as Algorithm1. 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.Algorithm 1: Leader election.
Input:I,Ω,targetOutput:b1. while True do2.  for alli∈I do3.   ifcalculation.result<target×Ωi then4.b⟵i5.    break6.   else7.      continue8.   end if9.  end for10. end while11. returnb


### 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×C~=C1,⋯,Cj of validated smart contracts(ii)
A set×Č=C1,⋯,Ct of smart contracts to be updated(iii)
A setA=a1,⋯,am of different work areas(iv)
A setI=i1,⋯,in of network nodes(v)
n sets ×Ωia=Ωia1,⋯,Ωiam of n nodes’ engagement in different work areas(vi)
Block capacityV, the maximum number of contract-addresses stored in a block(vii)
A functiongetWorkArea for getting the work area of a smart contractIn a PoE-based blockchain, the validation process of smart contracts is shown as Algorithm2 and the chain updation stage is shown as Algorithm 3.Algorithm 2: Validation process of smart contracts.
Input:×C=C1,⋯,Cn,S^Output:×C~=C1,⋯,Cm1.×C~⟵null2. forC∈×C do3.S⟵StaC in function(3)4.   ifS≥S^ then5.     addC to ×C~6.   end if7. end for8. return×C~Algorithm 3: Chain updation of smart contracts.
Input:×C~,A,I,×Ωia,VOutput:×Č1.×Č⟵null2.L⟵null3.v⟵04. forC∈×C~ do5.ΩC⟵06.   fora∈A do7.    ifa==getWorkAreaC then8.     fori∈I do9.      if agree then10.ΩC⟵ΩC+Ωia11.       addΩC to L12.      else13.       continue14.      end if15.     end for16.    end if17.   end for18. end for19. whilev<V do20.v⟵v+121.   forΩCi∈L do22.    ifΩCi==maxL then23.     addCi to ×Č24.    end if25.   end for26. end while27. return×ČIn Algorithm2, S^ represents a threshold for the static evaluation of smart contracts. In other words, a smart contract is “qualified” when its static evaluation reaches S^. In Algorithm 3, network nodes vote for the validated smart contracts, and if a node agrees to contract C, he/she will use his/her engagement in the same field to endorse the contract by adding Ωiato ΩC. The mechanism will determine which contracts are eventually recorded on the blockchain, based on their engagement ΩC and the block capacity.


## 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 setI=i1,⋯,in of network nodes(ii)
A setΩ=Ωi1,⋯,Ωin of nodes’ total engagement(iii)
A unique bookkeeperb(iv)
A encryption functioncalculation(v)
A range target of solutionsIn a PoE-based blockchain, the process of the leader election stage is shown as Algorithm1. 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.Algorithm 1: Leader election.
Input:I,Ω,targetOutput:b1. while True do2.  for alli∈I do3.   ifcalculation.result<target×Ωi then4.b⟵i5.    break6.   else7.      continue8.   end if9.  end for10. end while11. returnb


## 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×C~=C1,⋯,Cj of validated smart contracts(ii)
A set×Č=C1,⋯,Ct of smart contracts to be updated(iii)
A setA=a1,⋯,am of different work areas(iv)
A setI=i1,⋯,in of network nodes(v)
n sets ×Ωia=Ωia1,⋯,Ωiam of n nodes’ engagement in different work areas(vi)
Block capacityV, the maximum number of contract-addresses stored in a block(vii)
A functiongetWorkArea for getting the work area of a smart contractIn a PoE-based blockchain, the validation process of smart contracts is shown as Algorithm2 and the chain updation stage is shown as Algorithm 3.Algorithm 2: Validation process of smart contracts.
Input:×C=C1,⋯,Cn,S^Output:×C~=C1,⋯,Cm1.×C~⟵null2. forC∈×C do3.S⟵StaC in function(3)4.   ifS≥S^ then5.     addC to ×C~6.   end if7. end for8. return×C~Algorithm 3: Chain updation of smart contracts.
Input:×C~,A,I,×Ωia,VOutput:×Č1.×Č⟵null2.L⟵null3.v⟵04. forC∈×C~ do5.ΩC⟵06.   fora∈A do7.    ifa==getWorkAreaC then8.     fori∈I do9.      if agree then10.ΩC⟵ΩC+Ωia11.       addΩC to L12.      else13.       continue14.      end if15.     end for16.    end if17.   end for18. end for19. whilev<V do20.v⟵v+121.   forΩCi∈L do22.    ifΩCi==maxL then23.     addCi to ×Č24.    end if25.   end for26. end while27. return×ČIn Algorithm2, S^ represents a threshold for the static evaluation of smart contracts. In other words, a smart contract is “qualified” when its static evaluation reaches S^. In Algorithm 3, network nodes vote for the validated smart contracts, and if a node agrees to contract C, he/she will use his/her engagement in the same field to endorse the contract by adding Ωiato ΩC. The mechanism will determine which contracts are eventually recorded on the blockchain, based on their engagement ΩC 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 valuesHi1¯,Hi2¯ of node 𝑖, which satisfy Hi1¯>Hi2¯, and all the other variables are constant, there is Pi1>Pi2.Proof.
Pi is estimated to be a function of the average activity Hi¯ of node 𝑖:
(10)Pi=reward×H¯i×m+∑j=1mQCiH¯i×m+∑j=1mQCi+H¯−i×m+∑j=1mQC−iA⟵m+∑j=1mQCi,B⟵H¯−i×m+∑j=1mQC−i⇒Pi=reward×H¯i×AH¯i×A+B.
Calculate derivative of function (11) with respect to 𝐻 ̄𝑖, and the outcome is as follows:
(11)Pi,H¯i=reward×A×BH¯i×A+B2.
Obviously, there isPi,H¯i>0, 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 valuesQi1,Qi2of node 𝑖, which satisfy Qi1>Qi2, and all the other variables are constant, there is Pi1>Pi2.Proof.
From function (11), it is obvious that Pi can also be estimated to be a function Pi,A of A. Calculate derivative of Pi,A with respect to AA=m+Q, and the outcome is as follows:
(12)Pi,A=reward×H¯i×BH¯i×A+B2.
Similarly there isPi,A>0, so the function Pi,A 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 q,t is incentive-compatible if and only if
(1)
q is increasing(2)
For everyθ∈θ¯,θ¯, we have(13)tθ=tθ¯+θqθ−θ¯qθ¯−∫θ¯θqxdxIt 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 utilityui of node i is calculated by the following:
(14)ui=Pi−Γi−OqiΓi=σ×γi.In function (15), Γi represents the average “mining cost” in the recent Δk periods of blocks. σσ>0 represents the unit cost. Oqi represents the cost for increasing the contract quality; it is small enough compared to Γi. Function (15) can also be estimated to be a function of γi:
(15)uγi=Pγi−Γγi−Oqi.Lemma 7.
Whenσ is within a reasonable range, there exists a threshold γi^ which satisfies the following:
(16)uγi^=maxuγi.Proof.
Calculate derivative of function (16):
(17)u′γi=P′γi−Γ′γi.
Same as function (12), P′γi decreases strictly and approaches to 0.Γ′γi=σσ>0, when σ satisfies the following:
(18)0<σ<reward×AB.Function (16) exhibits increasing and then decreasing. Lemma 7 stands.☐In a PoE-based blockchain, the strategy space of nodei is as follows:
(19)si=γi×qiγi∈0,γi^,qi∈0,1,qiγi=γi^,qi∈0,1,γiγi∈0,γi^,qi=1,si^γi=γi^,qi=1.In function (20), γi,qi represents increment space of the computing power consumption and the contract quality. Now function (15) can be expressed as follows:
(20)ui=uγi,qiγi∈0,γi^,qi∈0,1,uqiγi=γi^,qi∈0,1,uγiγi∈0,γi^,qi=1,usi^γi=γi^,qi=1.Theorem 8.
Whensi satisfies function (20) and σ satisfies function (17), the PoE mechanism is incentive-compatible.Proof.
According to Theorem5 and Theorem 6, it is obvious that Pi is increasing. According to function (14), function (15), and function (21), it is easy to infer that usi satisfies the following:
(21)usi≥usi′⇔,(22)usi≥si∫si¯si′δPiδsi′dx−∫si¯si′δΓiδsi′dx+∫si¯si′δOqiδsi′dx⇔,(23)usi≥siϑsi′−si′ϑsi′+si′ϑsi′−τsi′⇔,(24)usi≥siϑsi′−si′ϑsi′+usi′⇔,(25)usi−usi′≥si−si′ϑsi′⇔,(26)∫si′siϑxdx≥∫si′siϑsi′dx⇔.
Theorem8 stands.☐It can be seen from the establishment of Theorem5, 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 Section3.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 Table2: node a performs as a full-time miner, so he has the highest computing power and always keeps active; node b performs as a lazy rich guy, so he has a high level of coinage and creates some smart contracts for transactions; node c performs as a new and hard-working developer, so he keeps active and creates a number of smart contracts for different applications.Table 2
Attributes of nodes atB0 in Exp1.
AttributeabcRemarksComputing power100101ConstantCoin age101001VariableActivity10110ConstantContract quality (total)110qVariable


#### 5.1.1. Profits

The profit changes ofa,b,c 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 a accumulates its profits more quickly under PoE and surpasses b and c in a short time.Figure 2
Profits under different consensus mechanisms in Exp1.


#### 5.1.2. Probability Distributions

We testeda,b,c’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 a, b, and c have their own advantages under the 3 different mechanisms.Figure 3
Probability distribution under different consensus mechanisms in Exp1.The flexibilityΦM of a consensus mechanism M is a property which reflects the novice-friendliness and the incentive of M.Proposition 9.
The flexibilityΦM of a consensus mechanism M is proportional to the average probability ϕnew¯ that a new node successfully becomes the bookkeeper under M during the first k periods of blocks.We do not have to prove the simple proposition presented above. Note that nodec is a new node in the blockchain, so we calculate the average probability ϕc¯ of node c under different mechanisms:
(27)ϕ¯cPoW=0.0097,ϕ¯cPoS=0.0452,ϕ¯cPoE=0.5462.Obviously, nodec 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 thata, b, and c are all hard-working developers, and their characteristics are shown in Table 3.Table 3
Attributes of nodes atB0 in Exp2.
AttributeabcRemarksComputing power111ConstantCoin age111VariableActivity101010ConstantContract qualitycccVariableContract quality (average)11qVariableIn Exp2, the basic rules are as follows:(i)
AtB0,Pa=1,Pb=1,Pc=1(ii)
Pi=Pi+1ifb⟵i(iii)
AtB0,c=1, and there isc=c+1 when Bk=Bk+1Different from Exp1, we considered the average quality of smart contracts in Exp2. We improved the average contract quality of nodec by 0%, 30%, 60%, and 90%, respectively, and tested a,b,c’s probability distribution of becoming the bookkeeper under PoE, and the results are shown in Figure 4.Figure 4
Probability distribution under PoE with contract quality increasing in Exp2.
(a)
Q¯×Cc=Q¯×C(b)
Q¯×Cc=130%Q¯×C(c)
Q¯×Cc=160%Q¯×C(d)
Q¯×Cc=190%Q¯×CWe calculate the average probabilityϕc¯ of node c when Q×Cc¯ is 0%, 30%, 60%, and 90% higher than the average value Q×C¯:
(28)Φ¯cQ¯×Cc=100%Q¯×C=0.3384,Φ¯cQ¯×Cc=130%Q¯×C=0.3820,Φ¯cQ¯×Cc=160%Q¯×C=0.4144,Φ¯cQ¯×Cc=190%Q¯×C=0.4444.Our experimental results directly indicate that when nodec’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.


## 5.1. Flexibility Comparison

The 3 nodes have different characteristics and strategy preferences at the very beginning, as is shown in Table2: node a performs as a full-time miner, so he has the highest computing power and always keeps active; node b performs as a lazy rich guy, so he has a high level of coinage and creates some smart contracts for transactions; node c performs as a new and hard-working developer, so he keeps active and creates a number of smart contracts for different applications.Table 2
Attributes of nodes atB0 in Exp1.
AttributeabcRemarksComputing power100101ConstantCoin age101001VariableActivity10110ConstantContract quality (total)110qVariable


### 5.1.1. Profits

The profit changes ofa,b,c 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 a accumulates its profits more quickly under PoE and surpasses b and c in a short time.Figure 2
Profits under different consensus mechanisms in Exp1.


### 5.1.2. Probability Distributions

We testeda,b,c’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 a, b, and c have their own advantages under the 3 different mechanisms.Figure 3
Probability distribution under different consensus mechanisms in Exp1.The flexibilityΦM of a consensus mechanism M is a property which reflects the novice-friendliness and the incentive of M.Proposition 9.
The flexibilityΦM of a consensus mechanism M is proportional to the average probability ϕnew¯ that a new node successfully becomes the bookkeeper under M during the first k periods of blocks.We do not have to prove the simple proposition presented above. Note that nodec is a new node in the blockchain, so we calculate the average probability ϕc¯ of node c under different mechanisms:
(27)ϕ¯cPoW=0.0097,ϕ¯cPoS=0.0452,ϕ¯cPoE=0.5462.Obviously, nodec 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.1.1. Profits

The profit changes ofa,b,c 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 a accumulates its profits more quickly under PoE and surpasses b and c in a short time.Figure 2
Profits under different consensus mechanisms in Exp1.


## 5.1.2. Probability Distributions

We testeda,b,c’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 a, b, and c have their own advantages under the 3 different mechanisms.Figure 3
Probability distribution under different consensus mechanisms in Exp1.The flexibilityΦM of a consensus mechanism M is a property which reflects the novice-friendliness and the incentive of M.Proposition 9.
The flexibilityΦM of a consensus mechanism M is proportional to the average probability ϕnew¯ that a new node successfully becomes the bookkeeper under M during the first k periods of blocks.We do not have to prove the simple proposition presented above. Note that nodec is a new node in the blockchain, so we calculate the average probability ϕc¯ of node c under different mechanisms:
(27)ϕ¯cPoW=0.0097,ϕ¯cPoS=0.0452,ϕ¯cPoE=0.5462.Obviously, nodec 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 thata, b, and c are all hard-working developers, and their characteristics are shown in Table 3.Table 3
Attributes of nodes atB0 in Exp2.
AttributeabcRemarksComputing power111ConstantCoin age111VariableActivity101010ConstantContract qualitycccVariableContract quality (average)11qVariableIn Exp2, the basic rules are as follows:(i)
AtB0,Pa=1,Pb=1,Pc=1(ii)
Pi=Pi+1ifb⟵i(iii)
AtB0,c=1, and there isc=c+1 when Bk=Bk+1Different from Exp1, we considered the average quality of smart contracts in Exp2. We improved the average contract quality of nodec by 0%, 30%, 60%, and 90%, respectively, and tested a,b,c’s probability distribution of becoming the bookkeeper under PoE, and the results are shown in Figure 4.Figure 4
Probability distribution under PoE with contract quality increasing in Exp2.
(a)
Q¯×Cc=Q¯×C(b)
Q¯×Cc=130%Q¯×C(c)
Q¯×Cc=160%Q¯×C(d)
Q¯×Cc=190%Q¯×CWe calculate the average probabilityϕc¯ of node c when Q×Cc¯ is 0%, 30%, 60%, and 90% higher than the average value Q×C¯:
(28)Φ¯cQ¯×Cc=100%Q¯×C=0.3384,Φ¯cQ¯×Cc=130%Q¯×C=0.3820,Φ¯cQ¯×Cc=160%Q¯×C=0.4144,Φ¯cQ¯×Cc=190%Q¯×C=0.4444.Our experimental results directly indicate that when nodec’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.


## 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.



---

*Source: 6185910-2021-08-20.xml*