Impacts of Consensus Protocols and Trade Network Topologies on Blockchain System Performance

Blockchain can be viewed as a public ledger maintained collectively by a large number of participators based on consensus protocol. We are interested in how di erent consensus protocols and trade network topologies a ect the performance of a blockchain system, which has not been studied in the literature yet. In this paper, we proposed an agent-basedmodel consisting ofmultiple trader andminer agents, and one system agent. We investigated three consensus protocols, namely proof-of-work (PoW), proof-of-stake (PoS), and delegated proof-of-stake (DPoS).We also examined three common trade network topologies: random, small-world, and scale-free. We find that both consensus protocol and trade network topology can impact the performance of blockchain system. PoS and DPoS are generally better than PoW in terms of increasing trade e iciency and equalizing wealth. Besides, scale-free trade network is not favorable because its trade e iciency is quite low, which moderates the price fluctuation and wealth inequality. Since connectivity inequality determines trade e iciency and wealth inequality, it is crucial to increase the connectivity among participants by means of not only using better consensus protocols such as PoS or DPoS, but also incentivizing apathetic or newly-joined participants to link with others. We suggest that our findings could be useful to the designers, practitioner and researchers of blockchain system and token economy.


Introduction
. Blockchain can be defined as a distributed shared database generated based on cryptography technology. It maintains a reliable database in a decentralized way: a large number of participators commute through a peerto-peer (P P) network, and the data they generated is digitally signed using cryptography protocols. More importantly, such data will be packed as a block, and appended to a chain of blocks, i.e., the blockchain. Hence, the blockchain can be viewed a large public ledger maintained collectively on the P P network based on consensus protocol (Antonopoulos ). .
The technical architecture of blockchain can be divided into six layers (Yuan & Wang ), as demonstrated in Figure . The consensus layer is a very unique and fundamental part of the blockchain system, because many consensus protocol have been developed to ensure the sustainability of the system (Du et al. ). Another interesting feature of blockchain system is the trade network among autonomous traders, which is di erent from the P P network of hardware devices. Unlike the stock market, traders in the blockchain system have no central counter party which provides clearing and settlement services (Nakamoto ). Instead, they have to trade with the neighbors in the trade network. Therefore, we are interested in how di erent consensus protocols and trade network topologies a ect the performance of a blockchain system, which has not been studied in the literature yet.

Literature Review
Consensus protocol . Since blockchain is a distributed computing system, it is essential to tackle the Byzantine generals problem named by Lamport et al. ( ). This problem requires that participators must agree on a concerted strategy to avoid catastrophic system failure, but some of the participators are unreliable. Lamport et al. ( ) discussed several solutions assuming a loyal general as the Commander. Later, Lamport ( , ) proposed the Paxos algorithm in which there are many roles such as client, voter, proposer, learner and leader. A well-known implementation of Paxos is the Ra algorithm (Ongaro & Ousterhout ). Since Castro & Liskov ( ) proposed the practical Byzantine fault tolerance (PBFT) algorithm with significantly-improved performance, many variants were developed, such as HQ (Cowling et al. ), MinBFT (Veronese et al. ), and RBFT (Aublin et al. ). .
The first blockchain-based consensus protocol has been proposed by Nakamoto ( ), who called it "Proof of Work" (PoW) protocol. Using the hash function, it is very di icult to find the right input so that a certain number of characters in the hash output string are all zeros. The general who finds the right input first is able to create a block, and other generals will verify the hash string and accept the block. As the blockchain grows, unreliable participators can barely attack the system unless their computation power is greater than %. Although PoW has been successfully applied in the BitCoin system, vast energies are wasted because participators have to increase their computation power to win the competition of solving cryptographic puzzles. Therefore, many other blockchain consensus protocols have been proposed. For example, King & Nadal ( ) introduced the proofof-stake (PoS) protocol and it was applied to the PPCoin system. It was improved by Ethereum, a blockchainbased distributed computing platform, as the Casper Protocol, i.e., security-deposit based economic consensus protocol (Buterin & Gri ith ). Larimer ( ) created the delegated proof-of-stake (DPoS) protocol, which was employed by Steemit, a well-known blockchain-based social media platform (Li & Palanisamy ). Other blockchain-based consensus protocols include proof of retrievability (Juels & Kaliski Jr ), proof of space (Dziembowski et al. ), etc. For recent surveys of consensus protocols, we refer the reader to Du et al. ( ) and Wang et al. ( ). To the best of our knowledge, however, how to quantify the system-wide impact of a blockchain-based consensus protocol remains unexplored.

Agent-based Model
.
An agent-based model (ABM) is a class of computational models for simulating the actions and interactions of autonomous agents (both individual or collective entities such as organizations or groups) with a view to assessing their e ects on the system as a whole (Macal & North ). Based on the complex adaptive systems theory (Holland ), agent-based models have been widely used in many fields, such as supply chains (Lin & Lin ), online-to-o line food ordering and delivery markets ( . Recently, agent-based models have been developed to study blockchain systems. Currently, there are three studies most relevant to our work. Cocco & Marchesi ( ) created an ABM to simulate the economy of the Bitcoin mining process, and successfully reproduced the unit root property, the fat tail phenomenon and the volatility clustering of Bitcoin price series. Kaligotla & Macal ( ) proposed a generalized agent-based conceptual framework of a blockchain system, in which essential elements (such as market agent, miner agent, transactions, public ledger) were well defined and modeled. They also investigated how the strategy scenario in which agents choose verification blocks a ect energy e iciency of blockchain system. The other similar agentbased blockchain model was proposed by Lee et al. ( ), which integrated inverse reinforcement learning to generate the behavioral rules of traders in blockchain system. Based on the bitcoin transactions data, the bitcoin demand and supply protocols were simulated in the model, so that the movement of bitcoin price can be emerged from agent interactions. Although these two insightful studies have enriched our understanding of the blockchain system, they did not consider the impact of consensus protocols and trade network topologies on the blockchain system performance.

Summary .
Motivated by above findings, we studied the research problem proposed in Section Introduction using the ABMS technique, because each participator in the blockchain system is an autonomous decision-maker interacting with his/her network neighbors, the dynamic of which can barely be modeled by other approaches such as mathematical models.

Preliminaries and Model Assumptions
Consensus protocol . Consensus protocol is an important component of a blockchain system. The goal of developing and applying consensus protocol is to make all honest nodes maintain a public distributed blockchain, while satisfying two properties: ) Consistency. All honest nodes hold exactly the same blockchain. ) E ectiveness. Information published by one honest node is eventually recorded by all other honesty nodes in their own blockchains. Currently, there are three popular consensus protocols, and the key di erence among them is the way to select a participator (i.e., a miner) for creating a new block. Usually, the selected miner will be rewarded with a certain number of new coins, so that miners are willing to verify transactions and to maintain the sustainability of the blockchain system. .
PoW (proof-of-work) is the first consensus protocol as it was used in the BitCoin system (Nakamoto ). The basic idea of PoW is to ensure data consistency and consensus security by repeatedly running a competition of solving cryptographic puzzles. In particular, miners compete with each other based on their computing power in order to be the first one who finds the right number that makes the hash value of the block head less than or equal to the di iculty target (Antonopoulos ). The miner fastest in solving puzzles will be rewarded by the system with a certain number of coins, and a new block is created by this miner. Many miners decided to purchase high-performance computation devices (i.e., mining rigs) to enhance their computation power, so that the probability of being rewarded will be enlarged. Hence, we propose an assumption for modeling the PoW consensus protocol: Assumption H : Under PoW consensus protocol, the probability that a miner gets coin reward is positively associated with his/her computation power. .
PoS (proof-of-stake) developed a di erent approach to miner selection (Wang et al. ). A concept, stake, was introduced. In some blockchain system, a miner's stake is measured by his/her coin age, which is the product of the number of coins multiplied by the number of days the coins have been held by the miner: stake = (# coins) × (# days the coins have been held).
( ) Once the miner is selected to create and sign the next block, the stake (coin age) will be reset as zero, avoiding the e ect of "the rich get richer" and possible continuous attack from high-stake users (King & Nadal ). Similar to PoW, the miner with higher stake is more likely to forge a block. Hence, we propose an assumption for modeling the PoS consensus protocol: Assumption H : Under PoS consensus protocol, the probability that a miner gets coin reward is positively associated with his/her stake. .
DPoS (delegated proof-of-stake) blockchain system is similar to a joint-stock company, in which active delegates are voted into their roles by token holders (Bach et al. ). Usually, the delegates are chosen with the best interest of the network at heart as they keep the blockchain system running smoothly and safely. To encourage voting, a miner may need to show he/she owns considerable coins, so that his/her trade partners are willing to vote. If a rich miner also has many traders (i.e., large degree in the trade network), he/she is likely to be elected. Hence, we propose an assumption for modeling the DPoS consensus protocol: Assumption H : Under DPoS consensus protocol, the probability that a miner gets coin reward is positively associated with his/her stake and degree.

Trade network topology .
Although many blockchains are public, we cannot identify the network topology of traders because typical users have multiple coin accounts and the transactions are anonymous (Antonopoulos & Wood ). Therefore, we have to assume that the type of trade network topology could be one of three common network topologies: random, small-world, or scale-free.

.
We suggest that the trade network could be a random network, which is o en introduced in many studies as a benchmark case (see, e.g., Huang et al. ). In a random network, every possible trade connection between two users occurs independently with a fixed probability. Hence, we propose an assumption for modeling the trade network in blockchain system: Assumption H : The trade network in blockchain system is a random network.
. Small-world networks have short average distance between two nodes. The distance is defined as the number of edges in a shortest path connecting them. We suggest that the trade network in blockchain system could be a small-world network because many empirical graphs show the small-world e ect (i.e., short chain of acquaintances), including social networks (Zeppini & Frenken ). Hence, we propose an assumption for modeling the trade network in blockchain system: Assumption H : The trade network in blockchain system is a small-world network. .
Scale-free networks are o en created in a way of preferential attachment: new users prefer to make a trade connection to the more popular existing users. Consequently, the more connected a node is, the more likely it is to receive new links. Under this mechanism, the degree distribution of scale-free networks follows a power law, which means that very few nodes have lots of connections while the vast majority of nodes are those with small degree (Ohdaira & Terano ). Hence, we propose an assumption for modeling the trade network in blockchain system: Assumption H : The trade network in blockchain system is a scale-free network.

Model Description
Notation . In this study, we proposed an agent-based model to simulate a blockchain system in which digital coins are traded by agents as currency. Our model consists of multiple trader agents, miner agents, and one system agent. .
In the following section, we explain the behavior of each agent type in a static time step t.

Trader's behavior .
Each trader agent (e.g., i) is initialized with two accounts (time step index t = 0): a cash account with balance (denoted by A i,0 = 10000) and a coin account with balance (C i,0 = 100). At time t, each trader agent has to make his/her trade decision: to buy, sell or hold coins. In our model, the probabilities that trader i at time t decides to buy, to sell or to hold coins are denoted by Pr B i,t , Pr S i,t , Pr H i,t , respectively. Note that the sum of these three probabilities is always .

Making trade decision .
Similar to the classification of stock traders in the study by Liu & Serguieva ( ), there are three groups of traders in our model: noisy traders, herd traders, and game traders. Since it is di icult to obtain the empirical percentages of traders and miners in blockchain systems, we simply let three groups have same traders and miners, i.e., N n = N h = N g = 200 and M n = M h = M g = 100 as displayed in Table . .
Noisy traders. The noisy traders make random decision on buying/selling/holding coins. Such agents represent the traders who use the blockchain system for payment, instead of investment. Therefore, their trade decisions are independent of coin price changes. Following Cocco & Marchesi ( ) who suggests that "buy and sell orders are always issued with the same probability (by random traders)", the decision probabilities of noisy trader i at time t are: NV Stake-degree value of miner j at time t Equation Table : Agent-related variables used in the model. a DV: decision variable; NV: endogenous variable; XV: exogenous variable. The values of DVs and NVs are updated at each time step t; while those of XVs remains unchanged a er initialization.
. Herd traders. Herd traders are very sensitive to the fluctuation of coin price index (denoted by P t ), because such agents represent the coin investors. Following Liu & Serguieva ( ), the probability that a herd trader i will hold his/her coins at time t is computed as follows: where λ i is trader i's sensitivity to price index change, and Therefore, if the coin price index changes sharply (i.e., |∆ t | is a large number), then Pr H i,t will be decreased, which means that most of herd traders will buy or sell their coins. The probability that a herd trader i will buy coins at time t is computed as follows: ( ) Therefore, when the coin price index grows, the herd trader i is more likely to buy coins. Consequently, the probability of selling coins is . Game traders. In financial markets, there are always a minority of traders who try to outwit others (Tanaka-Yamawaki & Tokuoka ). They buy coins while others are selling and sell coins while others are buying, for the purpose of chasing larger profits than behaving as herd traders. Therefore, game traders make decision based on the previous minor decisions released by the system agent. .
To model the decision-making process of game traders, we assume that game trade i only considers previous m i = 2 steps following Liu & Serguieva ( ). Since there are three possible decisions (Buy, Sell, Hold), the number of possible two-stage minor decisions is 3 2 = 9, as listed in the first column of Table . The number of policies to deal with all possible scenarios is 3 9 = , . For example, the first policy can be all "B", which means that no matter what the minor decisions in previous two time steps are, the game trader using Policy st will buy coins at current time step. If Policy nd is applied, the game trade will sell coins only if the previous minor decisions are "HH". .
In our model, each game trade is initialized with L i = 100 randomly-selected policies as his/her policy pool because it is infeasible for a trader to examine all , policies. Besides, a fitness is associate with each selected policy to indicate policy value. Similar to the selection mechanism of genetic algorithm, the game trade in each time step will select and apply a policy selected from the pool according its fitness. At time t + 1, the fitness of some policies will be increased if the decision given by these policies is the minor decision at time t, and will be decreased if not. By doing so, the game traders are "smarter" than other traders since the policies are applied dynamically and the trade decisions are made adaptively. Once trader i has decided to buy, to sell or to hold coins, his/her coin trade request at time t is expressed as follows:

Possible two-stage minor decisions
otherwise.
A positive coin request q i,t means that trader i wants to buy q i,t coins, which is the product of maximum purchasable coins A i,t /P i,t and the percentage limit of coin trade Q i = 0.5 ∈ (0, 1). In contrast, a negative coin request means that trader i wants to sell |q i,t | coins, which depends on his/her coin balance C i,t and Q i .

Trading with available neighbors .
Due to the absence of central counter party in the blockchain system, trader i has to trade with neighbors in his/her trade network. Each trader agent (e.g., i) has a set of neighbors denoted by H i , the number of which is the degree of trader i, i.e., Because of agent heterogeneity and di erent trade decisions, trader i's coin request could not be satisfied. For example, a coin buyer seeks coin sellers from neighbors. He/She will continue seeking until his/her coin request has been fulfilled, or there is no more available seller in neighbors. If all the neighbors are also coin buyers, then trader i's satisfied ratio (denoted by r i,t ) is . Formally, the trader i's satisfied ratio is computed as follows: where 1(x) is the indicator function which yields when x > 0, and yield otherwise. If −q i,t q j,t > 0, the trader i and j have made di erent (and non-hold) trade decisions, and thus they can generate a transaction. Meanwhile, the coin requests of both buyers and sellers will be updated, as well as their cash and coin balances.
All the transactions will be collected by the system agent introduced later in this section.
The miner agents are special traders. Hence, miners are also divided into three groups: noisy, herd, and game miners. They have the same endowment (initial cash, coins, neighbors) with traders, same trade behaviors, e.g., making trade decision, computing coin trade request, and trading with available neighbors.
. However, miners have additional attributes (e.g., computation power, stake) because some of them will be selected by the system agent to create blocks and get a certain number of coins as reward. Let Pr(j) denote the probability that miner j will be selected, Assumption H can be expressed as follows: where U j is miner j's exogenous computation power, and M is the set of all miners. .
Similarly, Assumption H can be expressed as follows: where miner j' stake at time t is updated as follows: If the miner is selected and rewarded, the stake K j,t+1 := 0.
. Finally, Assumption H can be expressed as follows: where the time-dependent V j,t is defined as the stake-degree value of miner j at time t: where γ = 0.5 ∈ (0, 1) is the weight parameter of miner's stake.
The system agent in our model performs many important tasks. First, it creates trader and miner agents and initializes their exogenous variables. Second, if the model meets the stop criterion, the simulation will be terminated and all important data will be saved for further analysis. Third, in each time step, the system agent needs to collect coin supply-demand information, such as the minor trade decision of agents for game traders, the number of total transactions X t , and the total request of buying coins B t : where T is the set of all traders. Similarly, the total request of selling coins S t is computed as follows: Following the popular price update rule by LeBaron ( ) who suggested that the price of an artificial financial market is anchored to the previous price and price change is a proportion of demand/supply excess, the coin price index can be updated as follows: where both α and β are positive parameters of price sensitivity. Consequently, the change of coin price index in our model depends on not only the exceed demand (i.e., B t − S t ), but also the new W t coins generated for incentivizing miners. The coin price index will increase if the exceed demand is large. However, the creation of new coins will suppress the coin price index. In our model, these new coins are equally given to selected miners. In particular, given X t transactions, X t /θ t blocks will be created where θ t is the maximum number of transactions in a block, and x is the ceiling function which returns the smallest integer greater than x > 0.
Therefore, for each block, the corresponding miner will receive W t X t /θ t coins.

Summary .
Before we start the simulation experiments, the agents' behavior should be scheduled in a time step for implementation in the computer simulation programs. Figure summarizes the sequence of events in our model in the form of a unified modeling language behavior diagram, in which parallel vertical lines indicate di erent processes or objects that live simultaneously, and horizontal arrows represent messages exchanged between them in the order in which they occur. All the components in Figure Table . We develop the model using Python, and perform each experiment times to ensure robust outputs against randomness in initializing the computation power, miner selection, policy selection, and so on. All the independent tests of each experiment can be well compared and reproduced by assigning {0, 1, 2, ..., 99} as random seeds, which means that the di erences among experiments almost only depend on the configuration of its consensus protocol and trade network topology.

Random
. Small-world . Scale-free .  Figure : The time sequence diagram of the agent-based blockchain system. The gray rectangles represent involved objects such as agents and the model. White rectangles and horizontal solid lines demonstrate the events and interactions among objects, respectively. .
The events presented in Figure were carried out times for each test, i.e., each simulation stops at t = 1000. Therefore, the total computation load is: experiments × tests with di erent random seeds × time steps. During simulation, we collect necessary data to evaluate the performance of a blockchain, which is measured by three indicators: • Price index of coin P t , as updated by Equation .
• Request-satisfied ratio R t is the division of total satisfied coin requests by total coin requests. The larger the R t is, the higher the trade e iciency of blockchain system is.
• Gini index of all traders and miners, denoted by G t ∈ [0, 1], measures the degree of wealth inequality among agents. In our model, an agent's wealth is the sum of his/her cash balance and coin value (i.e., A t + C t × P t ). A large G t implies that rich agents receiving much larger percentages of the total wealth of the agent population, which may change the blockchain system from decentralized to centralized.

Results and Discussion
. The averaged time series data of performance indicators are illustrated in Figure . The simulation results at the final time step are presented in Table , in which the values are averaged across samples, and the standard deviations are given in brackets. Table also reports the numbers of coin buyers/sellers/holds, as well as the total coin demand and supply requests at the final time step.

The impact of di erent consensus protocols .
From three subplots in the first row of Figure , we observe that three curves, which respectively denote the three consensus protocols, are very similar. A er about time steps, however, the coin prices with PoW consensus protocol become larger than those with other two protocols, but only in random and small-world networks. Regarding the request-satisfied ratio, we find that the performances of PoS and DPoS are very close, and they are greater than that of PoW, as demonstrated in the second row of Figure . Similar situation also happens when we compare the performance of Gini index shown in the third row of of Figure . .
Why is the choice of consensus protocol able to significantly a ect the performance of blockchain system, and why is the PoW di erent? We suggest that PoW forms a positive feedback between large probability of being selected and better condition in miner selection; while PoS and DPoS reset the stake of current selected miner and thus suppress such feedback. Hence, only few miners will be rewarded with new coins under PoW, because this consensus protocol chooses miners only according to their computation powers, which are fixed in our experiment. In contrast, the miner under PoS or DPoS will be unlikely to be selected in several time steps later, leading to the situation that more miners will be rewarded. The impact caused by this di erence is three-fold. First, it directly changes the wealth distribution among agents. The blockchain system under PoW has the largest Gini index because of fewer miners being rewarded, which could harm the sustainability of blockchain system. Second, it changes the balance between total coin demand and supply, and thus indirectly a ects the coin price index. For example, the PoW consensus protocol leads to fewer new-coin sellers and consequently higher price, as demonstrated in Table (coin price index, # coin sellers). Third, it also impacts the request-satisfied ratio. the PoS and DPoS are able to enlarge the request-satisfied ratio, probably due to the smaller wealth inequality. In other words, if agents have the similar amount of coin demand-supply request which mainly depends on the wealth (see Equation ), two of them could reach a prefect deal if there is a direct trade connection between these two agents. Under PoW consensus protocol, however, a rich agent has to deal with many relatively poorer agents to fulfill his/her coin request, leading to the low request-satisfied ratio. Therefore, we suggest that PoS and DPoS bring greater trade e iciency to the blockchain system. .
In sum, the consensus protocol is truly important to a blockchain system as it can significantly a ect the coin price index, request-satisfied ratio and Gini index. In particular, both PoS and DPoS consensus protocol yield relatively higher request-satisfied ratio and smaller Gini index; while PoW weakens the trade e iciency and enlarges the wealth inequality among agents, resulting in higher coin price index.

The impact of di erent trader network topologies .
When comparing the performance of di erent trader network topologies, we find that random network and small-world network produce alike results, mainly due to the similar node degree distribution listed in Table . In fact, it is somewhat unfair to the scale-free trade network because the number of average degree ( . ) is smaller than that ( . ) in random network and small-world network, because we have to maintain the power law degree distribution. Therefore, scale-free trade network has serious "connectivity inequality", which can explain the following four phenomena. .
The first di erence is the V-shape fluctuation of coin price index in random and small-world trade networks, which cannot be found in scale-free trade network. At the beginning of simulation, coin price drops because of the extra coin supply, i.e., coins are rewarded to selected miners. Consequently, herd agents try to sell their coins, which in turn decreases the coin price index. The price becomes stable or even starts to climb because of the game trades and miners who keep buying coins when many herd agents are selling. Therefore, it is not surprising that the standard deviation of coin price index is small in Table . However, the above balancing feedback loop will lead to the V-shape fluctuation of coin price index only if both herd and game agents can well engage in trade, which is relatively easy in random and small-world trade networks due to the high connectivity. On the other side, the connectivity inequality of scale-free trade network moderates the price fluctuation because the trade probability between herd and game agents is lower.
. The smaller price fluctuation could be a favorable feature of connectivity inequality, but the cost is the much smaller trade e iciency. As we can see from Table , the request-satisfied ratio in scale-free trade network is about -%, while it is -% (almost six-fold) in other two networks. This big di erence is caused not only by the distance between average node degree (10.09/4.27 = 2.36), but also by the connectivity inequality.
Although the high-degree node is connected with many neighbors, a deal can only be reached with his/her partial neighbors when the node has non-zero trade request.
. Due to the low trade e iciency, the third phenomenon is understandable: the Gini index in scale-free trade network is smaller than that in others. However, it is still worrying that the Gini index climbs in all combinations of consensus algorithm and trade network topology, indicating that the "winner-takes-all" situation could happen in many blockchain systems. .
The last finding is that in scale-free trade network, the performance di erence between PoS and DPoS is sharpened: DPoS has greater request-satisfied ratio and Gini index than PoS. Under DPoS consensus protocol, a miner's degree is considered for miner selection, as described by Equation . If a miner is the high-degree node, he/she will be likely to be selected again even if his/her stake is reset, resulting in the greater Gini index. Consequently, when this miner decides to buy or sell coins, the absolute coin request will be larger than that under PoS consensus protocol, and thus more coin supply or demand requests from his/her neighbors will be satisfied. .
In sum, the trade network topology can comprehensively a ect the performance of blockchain system. In particular, compared with random and small-world trade networks, the scale-free trade network has slight price fluctuation and small Gini index due to its much smaller request-satisfied ratio. In a scale-free trade network, the DPoS consensus protocol will obtain better trade e iciency at the cost of great wealth inequality.

The impact of di erent node degree distributions in random and small-world networks .
Since the performances of random and small-world networks are similar due to the almost identical range degrees, it becomes interesting to investigate the impact of di erent node degree distributions on system performance . Therefore, we randomly generate eight more networks, the node degree information of which is presented in Table . Four of new networks have smaller average node degree, while other four have larger average degree. Note that Rd and Sw are the current random and small-world networks in our model, serving as the baseline.
. Table and Figure report the system performance with di erent random and small-world networks. We first observe that the PoW consensus protocol can truly raise the coin price, increase Gini index, and lower the request-satisfied ratio. These results are consistent with the findings when analyzing the impact of di erent consensus protocols. However, when all other factors are fixed, the price change is seemingly not correlated with the average node degree of these two network types. In contrast, when the average node degree is increased, both request-satisfied ratio and the Gini index monotonously grow, indicating that higher network connectivity accelerates the flows of information and wealth. This finding can also be obtained from current economic globalization enpowered by information technology: the participants (traders, nations) are closely connected by the Internet; they share information and exchange values; although more deals have been made, the gap between the rich and the poor is enlarged. .
When investigating the performance di erence caused by trader network topology, we find that the requestsatisfied ratio is strongly a ected by the average node degree. Subplots in the second row of Figure demonstrate that the two curves under di erent consensus protocols cross only in the baseline cases because they have the same average node degree ( . ). Another finding is that random networks o en have same or slightly larger Gini index than small-world networks, possibly due to the greater upper bound and smaller lower bound of node degree, as listed in Table . Based on the analyses of di erent trader network topologies and node degree distributions, we hence may be able to draw a conclusion: connectivity inequality determines wealth inequality. .
In sum, this additional study on node degree distribution proves the findings observed from previous nine experiments. We also find that average node degree is positively associated with request-satisfied ratio and the Gini index in random and small-world trade networks. We conclude that connectivity inequality determines wealth inequality, and thus suggest that when designing a sustainable blockchain system, it is crucial to increase the connectivity among participants, by means of not only using better consensus protocols such as PoS or DPoS, but also incentivizing apathetic or newly-joined participants to link with others.

Findings corroboration .
Since the general findings above were obtained from our theoretical model, we attempted to confront them in this subsection. Note that it is extremely di icult to validating our model based on real data for the following two reasons. First, although the blockchain data is o en available, we cannot identify the network topology of real traders because of anonymized user information. Second, many model settings cannot be empirically determined at present due to the high cost of data collection, preventing us from reproducing the evolution of true blockchain systems. .
To corroborate our findings, the first way is to compare with previous studies. Tanaka-Yamawaki & Tokuoka ( ) investigated the relationship between m (number of steps), s (number of possible policies) and key performance indicators such as the number of winners in Minority Game. They found that when s was fixed, the system performances were similar under di erent m > 1, except m = 1. See Fig. and in the paper by Tanaka-Yamawaki & Tokuoka ( ) for details.
. Therefore, we conducted four additional experiments (m = 1, 3, 4, 5), together with the existing one (m = 2), to examine the impact of di erent m. Each experiment ran times to obtain the averaged performance, which is reported in Figure . The performance with random and small-world networks implies that when m = 1, both price index and request-satisfied ratio are less than those in other four cases, but the Gini index is greater . In other words, we have successfully reproduced the phenomenon observed by Tanaka-Yamawaki & Tokuoka ( ). Hence, our general findings are corroborated by previous studies. Figure : The averaged performance under di erent model settings of game traders' memory steps (m = 1, 2, 3, 4, 5; default value is ). .
The second approach is to compare with deducted models. Our model consists of three types of agents: noisy, herd, and game traders/miners, denoted by N, H, and G, respectively. We consider three cases. ( ) Case N.
Suppose that if our model only contains noisy agents, then the model performance can be viewed as a random walk because their decisions are made based on equal probabilities. ( ) Case N+H. Based on Case N, if we add herd agents who buy coins when price grows and sell coins when price drops, then these agents should enlarge the change of the model performance, because their behavior and system performance form a reinforcing loop which compound change in one direction with even more change. Therefore, we expect that the performance of this case should be very di erent with Case N. ( ) Case N+H+G. Game traders buy coins while others are selling and sell coins while others are buying. Using the language of system dynamics, game traders introduce a balancing loop which resists further increases in a given direction. Therefore, we expect that the performance of this case should be very di erent with Case N+H, and should be close to Case N.

.
Based on above analysis, we conducted two additional experiments (Case N, Case N+H), together with the existing one (Case N+H+G), to examine the impact of di erent agent types. Note that in all these experiments, the number of total agents is always for fair competition, and the ratio of traders and miners is always to for the same reason. Each experiment ran times to obtain the averaged performance, which is reported in Figure . It can be observed that almost all performance changes can be described by v-shaped or inverted vshaped curves. In other words, we have successfully reproduced the expected phenomenon: the performance of Case N+H+G should be very di erent with Case N+H, and should be similar to Case N. Hence, our general findings are corroborated by deducted models. Figure : The averaged performance with di erent model settings of agent types. In the tick labels on the x axis, the words N, H, G stands for the noisy, herd, game traders, respectively.

Conclusion
. In this paper, we tried to understand how di erent consensus protocols and trade network topologies a ect the performance of a blockchain system, which has not been studied in the literature yet. To simulate a coin-inside blockchain system, we proposed an agent-based model consisting of multiple trader agents, miner agents, and one system agent. Trader agents can be divided into three groups: noisy traders who make random decision on buying/selling/holding coins; herd traders whose decisions are influenced by the fluctuation of coin price index; game traders who buy coins while others are selling and sell coins while others are buying. The miner agents are special traders because some of them will be selected by the system agent to create blocks and get a certain number of coins as reward. The rule of miner selection is determined by the consensus protocols, and we proposed reasonable assumptions about the relationship between consensus protocol and miner selection probability. The change of coin price index is mainly a ected by the total supply and demand of coins in the system, but not all supply and demand requests will be satisfied due to the absence of central counter party. Therefore, agents can only trade with their neighbors in the trade network, resulting in low request satisfaction ratio which is also impacted by the trade network topology. .
We first conducted nine experiments in which PoW, PoS, DPoS consensus protocols and random, small-world, scale-free trade networks are implemented. Experimental results show that both consensus protocol and trade network topology can impact the performance of blockchain system. PoS and DPoS are generally better than PoW in terms of increasing trade e iciency and equalizing wealth. Besides, scale-free trade network is not favorable because its trade e iciency is quite low, which moderates the price fluctuation and wealth inequality. An additional study on node degree distribution proves the findings observed from previous experiments, and also reveals that connectivity inequality determines wealth inequality. .
Based on the above results, we suggest the following two managerial insights to blockchain practitioners. ( ) It is very important to design an appropriate consensus protocol for a blockchain system. The PoW consensus protocol is not recommended as its trade e iciency is low even it consumes enormous energy for computation. Moreover, PoW leads to higher wealth inequality which will harm the decentralization of blockchain systems. ( ) It is crucial to identify the trade network topology as it significantly a ects the trade e iciency of a blockchain system. The scale-free network topology should not be preferred due to its high connectivity inequality. Hence, the blockchain system designer or operator should attempt to increase the connectivity among participants by, e.g., incentivizing apathetic or newly-joined participants to link with others. .
We also suggest several future directions to researchers. First, some model settings and value assignment of some parameters can be validated based on empirical data if available. We consider to develop online and/or o line questionnaires for data collection and statistical analysis. Second, the agent's behavior can be improved. For example, the miners' behaviors are relatively simple because in reality they may need to make investment decisions, consider acting dishonestly, etc. Third, current model can be extended to investigate the impact of other factors on the performance of blockchain system, or be applied to a specific area such as blockchainbased game design. For example, it could be interesting to develop a better consensus protocol which allocates newly-created coins to miners adaptively for achieving some predefined objectives. This requires an in-depth investigation of the impact of parameter W t in Table . Finally, to test the robustness of our simulation results against the simulation horizon, we reran all the experiments with , time steps . Most of important results discussed above still held in most of time, except that DPoS in scale-free networks became highly uncertain due to the connection inequality. This suggests that it is very important for agent-based modelers to study longer (perhaps unrealistically longer) time frames, so that the robustness of simulation results can be confirmed (He et al. b).