This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Mechanism Design for Blockchain Order Books against Selfish Miners

Yunshu Liu and Lingjie Duan, Senior Member, IEEE111Y. Liu is with the School of Cybersecurity, Northwestern Polytechnical University, Xi’an 710129, China (email: liuyunshu93@gmail.com). L. Duan is with the Pillar of Engineering Systems and Design, Singapore University of Technology and Design, Singapore 487372 (email: lingjie_duan@sutd.edu.sg). This work is supported in part by the Ministry of Education, Singapore, under its Academic Research Fund Tier 2 Grant with Award no. MOE-T2EP20121-0001; in part by SUTD Kickstarter Initiative (SKI) Grant with no. SKI 2021_04_07; and in part by the Joint SMU-SUTD Grant with no. 22-LKCSB-SMU-053.
Abstract

In blockchain-based order book systems, buyers and sellers trade assets, while it is miners to match them and include their transactions in the blockchain. It is found that many miners behave selfishly and myopically, prioritizing transactions with high fees and ignoring many desirable matches that could enhance social welfare. Existing blockchain mechanisms fail to address this issue by overlooking miners’ selfish behaviors. To our best knowledge, this work presents the first analytical study to quantify and understand buyer and seller transaction fee choices and selfish miners’ transaction matching strategies, proving an infinitely large price of anarchy (PoA) for social welfare loss. To mitigate this, we propose an adjustable block size mechanism that is easy to implement without altering the existing decentralized protocols and still allows buyers and sellers to freely decide transaction fees and miners to selfishly match. The analysis is challenging, as pure strategy Nash equilibria do not always exist, requiring the analysis of many buyers’ or sellers’ interactive mixed-strategy distributions. Moreover, the system designer may even lack information about each buyer’s or seller’s bid/ask prices and trading quantities. Nevertheless, our mechanism achieves a well-bounded PoA, and under the homogeneous-quantity trading for non-fungible tokens (NFT), it attains a PoA of 1 with no social welfare loss. We implement our mechanism on a local instance of Ethereum to demonstrate the feasibility of our approach. Experiments based on the realistic dataset demonstrate that our mechanism achieves social optimum for homogeneous-quantity trading like NFT. It can enhance social welfare up to 3.7 times compared to the existing order book benchmarks for heterogeneous-quantity trading of Bitcoin tokens. It exhibits robustness against random variations in buyers and sellers.

I Introduction

I-A Motivations

Blockchain-based order books (BBOB) have garnered significant attention due to their ability to facilitate secure, decentralized transactions in various markets, including decentralized exchanges (DEXs) and non-fungible tokens (NFTs) [1]. The market value of BBOBs continues to rise, with a current market cap of $864 million in 2024 [2]. Within these systems, buyers aim to purchase assets at the lowest possible price, while sellers seek to sell at the highest price. Both parties set transaction fees to incentivize miners, who then decide which transactions to match and confirm on the blockchain.

Despite fast development, current BBOBs face significant challenges. Many existing protocols suffer from poor performance, where the executed trade price deviates from the expected price, leading to inefficient trades [3][4]. One of the key reasons for the current BBOB design’s poor performance is miners’ self-interested or myopic behavior. Miners may prioritize those transactions with higher fees, even if these result in lower social welfare, thereby misaligning individual incentives with the collective benefits of the system [5].

Addressing this issue requires research efforts in two areas. First, buyers and sellers continuously experience benefit loss and complain about the system’s poor performance caused by miners [6][7], yet our assessment of the potential loss is limited. It is crucial to assess the extent to which miners’ self-interested actions degrade system performance, which motivates the following key question:

Key Question 1

How much do miners’ self-interested actions worsen the BBOB system’s trading performance?

Answering Key Question 1 requires characterizing and understanding the strategic interactions between self-interested buyers, sellers, and miners. Our rigorous game-theoretical analysis reveals that miners’ self-interested or myopic actions can lead to arbitrarily large social welfare losses. With the understanding of this huge damage and its condition to happen, there is a strong need to design a mechanism mitigating the adverse effects of self-interested miner behavior. The mechanism should be practical and operate within existing blockchain protocols, e.g., Bitcoin Cash [8]. This leads us to ask the next key question:

Key Question 2

How to design an easy-to-implement mechanism to maximize the social welfare of the BBOB system?

The challenge for addressing Key Question 2 lies in not forcing buyers, sellers, and miners to adopt a completely new protocol or even mechanism. Therefore, we will turn to key BBOB parameters that can be controlled easily and adjusted flexibly by the system, focusing on block size design. By optimizing this parameter, we aim to create a practical and effective mechanism in enhancing social welfare.

Our work addresses the incentive issues in BBOB systems. Several existing studies focus on various user-related aspects within this area (e.g., [9, 10, 11, 12, 13, 14]). Daian et al. [9] analyzed the frontrunning issue among buyers and sellers in BBOB systems. Schnaubelt et al. [10] proposed a reinforcement learning method to optimize users’ order placements in BBOB systems. Hautsch et al. [11] examined arbitrage opportunities for users. Heimbach et al. [12] designed a mechanism to mitigate the frontrunning issue. Victor et al. [13] detected and quantified wash trading behavior in the system. Raheman et al. [14] designed an automated agent to collect revenue from the BBOB system. However, the existing literature on mechanism design in BBOB systems has not adequately considered miners’ incentives. Our work fills in this gap by analyzing the impact of miners’ incentives and proposing an incentive mechanism to mitigate these effects.

I-B Contributions

In this paper, we consider the strategic interaction among buyers, sellers, and miners within the system designer’s mechanism design framework. Specifically, the system designer first determines the block size to maximize social welfare. Subsequently, buyers and sellers decide their transaction fees. Finally, miners select transactions to match and include in the blockchain based on these fees.

As such, we need to tackle several intricate technical challenges in the BBOB system. We model the complex and coupled dynamic game-theoretical interactions among self-interested buyers, sellers, and miners. The analysis is further complicated by the non-existence of pure strategy Nash equilibria under certain conditions, requiring the analysis of many buyers’ or sellers’ interactive mixed-strategy distributions. What is worse, the mechanism design may lack buyers’ and sellers’ detailed trading information, making the problem quite challenging. Our mechanism must be practical, easy to implement, and compatible with existing blockchain protocols. These challenges highlight our research’s novelty and significant technical contributions to the field.

Our key results and contributions are summarized as follows:

  • First analytical work to curb selfish miners in BBOB system: Prior literature’s mechanisms (e.g., [9, 10, 11, 12, 13, 14]) do not adequately address this selfish miners’ created problem. To the best of our knowledge, this work presents the first analytical study to quantify the selfish behavior of miners and proactively design the simplest possible mechanism to mitigate the issue.

  • Infinitely large efficiency damage by selfish miners: Our dynamic game-theoretical analysis addresses the complex and coupled interactions among buyers, sellers, and miners. Our findings reveal that miners’ self-interested actions can cause the price of anarchy (PoA) to equal infinity, meaning arbitrarily low social welfare. This is because miners make poor transaction matches to maximize their fee collection.

  • Simple and effective mechanism via limiting block size: We propose an adjustable block size (ABS) mechanism that balances the need to reduce miners’ tendency to ignore desirable matches while maintaining high throughput. The mechanism design is challenging due to the non-existence of pure strategy Nash equilibrium, which results in buyers’ and sellers’ strategies being interactive mixed-strategy distributions. Moreover, the system designer may even lack information about each buyer’s or seller’s bid/ask prices and trading quantities. Nevertheless, our mechanism achieves asymptotically social optimum under homogeneous-quantity matching for NFT and provides a bounded approximation ratio under heterogeneous-quantity matching.

  • Performance evaluation and implementation: We implement the ABS mechanism on an Ethereum blockchain testbed, validating its practical applicability. Based on the testbed, we conduct extensive experiments based on the actual BBOB dataset. For homogeneous-quantity trading of NFT, our mechanism achieves social optimum. For heterogeneous-quantity trading of Bitcoin tokens, our mechanism enhances social welfare up to 3.7 times compared to the existing benchmark and achieves at least 60% of the social optimum. Moreover, we find that miners’ non-selfish behavior may help to enhance social welfare. Our mechanism also demonstrates robustness in scenarios with random variations in the numbers of buyers and sellers.

The rest of the paper is organized as follows. Section II introduces the system model. Sections III and IV analytically answer Key Questions 1 and 2, respectively. We evaluate the system performance in Section V and conclude this paper in Section VI.

II System Model and Problem Formulation

In this section, we describe the system model of the BBOB system to match buyers and sellers by miners. We first introduce the buyers, sellers, and miners’ decision models in Section II-A. We then formulate their dynamic game interaction in Section II-B.

II-A Decision models of Buyers, Sellers, and Miners in BBOB

Refer to caption

Figure 1: The blockchain-based order book to match buyer and seller by miners under the system designer’s initially designed mechanism.

We consider the BBOB system as illustrated in Fig. 1. Specifically, the system designer first determines the mechanism under the blockchain protocols for participants. Then, buyers and sellers decide on their transaction fees. Finally, miners select transactions to match and include in the blockchain.

Next, we will present the detailed model. Table I summarizes the key notations of this paper.

TABLE I: Key notations.
Notations Physical meaning
fkbuyf_{k}^{\rm buy} Buyer kk’s transaction fee decision
fnsellf_{n}^{\rm sell} Seller nn’s transaction fee decision
𝒳mt\mathcal{X}_{m}^{t} Miner mm’s transaction selection in round tt
xm,kntx_{m,kn}^{t} if miner mm matches buyer kk with seller nn
when mining block tt
AA Block size
𝒦(K)\mathcal{K}(K) Set (number) of buyers
bkb_{k} Buyer kk’s asset purchase proposal
b¯(b¯)\overline{b}(\underline{b}) Upper (lower) bound of asset purchase
and selling
RkR_{k} Buyer kk’s utility of unit asset purchase
𝒩(N)\mathcal{N}(N) Set (number) of sellers
qnq_{n} Seller nn’s asset selling proposal
CnC_{n} Seller nn’s cost of unit asset selling
(M)\mathcal{M}(M) Set (number) of miners
αm\alpha_{m} Mining power of miner mm
𝒯(T)\mathcal{T}(T) Set (number) of blocks
ϵ\epsilon Smallest unit of transaction fee
𝒬t\mathcal{Q}^{t} Transaction pool when mining block tt
dd Delay cost per block
uku_{k} Buyer kk’s payoff
vnv_{n} Seller nn’s payoff
wmtw_{m}^{t} Miner mm’s payoff when mining block tt
swsw Social welfare
𝟙\mathds{1} Indicator function

II-A1 System Designer’s Mechanism Design

The system designer proposes a mechanism to maximize social welfare, aiming for the most beneficial trading outcome for the group. Typical mechanism design strategies include block size design [15], transaction fee design [16], and consensus protocol design [17]. The ideal mechanism design should be easy to implement and compatible with the current system protocol, possibly the simplest as in [15]. Our mechanism design focuses on adjusting the block size, as detailed later in Section IV.

II-A2 Buyers’ and Sellers’ Fee Decision

We consider there are KK buyers and NN sellers, denoted by the sets 𝒦={1,2,,K}\mathcal{K}=\{1,2,\cdots,K\} and 𝒩={1,2,,N}\mathcal{N}=\{1,2,\cdots,N\}, respectively. Each buyer k𝒦k\in\mathcal{K} generates a transaction aiming to purchase bkb_{k} units of asset (such as cryptocurrency and non-fungible tokens (NFTs)) on the blockchain, while each seller n𝒩n\in\mathcal{N} proposes a transaction to sell qnq_{n} units of asset, where bk,qn[b¯,b¯]b_{k},q_{n}\in[\underline{b},\overline{b}] are continuous. If buyer kk is matched with seller nn, the buyer receives a normalized utility of Rk[0,1]R_{k}\in[0,1] per unit of asset, characterizing his valuation or satisfaction level in obtaining the asset, and seller nn incurs a normalized cost of Cn[0,1]C_{n}\in[0,1] per unit of asset for selling the asset.

To facilitate these transactions, each buyer kk and seller nn decides on his fee payments fkbuy0f_{k}^{\rm buy}\geq 0 and fnsell0f_{n}^{\rm sell}\geq 0, respectively. The smallest fee unit is ϵ\epsilon (e.g., one satoshi in Bitcoin). The generated transactions enter the transaction pool as in mid of Fig. 1, which is pending for miners to match and include in the blockchain. Due to the limited number of transactions each block can contain, some transactions remain in the pending transaction pool, leading to a delay until they can be processed in subsequent blocks. Each buyer and seller must balance fee payment and transaction delay.222In the blockchain system, transactions typically experience some delay ranging from several minutes to hours [18]. As miners prioritize high-fee transactions [19], a buyer/seller generally uses the fee recommendation software to set the transaction fee, where he enters his delay requirement, and the software recommends the corresponding transaction fee [20]. Such a decision process is how a buyer/seller tradeoffs between transaction fee and delay.

II-A3 Miners’ Transaction Selection

We analyze a total of TT blocks, denoted as the set 𝒯{1,,T}\mathcal{T}\triangleq\{1,\cdots,T\}. There are MM miners in the system, represented by the set ={1,2,,M}\mathcal{M}=\{1,2,\cdots,M\}. When mining block t𝒯t\in\mathcal{T}, each miner mm\in\mathcal{M} selects a set 𝒳mt\mathcal{X}_{m}^{t} of buyer’s and seller’s transactions to match and include in the blockchain, to maximize his fee revenue. The selection satisfies 𝒳mt𝒬t\mathcal{X}_{m}^{t}\subseteq\mathcal{Q}^{t}, where 𝒬t\mathcal{Q}^{t} is the transaction set pending inclusion in the blockchain with initial 𝒬1=𝒦𝒩\mathcal{Q}^{1}=\mathcal{K}\cup\mathcal{N}.

The block size AA allows each block to hold up to AA pairs of buyer’s and seller’s transactions. The block size constraint is formulated as follows:

|𝒳mt|2A.|\mathcal{X}_{m}^{t}|\leq 2A. (1)

We assume the block size constraint is an even number without loss of generality. If the constraint is |𝒳mt|ϕ|\mathcal{X}_{m}^{t}|\leq\phi, where ϕ>0\phi>0 is odd, it is effectively |𝒳mt|ϕ1|\mathcal{X}_{m}^{t}|\leq\phi-1, as the remaining unpaired transaction would violate the matching constraints in (3)-(4).

Matching constraint: We respectively denote 𝒳mt,buy\mathcal{X}_{m}^{t,\text{buy}} and 𝒳mt,sell\mathcal{X}_{m}^{t,\text{sell}} as miner mm’s selected buyer and seller sets, where 𝒳mt=𝒳mt,buy𝒳mt,sell\mathcal{X}_{m}^{t}=\mathcal{X}_{m}^{t,\text{buy}}\cup\mathcal{X}_{m}^{t,\text{sell}}. We use the index {xm,knt|k𝒳mt,buy,n𝒳mt,sell}\{x_{m,kn}^{t}|k\in\mathcal{X}_{m}^{t,\text{buy}},n\in\mathcal{X}_{m}^{t,\text{sell}}\} to denote whether miner mm matches buyer kk with seller nn or not when mining block tt:

xm,knt={1,if miner m matches buyer k with seller nwhen mining block t,0,otherwise.x_{m,kn}^{t}=\begin{cases}1,&\text{if miner $m$ matches buyer $k$ with seller $n$}\\ &\text{when mining block $t$,}\\ 0,&\text{otherwise.}\end{cases} (2)

Within miner mm’s selection, each buyer’s transaction must be matched with one seller’s in a typical setting (e.g., [21][22]), ensuring the completion of the matching process. The matching conditions are formulated as:

n𝒳mt,sellxm,knt=1,k𝒳mt,buy,\displaystyle\sum_{n\in\mathcal{X}_{m}^{t,\text{sell}}}x_{m,kn}^{t}=1,\quad\forall k\in\mathcal{X}_{m}^{t,\text{buy}}, (3)
k𝒳mt,buyxm,knt=1,n𝒳mt,sell.\displaystyle\sum_{k\in\mathcal{X}_{m}^{t,\text{buy}}}x_{m,kn}^{t}=1,\quad\forall n\in\mathcal{X}_{m}^{t,\text{sell}}. (4)

Moreover, the buyer’s utility must be higher than the seller’s cost for matching profitable transactions. This constraint is formulated as:

RkCnif xm,knt=1,k𝒳mt,buy.R_{k}\geq C_{n}\quad\text{if }x_{m,kn}^{t}=1,\quad\forall k\in\mathcal{X}_{m}^{t,\text{buy}}. (5)

As in [23][24], we denote the probability of miner mm mining a block as αm\alpha_{m}. For example, in proof-of-work systems, this probability is proportional to the miner’s computational power relative to the total. In proof-of-stake systems, it reflects the amount of cryptocurrency the miner has staked. Therefore, each miner’s probability of mining a block varies due to their computational or staking power differences.

Miners’ strategies follow the following principles based on existing blockchain systems in practice.

  • Myopic selection: According to [25] and [26], miners myopically select transactions to maximize their payoff for each block, prioritizing immediate transaction fee rewards. The rationale behind the myopic strategy is as follows: To benefit from a non-myopic strategy, a miner needs to mine at least two consecutive blocks. However, in typical blockchain systems like Bitcoin, each miner’s mining power generally satisfies αm0.2\alpha_{m}\leq 0.2 [27]. Consequently, the probability of a miner successfully mining two consecutive blocks, αm20.04\alpha_{m}^{2}\leq 0.04, is very small. Thus, they tend to be myopic in matching seller and buyer pairs.

  • Tie breaking: When each miner mm faces two matching choices with the same total fee, he randomly selects one option. Moreover, miner mm rejects zero-fee transactions, as confirmed by blockchain protocols [16].

Pending transaction set update: After the miners’ selection, one miner successfully generates a block (e.g., by solving a puzzle in a proof-of-work system or by being selected based on their stake in a proof-of-stake system). The selected transactions are then appended to the blockchain and removed from the pending transaction set 𝒬t\mathcal{Q}^{t}. This update process to the next block t+1t+1 is formulated as follows:

𝒬t+1(𝓧)={𝒬t𝒳1t,with probability (w.p.) α1,𝒬t𝒳Mt,w.p. αM,\mathcal{Q}^{t+1}(\boldsymbol{\mathcal{X}})=\begin{cases}\mathcal{Q}^{t}\setminus\mathcal{X}_{1}^{t},&\text{with probability (w.p.) }\alpha_{1},\\ \cdots\\ \mathcal{Q}^{t}\setminus\mathcal{X}_{M}^{t},&\text{w.p. }\alpha_{M},\end{cases} (6)

where 𝓧=(𝒳mt,m,t𝒯)\boldsymbol{\mathcal{X}}=(\mathcal{X}_{m}^{t},\forall m\in\mathcal{M},\forall t\in\mathcal{T}) is a function of all miners’ strategies over time.

Next, we formulate the dynamic game-theoretical interactions among buyers, sellers, and miners.

II-B Dynamic Game Formulation among Buyers, Sellers and Miners

This subsection models the dynamic interactions among miners, buyers, and sellers as a two-stage game. The buyers and sellers decide the transaction fees in Stage I, and miners select and match buyers’ and sellers’ transactions in Stage II. We will first introduce the payoffs for miners, buyers, and sellers. Then we introduce the dynamic game formulation.

II-B1 Each Miner mm’s Payoff

When miner mm mines block tt, he receives transaction fees from his selected transactions as the payoff. Otherwise, he receives nothing. We denote 𝒳mt,buy\mathcal{X}_{m}^{t,\text{buy}} and 𝒳mt,sell\mathcal{X}_{m}^{t,\text{sell}} as miner mm’s selected buying and sell transaction sets, where 𝒳mt=𝒳mt,buy𝒳mt,sell\mathcal{X}_{m}^{t}=\mathcal{X}_{m}^{t,\text{buy}}\cup\mathcal{X}_{m}^{t,\text{sell}}. Miner mm’s expected payoff during the mining of block tt is formulated as:

wmt(𝒳mt,A,𝒇)=αm(k𝒳mt,buyfkbuy+n𝒳mt,sellfnsell),w_{m}^{t}(\mathcal{X}_{m}^{t},A,\boldsymbol{f})=\alpha_{m}(\sum_{k\in\mathcal{X}_{m}^{t,\text{buy}}}f_{k}^{\rm buy}+\sum_{n\in\mathcal{X}_{m}^{t,\text{sell}}}f_{n}^{\rm sell}), (7)

where 𝒇=(fkbuy,fnsell,k𝒦,n𝒩)\boldsymbol{f}=(f_{k}^{\rm buy},f_{n}^{\rm sell},\forall k\in\mathcal{K},\forall n\in\mathcal{N}) denotes all buyers’ and sellers’ fee decisions. Note that the fee does not vary based on the quantity of the matched order (e.g., in Ethereum, the fee for a transaction is determined by its gas consumption, which is a measure of the computational resources required to process the transaction, and the gas price, which is set by the user).

II-B2 Each Buyer kk’s Payoff

Each buyer kk’s payoff function comprises matching surplus and delay cost.

When buyer kk is matched with seller nn, the trading quantity is the minimum of purchasing quantity bkb_{k} and selling quantity qnq_{n}, denoted as min{bk,qn}\min\{b_{k},q_{n}\}, which follows the typical setting for reduce-only orders [28]. Buyer kk receives a utility of RkR_{k} and seller nn incurs a cost of CnC_{n} per unit of the asset. Such a linear utility/cost model is widely used in cryptocurrency trading settings [29], as each unit of cryptocurrency has a uniform value. To be fair, the buyer pays the widely-used mid price (e.g., [30, 31, 32]) to the seller, which is Rk+Cn2\frac{R_{k}+C_{n}}{2}. Thus, buyer kk’s surplus from matching with seller nn is:

βknbuy=min{bk,qn}(RkRk+Cn2).\beta_{kn}^{\rm buy}=\min\{b_{k},q_{n}\}\big{(}R_{k}-\frac{R_{k}+C_{n}}{2}\big{)}. (8)

When miner mm matches buyer kk with seller nn in mining round tt (i.e., xm,knt=1x_{m,kn}^{t}=1) and successfully mines a block (w.p., αm\alpha_{m}), buyer kk receives the surplus βknbuy\beta_{kn}^{\rm buy}. Additionally, buyer kk pays a fee fkbuyf_{k}^{\rm buy} to miner mm. Therefore, the total matching surplus for buyer kk is:

ukSur(𝒇,𝓧)=t𝒯mαmn𝒳mt,sellxm,knt(βknbuyfkbuy).u_{k}^{\rm Sur}(\boldsymbol{f},\boldsymbol{\mathcal{X}})=\sum_{t\in\mathcal{T}}\sum_{m\in\mathcal{M}}\alpha_{m}\sum_{n\in\mathcal{X}_{m}^{t,\text{sell}}}x_{m,kn}^{t}\big{(}\beta_{kn}^{\rm buy}-f_{k}^{\rm buy}\big{)}. (9)

When buyer kk’s transaction is included in block lkbuy1l_{k}^{\rm buy}\geq 1, he bears the delay cost of (lkbuy1)d(l_{k}^{\rm buy}-1)d, where d0d\geq 0 is the delay cost per block. Buyer kk’s delay cost is

ukDelay(𝓧)=(lkbuy(𝓧)1)d,u_{k}^{\rm Delay}(\boldsymbol{\mathcal{X}})=\big{(}l_{k}^{\rm buy}(\boldsymbol{\mathcal{X}})-1\big{)}d, (10)

where lkbuyl_{k}^{\rm buy} is a function of all miners’ strategies over time 𝓧\boldsymbol{\mathcal{X}}.

To sum up, each buyer kk’s payoff function is formulated as follows:

uk(𝒇,𝓧)=ukSur(𝒇,𝓧)ukDelay(𝓧).u_{k}(\boldsymbol{f},\boldsymbol{\mathcal{X}})=u_{k}^{\rm Sur}(\boldsymbol{f},\boldsymbol{\mathcal{X}})-u_{k}^{\rm Delay}(\boldsymbol{\mathcal{X}}). (11)

II-B3 Each Seller nn’s Payoff

Each seller nn’s payoff function also comprises matching surplus and delay cost.

When buyer kk is matched with seller nn, seller nn collects the price payment from buyer kk. Seller nn’s surplus from matching with buyer nn is:

βnksell=min{bk,qn}(Rk+Cn2Cn).\beta_{nk}^{\rm sell}=\min\{b_{k},q_{n}\}\big{(}\frac{R_{k}+C_{n}}{2}-C_{n}\big{)}. (12)

The total matching surplus for seller nn is:

vnSur(𝒇,𝓧)=t𝒯mαmk𝒳mt,buyxm,knt(βnksellfnsell).v_{n}^{\rm Sur}(\boldsymbol{f},\boldsymbol{\mathcal{X}})=\sum_{t\in\mathcal{T}}\sum_{m\in\mathcal{M}}\alpha_{m}\sum_{k\in\mathcal{X}_{m}^{t,\text{buy}}}x_{m,kn}^{t}\big{(}\beta_{nk}^{\rm sell}-f_{n}^{\rm sell}\big{)}. (13)

When seller nn’s transaction is recorded in block lnsell1l_{n}^{\rm sell}\geq 1, he bears the delay cost of:

vnDelay(𝓧)=(lnsell(𝓧)1)d.v_{n}^{\rm Delay}(\boldsymbol{\mathcal{X}})=\big{(}l_{n}^{\rm sell}(\boldsymbol{\mathcal{X}})-1\big{)}d. (14)

To sum up, each seller nn’s payoff function is formulated as follows:

vn(𝒇,𝓧)=vnSur(𝒇,𝓧)vnDelay(𝓧).v_{n}(\boldsymbol{f},\boldsymbol{\mathcal{X}})=v_{n}^{\rm Sur}(\boldsymbol{f},\boldsymbol{\mathcal{X}})-v_{n}^{\rm Delay}(\boldsymbol{\mathcal{X}}). (15)

Based on the payoffs, we model the strategic interactions among the buyers, sellers, and miners as a two-stage game.

II-B4 Stage II: Miner’s Transaction Selection

During the mining of block t𝒯t\in\mathcal{T},333We assume a typical scenario that Tmin{N,K}/AT\geq\min\{N,K\}/A, ensuring that all transactions can be recorded on the blockchain if miners choose to do so as in [24][33][34]. each miner mm selects the transaction set 𝒳mt\mathcal{X}_{m}^{t} to maximize his payoff as follows:

max\displaystyle\max wmt(𝒳mt,A,𝒇) in (7)\displaystyle\hskip 2.84526ptw_{m}^{t}(\mathcal{X}_{m}^{t},A,\boldsymbol{f})\text{ in }(\ref{Miner:payoff}) (16)
s.t. (1) and (3)(5),\displaystyle\hskip 2.84526pt(\ref{block_size_con})\text{ and }(\ref{match_con1})-(\ref{match_con3}),
var. 𝒳mt𝒬t.\displaystyle\hskip 2.84526pt\mathcal{X}_{m}^{t}\subseteq\mathcal{Q}^{t}.

In problem (16), each miner myopically selects transactions from the pending transaction pool to maximize the fees he can earn. Note that this objective differs from centralized matching, which generally aims to maximize social welfare. This divergence is a key reason BBOB may result in lower social welfare, which will be further analyzed in the next section.

II-B5 Stage I: Buyers’ and Sellers’ Fee Setting

We formulate buyers’ and sellers’ fee setting as a non-cooperative game by foreseeing the miners’ myopic behavior 𝓧\boldsymbol{\mathcal{X}}, where all buyers and seller set their transaction fees simultaneously to maximize their individual payoffs.

Game 1 (Stage I: Transaction Fee Decisions Game)

In Stage I, the Fee Setting Game is a tuple Γ=(,,𝐖)\Gamma=(\mathcal{L},\mathcal{F},\boldsymbol{W}) defined by:

  • Players: The set of buyers and sellers =𝒦𝒩\mathcal{L}=\mathcal{K}\cup\mathcal{N}.

  • Strategies: Each buyer k𝒦k\in\mathcal{K} and seller n𝒩n\in\mathcal{N} decides on his fee payment fkbuykbuy{fkbuyfkbuy0}f_{k}^{\rm buy}\in\mathcal{F}_{k}^{\rm buy}\triangleq\{f_{k}^{\rm buy}\mid f_{k}^{\rm buy}\geq 0\} and fnsellnsell{fnsellfnsell0}f_{n}^{\rm sell}\in\mathcal{F}_{n}^{\rm sell}\triangleq\{f_{n}^{\rm sell}\mid f_{n}^{\rm sell}\geq 0\}, respectively. The set of feasible strategy profiles is =(k𝒦×kbuy)×(n𝒩×nsell)\mathcal{F}=(\prod_{k\in\mathcal{K}}\times\mathcal{F}_{k}^{\rm buy})\times(\prod_{n\in\mathcal{N}}\times\mathcal{F}_{n}^{\rm sell}).

  • Payoffs: The vector 𝑾=(uk,vn,k𝒦,n𝒩)\boldsymbol{W}=(u_{k},v_{n},\forall k\in\mathcal{K},\forall n\in\mathcal{N}) contains all buyers’ and sellers’ payoffs as defined in (11) and (15), respectively.

In Game 1, each buyer or seller balances the fee payment with matching surplus and delay. By paying a higher fee, he is more likely to be matched with other higher-fee transactions and experience a lower delay. The analysis of Game 1 is challenging because a pure strategy Nash equilibrium does not always exist, while buyers and sellers interact to decide their mixed-strategy distributions.

For modeling simplicity, we first assume that buying utilities and quantities, as well as selling costs and quantities, are static and publicly available information. Market participants can estimate these values for each participant by analyzing public historical transaction data. In Section IV-B, we will relax this assumption by considering these values as unknown and following general distributions.

II-B6 PoA Definition

We use the PoA to evaluate the performance of the BBOB system, defined as the ratio between the social optimum and the worst social welfare under the equilibrium of the BBOB system. This measure quantifies the maximal efficiency loss due to the self-interested behaviors of all participants, providing a quantitative answer to Key Questions 1 and 2 without and with our mechanism, respectively.

Formally, the social welfare is defined as the sum of all buyers’, sellers’, and miners’ payoffs:

sw(𝒇,𝓧,A)=k𝒦uk(𝒇,𝓧)+n𝒩vn(𝒇,𝓧)+t𝒯mwmt(𝒳mt,A,𝒇).sw(\boldsymbol{f},\boldsymbol{\mathcal{X}},A)=\sum_{k\in\mathcal{K}}u_{k}(\boldsymbol{f},\boldsymbol{\mathcal{X}})+\sum_{n\in\mathcal{N}}v_{n}(\boldsymbol{f},\boldsymbol{\mathcal{X}})+\sum_{t\in\mathcal{T}}\sum_{m\in\mathcal{M}}w_{m}^{t}(\mathcal{X}_{m}^{t},A,\boldsymbol{f}). (17)

The social optimum represents the maximum achievable social welfare when the system designer has full control over the decisions of buyers, sellers, and miners, and is expressed as:

swoptmax\displaystyle sw^{\rm opt}\triangleq\max sw(𝒇,𝓧,A)\displaystyle\hskip 2.84526ptsw(\boldsymbol{f},\boldsymbol{\mathcal{X}},A) (18)
var. 𝒇,𝓧,A+,\displaystyle\hskip 2.84526pt\boldsymbol{f},\boldsymbol{\mathcal{X}},A\in\mathbb{Z}^{+},

where +\mathbb{Z}^{+} represents the set of positive integers. PoA is defined as:

PoA=maxA,d,𝑹,𝑪,𝒃,𝒒swoptsw(𝒇NE,𝓧,A),\text{PoA}=\max\limits_{A,d,\boldsymbol{R},\boldsymbol{C},\boldsymbol{b},\boldsymbol{q}}\frac{sw^{\rm opt}}{sw(\boldsymbol{f}^{\rm NE},\boldsymbol{\mathcal{X}}^{*},A)}, (19)

where 𝒇NE\boldsymbol{f}^{\rm NE} and 𝓧\boldsymbol{\mathcal{X}}^{*} denotes the equilibrium strategies of buyers, sellers, and miners, which will be derived in the next section. As the BBOB system cannot control the decisions of buyers, sellers, and miners, the social welfare at equilibrium is lower than the social optimum, and the PoA is always greater than 1.

III Game Theoretic Analysis for Poor PoA

In this section, we analyze how miners’ self-interested actions negatively affect the BBOB system. We will use the backward induction to derive the equilibrium of Stages II and I in Sections III-A and Section III-B, and then analyze the system PoA in Section III-C.

III-A Stage II: Miners’ Selfish Transaction Selection

In this subsection, we solve problem (16) to derive miners’ optimal strategies.

When mining block tt, we denote that there are KtK^{t} buying transactions and NtN^{t} selling transactions within the pending transaction set 𝒬t\mathcal{Q}^{t}. Without loss of generality, we arrange the transactions in decreasing order of fees: f1tbuy>f2tbuy>>fKtbuyf_{1^{t}}^{\rm buy}>f_{2^{t}}^{\rm buy}>\cdots>f_{K^{t}}^{\rm buy} and f1tsell>f2tsell>>fNtsellf_{1^{t}}^{\rm sell}>f_{2^{t}}^{\rm sell}>\cdots>f_{N^{t}}^{\rm sell}. We define the set of top ii fee buying and selling transactions as 𝒬t(i)\mathcal{Q}^{t}(i):

𝒬t(i)𝒬t,buy(i)𝒬t,sell(i),\displaystyle\mathcal{Q}^{t}(i)\triangleq\mathcal{Q}^{t,\text{buy}}(i)\cup\mathcal{Q}^{t,\text{sell}}(i), (20)
𝒬t,buy(i){1t,2t,,min{it,Kt}},\displaystyle\mathcal{Q}^{t,\text{buy}}(i)\triangleq\{1^{t},2^{t},\cdots,\min\{i^{t},K^{t}\}\}, (21)
𝒬t,sell(i){1t,2t,,min{it,Nt}}.\displaystyle\mathcal{Q}^{t,\text{sell}}(i)\triangleq\{1^{t},2^{t},\cdots,\min\{i^{t},N^{t}\}\}. (22)

Theorem 1 summarizes the optimal strategy for miners.

Theorem 1 (Miner’s Optimal Strategy in Stage II)

During mining block tt, miner mm’s optimal strategy is to choose the top iti^{t*} fee buying and selling transactions in set:

𝒳mt=𝒬t(it),\mathcal{X}_{m}^{t*}=\mathcal{Q}^{t}(i^{t*}), (23)

where

it=argmaxitmin{A,Kt,Nt},𝒳mt=𝒬t(it) satisfying (3)(5)(j=1itfjbuy+j=1itfjsell).i^{t*}=\operatorname*{\arg\max}_{\begin{subarray}{c}i^{t}\leq\min\{A,K^{t},N^{t}\},\\ \mathcal{X}_{m}^{t}=\mathcal{Q}^{t}(i^{t})\emph{ satisfying }(\ref{match_con1})-(\ref{match_con3})\end{subarray}}(\sum_{j=1}^{i^{t}}f_{j}^{\rm buy}+\sum_{j=1}^{i^{t}}f_{j}^{\rm sell}). (24)

The proof of propositions and theorems is in Section VII.

Despite having different probabilities of mining a block, each miner selects all the highest-fee transactions that can be matched to maximize his fee revenue. The BOBB protocol operates in the way that there is no direct competition among miners to lower the fee choice threshold, as the mining probability αm\alpha_{m} is a linear factor of fee revenue in (7).

III-B Stage I: Buyers’ and Sellers’ Fee Decision Game

In this subsection, we solve the buyers’ and sellers’ equilibrium strategies in Game 1 by taking the miners’ payoff-maximizing strategy in (23) into account.

We first define the pure strategy Nash equilibrium (PSNE). At the PSNE, no buyer or seller can increase his payoff by unilaterally changing his deterministic strategy.

Definition 1 (PSNE)

A strategy profile 𝐟NE=(fkbuy,NE,fnsell,NE,k𝒦,n𝒩)\boldsymbol{f}^{\rm NE}=(f_{k}^{\rm buy,NE},f_{n}^{\rm sell,NE},\forall k\in\mathcal{K},\forall n\in\mathcal{N}) constitutes a pure strategy Nash equilibrium of Game 1 in Stage I if

uk(fkbuy,NE,𝒇kNE,𝓧)uk(fkbuy,𝒇kNE,𝓧),\displaystyle u_{k}(f_{k}^{\rm buy,NE},\boldsymbol{f}_{-k}^{\rm NE},\boldsymbol{\mathcal{X}}^{*})\geq u_{k}(f_{k}^{\rm buy},\boldsymbol{f}_{-k}^{\rm NE},\boldsymbol{\mathcal{X}}^{*}),
fksell0,k𝒦,\displaystyle\hskip 142.26378pt\forall f_{k}^{\rm sell}\geq 0,k\in\mathcal{K}, (25)
vn(fnsell,NE,𝒇nNE,𝓧)vn(fnsell,𝒇nNE,𝓧),\displaystyle v_{n}(f_{n}^{\rm sell,NE},\boldsymbol{f}_{-n}^{\rm NE},\boldsymbol{\mathcal{X}}^{*})\geq v_{n}(f_{n}^{\rm sell},\boldsymbol{f}_{-n}^{\rm NE},\boldsymbol{\mathcal{X}}^{*}),
fnsell0,n𝒩,\displaystyle\hskip 142.26378pt\forall f_{n}^{\rm sell}\geq 0,n\in\mathcal{N}, (26)

where 𝐟kNE=(fjbuy,NE,fnsell,NE,j𝒦{k},n𝒩)\boldsymbol{f}_{-k}^{\rm NE}=(f_{j}^{\rm buy,NE},f_{n}^{\rm sell,NE},\forall j\in\mathcal{K}\setminus\{k\},\forall n\in\mathcal{N}) and 𝐟nNE=(fkbuy,NE,fjsell,NE,k𝒦,j𝒩{n})\boldsymbol{f}_{-n}^{\rm NE}=(f_{k}^{\rm buy,NE},f_{j}^{\rm sell,NE},\forall k\in\mathcal{K},\forall j\in\mathcal{N}\setminus\{n\}) denote the equilibrium strategies of all buyers and sellers other than buyer kk or seller nn, respectively.

Without loss of generality, we arrange the buying utilities in decreasing order R1>R2>>RKR_{1}>R_{2}>\cdots>R_{K} and the selling costs in increasing order C1<C2<<CNC_{1}<C_{2}<\cdots<C_{N}. We assume R1>C1R_{1}>C_{1} to avoid the trivial situation where no transactions are matched. We then define the threshold AthA_{th} to help establish condition of PSNE:

Ath{i,if RiCi and Ri+1<Ci+1,min{K,N},otherwise.A_{th}\triangleq\begin{cases}i,&\text{if $R_{i}\geq C_{i}$ and $R_{i+1}<C_{i+1}$,}\\ \min\{K,N\},&\text{otherwise.}\end{cases} (27)

Proposition 1 summarizes the PSNE in Stage I.

Proposition 1 (Buyers’ and Sellers’ PSNE in Stage I)

The buyers’ and sellers’ PSNE (fkbuy,NE,fnsell,NE,(f_{k}^{\rm buy,NE},f_{n}^{\rm sell,NE}, k𝒦,n𝒩)\forall k\in\mathcal{K},\forall n\in\mathcal{N}) is as follows:

  1. 1.

    If A<AthA<A_{th}, then there does not exist a PSNE in Stage I.

  2. 2.

    If AAthA\geq A_{th}, then fkbuy,NEf_{k}^{\rm buy,NE} and fnsell,NEf_{n}^{\rm sell,NE} are:

    fkbuy,NE\displaystyle f_{k}^{\rm buy,NE} ={σthbuy(Ath,A)+ϵ,if kmin{A,N}, (28a)σthbuy(Ath,A),if k>min{A,N}, (28b)\displaystyle=\begin{cases}\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon,&\text{if $k\leq\min\{A,N\}$,}\emph{ (28a)}\\ \sigma_{th}^{\rm buy}(A_{th},A),&\text{if $k>\min\{A,N\}$,}\emph{ (28b)}\end{cases}
    fnsell,NE\displaystyle f_{n}^{\rm sell,NE} ={σthsell(Ath,A)+ϵ,if nmin{A,K}, (29a)σthsell(Ath,A),if n>min{A,K}, (29b)\displaystyle=\begin{cases}\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon,&\text{if $n\leq\min\{A,K\}$,}\hskip 2.84526pt\emph{ (29a)}\\ \sigma_{th}^{\rm sell}(A_{th},A),&\text{if $n>\min\{A,K\}$,}\hskip 2.84526pt\emph{ (29b)}\end{cases}
    σthbuy(Ath,A)\displaystyle\sigma_{th}^{\rm buy}(A_{th},A) ={max{n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)min{bmin{AthAA,N}+1,qn}(Rmin{AthAA,N}+1Cn)2n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)(min{AthAA,N}+1AA1)d,0},if min{AthAA,N}<K and Rmin{AthAA,N}+1C1,0,otherwise.\displaystyle=\begin{cases}\max\Big{\{}\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathds{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})\min\{b_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1},q_{n}\}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathds{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})}\\ -(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}{A}\rceil A-1)d,0\Big{\}},\hskip 31.29802pt\text{if $\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}<K$ and $R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{1}$,}\\ 0,\hskip 167.87125pt\text{otherwise.}\end{cases} (30)
    σthsell(Ath,A)\displaystyle\sigma_{th}^{\rm sell}(A_{th},A) ={max{k=1min{AthAA,K}𝟙(RkCmin{AthAA,K}+1)min{bk,qmin{AthAA,K}+1}(RkCmin{AthAA,K}+1)2k=1min{AthAA,K}𝟙(RkCmin{AthAA,K}+1)(min{AthAA,K}+1AA1)d,0},if min{AthAA,K}<N and Cmin{AthAA,K}+1R1,0,otherwise.\displaystyle=\begin{cases}\max\Big{\{}\frac{\sum_{k=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}}\mathds{1}(R_{k}\geq C_{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1})\min\{b_{k},q_{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1}\}(R_{k}-C_{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1})}{2\sum_{k=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}}\mathds{1}(R_{k}\geq C_{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1})}\\ -(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1}{A}\rceil A-1)d,0\Big{\}},\hskip 31.29802pt\text{if $\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}<N$ and $C_{\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}+1}\leq R_{1}$,}\\ 0,\hskip 167.87125pt\text{otherwise.}\end{cases} (31)

     

    where σthbuy\sigma_{th}^{\rm buy} and σthsell\sigma_{th}^{\rm sell} are in (30) and (31).

Here we elaborate the insights of Proposition 1:

  1. 1.

    If A<AthA<A_{th}: The block size is small, requiring multiple blocks to record all matched transactions. We illustrate the absence of a PSNE with a two-buyer-two-seller example and a block size of 1. When one buyer (or seller) pays a fixed fee, the other can take advantage by either paying an ϵ\epsilon higher fee to reduce delay costs or paying the minimum fee of ϵ\epsilon to minimize the payment. Consequently, the first buyer (or seller) will also respond by paying an ϵ\epsilon higher fee or paying ϵ\epsilon. This back-and-forth strategy implies no PSNE.

  2. 2.

    If AAthA\geq A_{th}: The block size is large enough that any leftover transactions cannot be matched after the first block. At PSNE, low-utility buyers in (28b) (or high-cost sellers in (29b)) pay the maximum fee they can afford to get matched, resulting in zero transaction benefit, but their transactions remain unmatched as others pay higher fees. Meanwhile, high-utility buyers in (28a) (or low-cost sellers in (29a)) pay a fee ϵ\epsilon higher than the low-utility buyers (or high-cost sellers), ensuring their transactions get matched.

To analyze buyers’ and sellers’ equilibrium strategies when A<AthA<A_{th}, we must refer to the mixed strategy Nash equilibrium (MSNE), where each buyer’s or seller’s fees follow a randomized distribution function. This makes the analysis challenging, as they interact to decide their mixed-strategy strategy functions against each other. Nevertheless, we are able to derive MSNE utilizing its property: within the support of the fee distribution, each buyer or seller receives the same expected payoff regardless of his specific fee choice within that range.

Definition 2 (MSNE)

A vector of probability measure (μkbuy,NE(fkbuy),μnsell,NE(fksell),k𝒦,(\mu_{k}^{\rm buy,NE}(f_{k}^{\rm buy}),\mu_{n}^{\rm sell,NE}(f_{k}^{\rm sell}),\forall k\in\mathcal{K}, n𝒩)\forall n\in\mathcal{N}) constitutes a mixed strategy Nash equilibrium if the following inequalities hold for any k,n𝒩,μkbuyk\in\mathcal{I},n\in\mathcal{N},\mu_{k}^{\rm buy}, and μksell\mu_{k}^{\rm sell}.

𝔼[uk(fkbuy,𝒇k,𝓧)]d(μkbuy,NE(fkbuy)×𝝁kNE(𝒇k))𝔼[uk(fkbuy,𝒇k,𝓧)]d(μkbuy(fkbuy)×𝝁kNE(𝒇k)),\int\limits_{\mathcal{F}}{\mathbb{E}[u_{k}(f_{k}^{\rm buy},\boldsymbol{f}_{-k},\boldsymbol{\mathcal{X}}^{*})]}d\big{(}\mu_{k}^{\rm buy,NE}(f_{k}^{\rm buy})\times\boldsymbol{\mu}_{-k}^{\rm NE}(\boldsymbol{f}_{-k})\big{)}\\ \geq\int\limits_{\mathcal{F}}{\mathbb{E}[u_{k}(f_{k}^{\rm buy},\boldsymbol{f}_{-k},\boldsymbol{\mathcal{X}}^{*})]}d\big{(}\mu_{k}^{\rm buy}(f_{k}^{\rm buy})\times\boldsymbol{\mu}_{-k}^{\rm NE}(\boldsymbol{f}_{-k})\big{)},\vspace{-3mm} (32)
𝔼[vn(fnsell,𝒇n,𝓧)]d(μnsell,NE(fnsell)×𝝁nNE(𝒇n))𝔼[vn(fnsell,𝒇n,𝓧)]d(μnsell(fnsell)×𝝁nNE(𝒇n)).\int\limits_{\mathcal{F}}{\mathbb{E}[v_{n}(f_{n}^{\rm sell},\boldsymbol{f}_{-n},\boldsymbol{\mathcal{X}}^{*})]}d\big{(}\mu_{n}^{\rm sell,NE}(f_{n}^{\rm sell})\times\boldsymbol{\mu}_{-n}^{\rm NE}(\boldsymbol{f}_{-n})\big{)}\\ \geq\int\limits_{\mathcal{F}}{\mathbb{E}[v_{n}(f_{n}^{\rm sell},\boldsymbol{f}_{-n},\boldsymbol{\mathcal{X}}^{*})]}d\big{(}\mu_{n}^{\rm sell}(f_{n}^{\rm sell})\times\boldsymbol{\mu}_{-n}^{\rm NE}(\boldsymbol{f}_{-n})\big{)}. (33)

We then define the intermediate function gg to help establish the equilibrium strategy:

g(p,f,I,A)n=0I1(I1n)pn(1p)I1n(f+n+1Ad).g(p,f,I,A)\triangleq\sum\limits_{n=0}^{I-1}\binom{I-1}{n}p^{n}(1-p)^{I-1-n}(f+\lceil\frac{n+1}{A}\rceil d). (34)

Equations (35) and (36) characterize the buyers’ and sellers’ equilibrium strategies in terms of cumulative distribution function (CDF).

Fbuy,NE(f)\displaystyle F^{\rm buy,NE}(f) ={0,if f<σthbuy(Ath,A)+ϵ,(35a)solution to g(1Fbuy,NE(f),f,min{AthAA,K,N},A)=g(1,σthbuy(Ath,A)+ϵ,min{AthAA,K,N},A),if σthbuy(Ath,A)+ϵf and fσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d, (35b)1,if f>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d.(35c)\displaystyle=\begin{cases}0,&\text{if $f<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon$,}\hskip 237.29596pt\text{(35a)}\\ \text{solution to }g(1-F^{\rm buy,NE}(f),f,\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\},A)=g(1,\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon,\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\},A),\\ &\text{if $\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\leq f$ and $f\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d$, (35b)}\\ 1,&\text{if $f>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d$.}\hskip 116.6563pt\text{(35c)}\end{cases}
Fsell,NE(f)\displaystyle F^{\rm sell,NE}(f) ={0,if f<σthsell(Ath,A)+ϵ,(36a)solution to g(1Fsell,NE(f),f,min{AthAA,N,K},A)=g(1,σthsell(Ath,A)+ϵ,min{AthAA,N,K},A),if σthsell(Ath,A)+ϵf and fσthsell(Ath,A)+ϵ+(min{AthAA,N,K}A1)d,   (36b)1,if f>σthsell(Ath,A)+ϵ+(min{AthAA,N,K}A1)d.(36c)\displaystyle=\begin{cases}0,&\text{if $f<\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon$},\hskip 239.00314pt\text{(36a)}\\ \text{solution to }g(1-F^{\rm sell,NE}(f),f,\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A)=g(1,\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon,\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A),\\ &\text{if $\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon\leq f$ and $f\leq\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d$, \hskip 4.83694pt(36b)}\\ 1,&\text{if $f>\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d$.}\hskip 119.50157pt\text{(36c)}\end{cases}

 

Proposition 2 summarizes the buyers’ and sellers’ MSNE.

Proposition 2 (Buyers’ and Sellers’ MSNE in Stage I)

When A<AthA<A_{th}, the buyers’ and sellers’ MSNE (μkbuy,NE(fkbuy),(\mu_{k}^{\rm buy,NE}(f_{k}^{\rm buy}), μnsell,NE(fksell),k𝒦,n𝒩)\mu_{n}^{\rm sell,NE}(f_{k}^{\rm sell}),\forall k\in\mathcal{K},\forall n\in\mathcal{N}) is as follows:

{μkbuy,NECDF in (35),if kmin{AthAA,N}, (37a)fkbuy,NE=σthbuy(Ath,A),if k>min{AthAA,N}, (37b)\displaystyle\begin{cases}\mu_{k}^{\rm buy,NE}\sim\emph{CDF in (35)},&\text{if $k\leq\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}$,}\emph{ (37a)}\\ f_{k}^{\rm buy,NE}=\sigma_{th}^{\rm buy}(A_{th},A),&\text{if $k>\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}$,}\emph{ (37b)}\end{cases}
{μnsell,NECDF in (36),if nmin{AthAA,K}, (38a)fnsell,NE=σthsell(Ath,A),if n>min{AthAA,K}. (38b)\displaystyle\begin{cases}\mu_{n}^{\rm sell,NE}\sim\emph{CDF in (36)},&\text{if $n\leq\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}$,}\hskip 4.2679pt\emph{ (38a)}\\ f_{n}^{\rm sell,NE}=\sigma_{th}^{\rm sell}(A_{th},A),&\text{if $n>\min\{\lceil\frac{A_{th}}{A}\rceil A,K\}$.}\hskip 4.2679pt\emph{ (38b)}\end{cases}

Here we elaborate on the insights of Proposition 2. If A<AthA<A_{th}, buyers and sellers adopt the mixed strategy. Low-utility buyers in (37b) pay the maximum fee they can afford in an attempt to get matched but fail. High-utility buyers in (37a) pay fees that follow a distribution due to the nonexistence of a PSNE stated in Proposition 1. Their fee distribution’s lower bound in (35a) is ϵ\epsilon higher than those with low utilities to ensure to get matched. The same insights apply to the sellers.

III-C PoA to Compare NE With Social Optimum

In this subsection, we derive the PoA of the state-of-the-art BBOB equilibrium in Theorem 2.

Theorem 2 (PoA of current system)

The PoA is unbounded, i.e., PoA=\text{PoA}=\infty, which means NE’s arbitrarily large social welfare loss compared to the social optimum.

We explain the insights of Theorem 2 by a two-buyer-two-seller example in Figs. 11-3, highlighting that setting the block size AA too high or too low can lead to arbitrarily large social welfare loss. Each buyer and seller has a unit of buying and selling quantity, respectively.

  • Refer to caption
    Figure 2: Buying utility and selling cost for high block size.

    High block size with A2A\geq 2 example: As shown in Fig. 11, with C1<R2<C2<R1C_{1}<R_{2}<C_{2}<R_{1}, the social optimum is to only match R1R_{1} with C1C_{1} to maximize the difference between buying utility and selling cost. However, if block size A2A\geq 2 and each buyer and seller set an ϵ\epsilon fee according to Proposition 1, miners will match R2R_{2} with C1C_{1} and R1R_{1} with C2C_{2} to maximize their fee revenue. Note that R2R_{2} must be matched with C1C_{1} since a valid match requires the buying utility to be higher than the selling cost. Consequently, miners’ matching can collect fees from four transactions instead of the two under the social optimum. Therefore, the ratio between social optimum and actual social welfare is:

    swoptsw(𝒇NE,𝓧,A)=R1C1R1+R2C1C2.\frac{sw^{\rm opt}}{sw(\boldsymbol{f}^{\rm NE},\boldsymbol{\mathcal{X}}^{*},A)}=\frac{R_{1}-C_{1}}{R_{1}+R_{2}-C_{1}-C_{2}}.

    As R1C1R_{1}-C_{1} can be made arbitrarily large while keeping R2C1R_{2}-C_{1} and R1C2R_{1}-C_{2} constant, the PoA as the maximum ratio becomes unbounded.

  • Refer to caption
    Figure 3: Buying utility and selling cost for low block size.

    Low block size with A=1A=1 example: As shown in Fig. 3, with C1<C2<R2<R1C_{1}<C_{2}<R_{2}<R_{1}, the social optimum is to set block size as A=2A=2 and include all transactions in one block to maximize the difference between buying utility and selling cost without delay cost. However, if block size A=1A=1 and each buyer and seller sets fees according to the mixed strategy in Proposition 2, miners need two blocks to include all transactions, resulting in two transactions bearing delay cost dd. Therefore, the performance ratio with optimum is:

    swoptsw(𝒇NE,𝓧,A)=R1+R2C1C2R1+R2C1C22d.\frac{sw^{\rm opt}}{sw(\boldsymbol{f}^{\rm NE},\boldsymbol{\mathcal{X}}^{*},A)}=\frac{R_{1}+R_{2}-C_{1}-C_{2}}{R_{1}+R_{2}-C_{1}-C_{2}-2d}.

    As dd can be made arbitrarily large or buyers and sellers are impatient to trade in practice while keeping R1,R2,C1,R_{1},R_{2},C_{1}, and C2C_{2} constant, the PoA as the maximum ratio becomes unbounded.

Theorem 2 answers Key Question 1: Setting the block size too high or too low can lead to arbitrarily low social welfare. When the block size is too high, miners’ self-interested behavior can cause them to ignore desirable matches, resulting in significant social welfare loss. Conversely, when the block size is too low, the system incurs substantial delay costs. These observations underscore the motivation for our mechanism design.

IV Our Adjustable Block Size Mechanism

In this section, we present the adjustable block size mechanism. First, we analyze the scenario where bid and ask prices and quantities are public information in Section IV-A. Then, we extend our mechanism and analysis to the case where these parameters follow random distributions in Section IV-B.

IV-A Adjustable Block Size Mechanism for Complete Information

Motivated by the Bitcoin protocol that optimizes block size [15], the system designer decides the block size A+A\in\mathbb{Z}^{+} in Stage 0 in Fig. 1, before buyers and sellers decide the transaction fees in Stage I. The system may impose a hard block size limit due the limited network bandwidth, which will be analyzed in Section V-B. Our Adjustable Block Size (ABS) mechanism design problem is formulated as follows:

max\displaystyle\max sw(𝒇NE(Rk,bk,Cn,qn,k𝒦,n𝒩),𝓧,A)\displaystyle\hskip 5.69054ptsw(\boldsymbol{f}^{\rm NE}(R_{k},b_{k},C_{n},q_{n},\forall k\in\mathcal{K},\forall n\in\mathcal{N}),\boldsymbol{\mathcal{X}}^{*},A) (39)
var. A+.\displaystyle\hskip 5.69054ptA\in\mathbb{Z}^{+}.

Problem (39) is challenging as it needs to consider the mixed-strategy distribution interactions among all buyers and sellers under any block size design, which may involve trading over multiple rounds due to the limited block size. Note that our mechanism design incorporates the tradeoff between block size and delay, as delay is part of buyers’ and sellers’ payoff function in the social welfare.

We address this challenge and the following algorithm outline the procedure for determining the optimal block size in the complete information setting:

1:  Arrange the buying utilities in decreasing order R1>R2>>RKR_{1}>R_{2}>\cdots>R_{K} and the selling costs in increasing order C1<C2<<CNC_{1}<C_{2}<\cdots<C_{N}.
2:  Set the optimal block size as AthA_{th} in (27).
Algorithm 1 Optimal Block Size Under Complete Information

The computational complexity of Algorithm 1 is O(max{K,N}logmax{K,N})O(\max\{K,N\}\log\max\{K,N\}) by the merge sort algorithm,444https://www.javatpoint.com/merge-sort as the primary task is to sort the buying utilities and selling costs. This level of complexity is manageable even in systems with a large number of buyers and sellers.

Theorem 3 (PoA under ABZ)

The PoA under our ABS mechanism with A=AthA=A_{th} is upper bounded as follows:

PoA b¯  b¯ .\text{PoA}\leq\frac{\text{ }\overline{b}\text{ }}{\text{ }\underline{b}\text{ }}. (40)

When considering homogeneous-quantity trading (e.g., NFT trading) in BBOB with b¯=b¯\underline{b}=\overline{b}, setting the block size as A=AthA=A_{th} achieves social optimum and PoA = 1.

Here we explain the insights of Theorem 3. Note that RAthCAthR_{A_{th}}\geq C_{A_{th}} and RAth+1<CAth+1R_{A_{th}+1}<C_{A_{th}+1} according to (27). Therefore, including transactions with RiR_{i} and CiC_{i} for top iAthi\leq A_{th} pairs enhances social welfare, while including RjR_{j} and CjC_{j} for bottom j>Athj>A_{th} reduces social welfare. Hence, we set the block size as AthA_{th}. The ABS in Theorem 3 achieves the social optimum under homogeneous-quantity trading. This is particularly useful and efficient in BBOB for NFT trading, where the trading quantity for buyers and sellers is generally one.

The PoA is larger than 1 when b¯b¯\underline{b}\neq\overline{b} for heterogeneous-quantity trading, because miners may randomly match transactions as long as such a random match does not affect their total fee revenue. This can result in transactions with large buying quantities matched with transactions with small selling quantities, causing small trading quantities and social welfare loss.555To mitigate this issue, we could enforce a rule requiring transactions with large buying quantities to be matched with transactions with high selling quantities. However, this approach may fundamentally alter the core principles of blockchain and compel agents to adopt an entirely new protocol.

IV-B ABS Mechanism for Incomplete Information

In practice, the system designer may not know the exact values of buying utilities and quantities from buyers, as well as selling costs and quantities from sellers [35, 36]. Here, these parameters’ values are drawn from random distributions.

As a typical setting, we suppose the buying utilities and selling costs follow i.i.d. random distributions in the normalized range [0,1][0,1], with general CDFs of R()R(\cdot) and C()C(\cdot). The buying and selling quantities follow i.i.d. distributions between [b¯,b¯][\underline{b},\overline{b}] with general CDFs of B()B(\cdot) and Q()Q(\cdot).

The ABS mechanism design problem under such incomplete information is formulated as follows:

max\displaystyle\max 𝔼[sw(𝒇NE(Rk,bk,Cn,qn,k𝒦,n𝒩),𝓧,A)]\displaystyle\hskip 5.69054pt\mathbb{E}[sw(\boldsymbol{f}^{\rm NE}(R_{k},b_{k},C_{n},q_{n},\forall k\in\mathcal{K},\forall n\in\mathcal{N}),\boldsymbol{\mathcal{X}}^{*},A)] (41)
s.t. RkR(r),bkB(b),k𝒦,\displaystyle\hskip 5.69054ptR_{k}\sim R(r),b_{k}\sim B(b),\forall k\in\mathcal{K},
CnC(c),qnQ(q),n𝒩,\displaystyle\hskip 5.69054ptC_{n}\sim C(c),q_{n}\sim Q(q),\forall n\in\mathcal{N},
var. A+.\displaystyle\hskip 5.69054ptA\in\mathbb{Z}^{+}.

Problem (41) is analytically challenging to solve due to the adoption of mixed strategies by buyers and sellers, which are randomized and interactive distributions of others’ strategies. Additionally, the general distributions of trading information for buyers and sellers further complicates the analysis. Despite these difficulties, we are able to derive the PoA bounds.

The following algorithm outlines the procedure for determining the optimal block size in the incomplete information setting:

1:  Solve for η\eta, the unique solution to the following equation:
NC(η)=K(1R(η)).NC(\eta)=K\big{(}1-R(\eta)\big{)}. (42)
2:  Given any ψ(0,1)\psi\in(0,1), the optimal block size is:
A,dist=N(C(η)+Nψ),A^{*,\text{dist}}=\lfloor N\big{(}C(\eta)+N^{-\psi}\big{)}\rfloor, (43)
Algorithm 2 Optimal Block Size Under Incomplete Information

Note that the computational complexity of Algorithm 2 is independent the number of buyers KK and sellers NN, indicating that the mechanism is scalable.

Theorem 4

When NN\rightarrow\infty, the PoA under the ABS mechanism with block size of A,distA^{*,\text{dist}} in (43) satisfies:

limNPoA b¯  b¯ .\lim\limits_{N\rightarrow\infty}\text{PoA}\leq\frac{\text{ }\overline{b}\text{ }}{\text{ }\underline{b}\text{ }}. (44)

When considering homogeneous-quantity trading (e.g., NFT trading) in BBOB with b¯=b¯\underline{b}=\overline{b}, setting the block size as A=A,distA=A^{*,\text{dist}} achieves asymptotically social optimum and the PoA satisfies

limNPoA=1.\lim\limits_{N\rightarrow\infty}\emph{PoA}=1. (45)

Here we explain the insights of Theorem 4. Note that 𝔼[RNC(η)]𝔼[CNC(η)]\mathbb{E}[R_{\lfloor NC(\eta)\rfloor}]\geq\mathbb{E}[C_{\lfloor NC(\eta)\rfloor}] and 𝔼[RNC(η)+1]\mathbb{E}[R_{\lfloor NC(\eta)\rfloor+1}]

<𝔼[CNC(η)+1]<\mathbb{E}[C_{\lfloor NC(\eta)\rfloor+1}] as NN\rightarrow\infty. Therefore, we set the block size as A,distA^{*,\text{dist}} in (43), where the parameter NψN^{-\psi} provides block size redundancy to ensure that the mechanism includes all transaction pairs with actual RiCiR_{i}\geq C_{i} for all i=1,2,,min{K,N}i=1,2,\cdots,\min\{K,N\} to maximize social welfare. Moreover, the block size in Theorem 4 achieves the asymptotically social optimum under homogeneous-quantity trading, relying only on the knowledge of the distributions for setting the block size of ABS.

Theorems 3 and 4 answer Key Question 2: the optimal block size achieves asymptotically social optimum under homogeneous-quantity trading (e.g., NFTs) and provides a bounded PoA under heterogeneous-quantity trading, even without specific matching information, which is easy to implement in practice.

V Performance Evaluations with Real Dataset

We conduct experiments to evaluate the mechanism in terms of social welfare, the performance ratio between the mechanism’s social welfare and social optimum, and the robustness of the system under time-varying numbers of buyers and sellers and different block size limits.

V-A Experiment Setting

Our experiment considers homogeneous-quantity and heterogeneous-quantity trading, with parameters set based on practical datasets. The homogeneous-quantity trading experiment is based on NFT trading data, including bid and ask prices [37]. The heterogeneous-quantity trading experiment utilizes the Bitcoin trading dataset [38], which includes bid prices, ask prices, bid quantities, ask quantities, and trading times.

Refer to caption
(a) NFT trading (homogeneous quantity) about bid/ask price distributions from [37]. The trading quantity per matching pair is constantly 1.
Refer to caption
(b) Bitcoin trading (heterogeneous quantity) about bid/ask price and bid/ask quantity distributions from [38].
Figure 4: The histogram of real dataset and fitted PDF.

Fig. 4(a) illustrates the bid price and ask price of NFT trading, where the trading quantities are constantly 1. Fig. 4(b) illustrates the bid price, ask price, bid quantity, and ask quantity for Bitcoin trading.666For Bitcoin trading, the smallest unit of bid and ask quantities is not one but 10810^{-8} Bitcoin tokens. These trading quantities are relatively small because of the high price of each Bitcoin token. We fit each attribute of the data to a distribution. For homogeneous-quantity trading, we only need to generate random bid and ask prices based on fitted distributions from the NFT trading dataset [37]. For heterogeneous-quantity trading, we generate bid prices, ask prices, bid quantities, and ask quantities based on the Bitcoin trading dataset [38].

In reality, a buyer’s utility (or a seller’s selling cost) can differ from their bid (or ask) price. In the experiment, we follow [39] to set the ratio of 1.05 between buyers’ bid prices and their utilities, as well as between sellers’ ask prices and their costs. The remaining parameters’ values are summarized as follows: the number of miners is 250k,777https://www.statista.com/statistics/1334722/ethereum-held-by-miners/ the average ratio of buyers to sellers is K/N=1K/N=1, the delay cost is d=$0.3d=\$0.3 per block, and the block size factor ψ=0.85\psi=0.85.

In the experiment, we compare our mechanism with the following benchmarks:

  1. 1.

    Benchmark with BBOB matching algorithm [40]: The benchmark mechanism is the state-of-the-art BBOB matching algorithm, which sets the block size to be maximal. This mechanism further recommends transaction matching for miners, but miners are rational and do not necessarily follow the recommendation. This issue is prevalent in other matching algorithms for BBOB.888https://dydx.exchange/

  2. 2.

    Our ABS facing 20% non-selfish miners: In practice, some miners follow the protocol recommendations.999https://thenextweb.com/news/a-brief-history-of-bitcoin-mining-hardware Therefore, we evaluate our ABS mechanism assuming 20% of miners are cooperative and follow the recommendations of matching algorithm [40].

V-B Implementation of ABS Mechanism

We implement the ABS mechanism on a local instance of the Ethereum blockchain by modifying the “gas limit,” which refers to a system parameter that restricts the number of computational steps (or “gas”) a block can contain. This Ethereum-based testbed demonstrates that block size adjustments can be effectively realized within a real-world blockchain environment.

Refer to caption
Figure 5: ABS implementation in Ethereum blockchain testbed.

We use Geth version 1.11.2 [41] as the Ethereum client. We modified the Geth source code’s “block_validator.go” file, setting the gas limit to adjust the block size. After modifying the client, we ran a local Ethereum instance with the updated gas limit. Fig. 5 illustrates the modification as setting the gas limit to 2,100,000 to accommodate approximately 100 transactions per block (each transaction typically consumes 21,000 gas).

By leveraging this implementation, we are able to conduct our experiments and evaluate the performance of our ABS mechanism. Section VIII provides a detailed explanation of the implementation steps.

V-C Experiment Results

We compare our ABS mechanism with the two benchmarks and evaluate the impacts of the randomness of buyer/seller number and the block size limit.

V-C1 Mechanism Comparison

Refer to caption
Figure 6: Mechanism comparison for homogeneous-quantity trading.
Refer to caption
(a) Social welfare.
Refer to caption
(b) Performance ratio.
Figure 7: Mechanism comparison for heterogeneous-quantity trading.

We establish the homogeneous-quantity trading and heterogeneous-quantity trading settings by using the fitted PDFs from the NFT trading dataset [37] and the Bitcoin trading dataset [38], respectively.

For homogeneous-quantity trading, Fig. 6 compares different mechanisms in terms of social welfare. The social welfare of all mechanisms increases with the number of sellers due to more matching opportunities. Notably, our ABS mechanism, ABS with 20% non-selfish miners, and the social optimum overlap in the figure. This confirms the result in Theorem 4 for our ABS mechanism’s asymptotic optimum and demonstrates the close-to-optimal performance even with non-large seller number cases. Moreover, the benchmark mechanism only achieves about 40% of our mechanism’s social welfare.

For heterogeneous-quantity trading, Fig. 7(a) shows that our mechanism achieves 3.7 times higher social welfare than the benchmark mechanism by strategically adjusting the block size to prevent social welfare loss. Additionally, the presence of non-selfish miners who follow the recommendation further enhances the social welfare of our mechanism. This highlights that our mechanism performs well even when the system deviates from our rational-miner assumption.

In Fig. 7(b), the performance ratio of our mechanism converges to 0.6, indicating that it achieves approximately 60% of the social optimum. With 20% non-selfish miners, the performance ratio can be improved to 78%.

Overall, our ABS mechanism’s performance is close to optimum for practical homogeneous-quantity trading like NFT trading. Moreover, it dominates the benchmark mechanism in heterogeneous-quantity trading settings.

V-C2 Impact of Buyer/Seller Number Randomness

Refer to caption
(a) Homogeneous-quantity trading.
Refer to caption
(b) Heterogeneous-quantity trading.
Figure 8: Impact of the random number of users on performance ratio.

In practice, the number of buyers and sellers can vary randomly over time. Here we analyze cases where the number of sellers NN follows the number of buyers/sellers in the Bitcoin trading dataset [38]. Our mechanism sets the block size based on (43), using the average value of NN. Fig. 8 illustrates how the performance ratio changes over time.

Fig. 8(a) illustrates the homogeneous-quantity trading. The performance ratio fluctuates with time as the number of sellers changes. Our ABS mechanism achieves an average performance ratio of 96%, while the benchmark mechanism achieves an average of 40%.

Fig. 8(b) illustrates heterogeneous-quantity trading. Our ABS and benchmark mechanisms achieve lower performance ratios than homogeneous-quantity trading, as miners can match high-buying-quantity transactions with low-selling-quantity transactions, causing social welfare loss. Nevertheless, our mechanism achieves an average performance ratio of 58%, which is 3.3 times higher than the benchmark mechanism.

To sum up, Fig. 8 shows that our ABS mechanism still outperforms the benchmark even when the number of buyers and sellers is random, showcasing the practicality of our mechanism in real-world implementations. Additionally, our benchmark mechanism highlights the shortcomings of existing matching algorithms in blockchain that neglect miners’ incentives, indicating that our mechanism achieves universal dominance over existing matching algorithms.

V-C3 Impact of Block Size Limit on ABS

Refer to caption
(a) Optimal block size.
Refer to caption
(b) Social welfare comparison.
Figure 9: Impact of block size limit on homogeneous-quantity trading.
Refer to caption
(a) Optimal block size.
Refer to caption
(b) Social welfare comparison.
Figure 10: Impact of block size limit on heterogeneous-quantity trading.

The blockchain system generally has a block size limit due to the limited network bandwidth [42][43]. Here, we examine the impact of block size limits on the performance of our mechanism.

We consider block size limits of A300A\leq 300 and A500A\leq 500 and use a brute-force search to optimally solve problem (41) with the additional block size limit constraint.

Fig. 9 illustrates the optimal block size for our ABS mechanism and the corresponding social welfare for homogeneous-quantity trading. In Fig. 9(a), when the number of sellers NN is small, the optimal block size of our ABS mechanism increases with NN. However, as NN increases, our ABS mechanism sometimes strategically reduces the block size. This is because larger block sizes can lead to a higher tendency to ignore desirable matches, as explained in Theorem 2, which decreases social welfare. Consequently, our ABS mechanism may decrease the block size and bear a higher delay cost to mitigate this issue. This finding underscores the importance of our ABS mechanism even under block size limits.

Fig. 9(b) compares the social welfare of our ABS mechanism with the benchmark. Even with the block size limit, our mechanism achieves higher social welfare than the benchmark, highlighting its practical necessity. The improvement is more significant when the block size limit is large (i.e., A500A\leq 500) and the number of sellers is small (i.e., N600N\leq 600). Such an improvement is even more pronounced for heterogeneous-quantity trading in Fig. 10(b), with an average improvement of 65%.

Fig. 10 illustrates the optimal block size and the corresponding social welfare for heterogeneous-quantity trading. The insights are consistent with those observed in the homogeneous-quantity trading setting.

Hence, our ABS mechanism can still improve social welfare under the block size limit constraint. The improvement is particularly significant when the number of buyers and sellers is small.

VI Conclusion

In this paper, we proposed a block size optimization mechanism to address the inefficiencies in blockchain-based order book (BBOB) systems caused by miners’ self-interested actions. Our dynamic game-theoretical model highlighted how these self-interested actions lead to suboptimal transaction matches, significantly reducing social welfare. To mitigate this issue, we designed a mechanism where the system designer optimizes the block size to balance the tendency to ignore desirable matches with maintaining high throughput. Our analysis revealed that the optimized block size mechanism could achieve the social optimum under homogeneous-quantity matching and provide a bounded approximation ratio under heterogeneous-quantity matching. We implemented our proposed mechanism on an Ethereum blockchain testbed, validating its practical applicability. Through extensive experiments using actual BBOB data, we demonstrated that our mechanism achieved social optimum for homogeneous-quantity matching like NFT. For heterogeneous-quantity matching, our mechanism enhances social welfare by up to 3.7 times compared to the existing benchmark and achieves at least 60% of the social optimum. Furthermore, our mechanism demonstrated robustness in scenarios with random variations in the number of buyers and sellers.

In future work, we will consider the impact of different miner incentive structures that can adapt to varying levels of miner rationality. Furthermore, we will consider participants making strategic decisions on bid and ask prices.

VII Model Analysis

VII-A Stage II of Miners’ Transaction Selection Analysis

Proof of Theorem 1.

Theorem 1 follows naturally from the objective of miners to maximize their payoff. Miners will always select the highest-fee transaction set that can be matched. Propositions 1 and 2 later show that buyers (or sellers) who cannot be matched will pay lower transaction fees than those who can be matched. Therefore, the strategy of selecting only the top-fee transactions ensures that each miner maximizes their payoff.

This completes the proof of Theorem 1.

VII-B Stage I Analysis

Proof of Proposition 1.

We will first prove the case of A<AthA<A_{th}, and then prove the case of AAthA\geq A_{th}.

VII-B1 Proof of Case A<AthA<A_{th}

We use the contradiction method to prove the non-existence of pure strategy Nash equilibrium. We assume there exists a pure strategy Nash equilibrium 𝒇NE=(fkbuy,NE,fnsell,NE,k𝒦,n𝒩)\boldsymbol{f}^{\rm NE}=(f_{k}^{\rm buy,NE},f_{n}^{\rm sell,NE},\forall k\in\mathcal{K},\forall n\in\mathcal{N}). Then we arrange the buyers’ and sellers’ fees in a decreasing order: f1buy,NEf2buy,NEfKbuy,NEf_{1}^{\rm buy,NE}\geq f_{2}^{\rm buy,NE}\geq\cdots\geq f_{K}^{\rm buy,NE} and f1sell,NEf2sell,NEfNsell,NEf_{1}^{\rm sell,NE}\geq f_{2}^{\rm sell,NE}\geq\cdots f_{N}^{\rm sell,NE}. Then based on the assumption that there exists a pure strategy Nash equilibrium, we will prove that f1buy,NE=f2buy,NE==fAbuy,NEf_{1}^{\rm buy,NE}=f_{2}^{\rm buy,NE}=\cdots=f_{A}^{\rm buy,NE} and f1sell,NE=f2sell,NE==fAsell,NEf_{1}^{\rm sell,NE}=f_{2}^{\rm sell,NE}=\cdots=f_{A}^{\rm sell,NE} by contradiction.

As we arrange the fee in a decreasing order, we assume that buyer ii’s fee satisfies fibuy,NE>fi+1buy,NEf_{i}^{\rm buy,NE}>f_{i+1}^{\rm buy,NE}, where 1iA11\leq i\leq A-1. Then buyer ii can deviate to set the transaction fee as fi+1buy,NEf_{i+1}^{\rm buy,NE}, where he pay strictly less fee and do not change the miners’ matching result and delay cost. This contradicts the pure strategy Nash equilibrium. Hence, we have proved that f1buy,NE=f2buy,NE==fAbuy,NEf_{1}^{\rm buy,NE}=f_{2}^{\rm buy,NE}=\cdots=f_{A}^{\rm buy,NE}. Following the same proof logic, we can also prove that f1sell,NE=f2sell,NE==fAsell,NEf_{1}^{\rm sell,NE}=f_{2}^{\rm sell,NE}=\cdots=f_{A}^{\rm sell,NE}.

Next, we prove that fA+1buy,NE<fAbuy,NEf_{A+1}^{\rm buy,NE}<f_{A}^{\rm buy,NE}. If buyer A+1A+1 sets the fee as fA+1buy,NE=fAbuy,NEf_{A+1}^{\rm buy,NE}=f_{A}^{\rm buy,NE}, then buyer AA has 1A+1\frac{1}{A+1} probability that transaction is included in the second block and bear the delay cost. He can deviate to pay fee fAbuy,NE+ϵf_{A}^{\rm buy,NE}+\epsilon to bear no delay cost, strictly increasing his payoff. This contradicts the pure strategy Nash equilibrium. Hence, we must have fA+1buy,NE<fAbuy,NEf_{A+1}^{\rm buy,NE}<f_{A}^{\rm buy,NE}.

Then, we prove that fA+1buy,NE=fAbuy,NEϵf_{A+1}^{\rm buy,NE}=f_{A}^{\rm buy,NE}-\epsilon. If buyer A+1A+1 sets the fee as fA+1buy,NE<fAbuy,NEϵf_{A+1}^{\rm buy,NE}<f_{A}^{\rm buy,NE}-\epsilon, then buyer AA can deviate to set the transaction fee as fA+1buy,NE+ϵf_{A+1}^{\rm buy,NE}+\epsilon, where he pay strictly less fee and do not change the miners’ matching result and delay cost, strictly increasing his payoff. This contradicts the pure strategy Nash equilibrium. Hence, we must have fA+1buy,NE=fAbuy,NEϵf_{A+1}^{\rm buy,NE}=f_{A}^{\rm buy,NE}-\epsilon.

However, when fA+1buy,NE=fAbuy,NEϵf_{A+1}^{\rm buy,NE}=f_{A}^{\rm buy,NE}-\epsilon, then buyer A+1A+1 can deviate to set the fee as fAbuy,NE+2ϵf_{A}^{\rm buy,NE}+2\epsilon, where his transaction is included in blockchain in the first block. He strictly decreases his delay cost by dd while paying slightly higher fee. Hence, this contradicts the pure strategy Nash equilibrium.

To sum up, we have proved the non-existence of pure strategy Nash equilibrium for Case A<AthA<A_{th}.

VII-B2 Proof of Case AAthA\geq A_{th}

For this case, we just need to verify that no buyer or seller can increase his payoff by deviating from the pure strategy Nash equilibrium.

We first analyze buyers with k>min{A,N}k>\min\{A,N\}. Under the equilibrium strategies characterized by (10) and (11), miners will select buyers with kmin{A,N}k\leq\min\{A,N\} and sellers with nmin{A,K}n\leq\min\{A,K\} to included in the blockchain. For buyers with k>min{A,N}k>\min\{A,N\} and sellers with nmin{A,K}n\leq\min\{A,K\}, their transactions will not be matched and get zero payoff. For a buyer with k>min{A,N}k>\min\{A,N\}, if he deviates to set lower transaction fee, his transaction is still not included in the blockchain, and his payoff is unchanged. If buyer kk deviates to increase transaction fee to fkbuyσthsell(Ath,A)+ϵf_{k}^{\rm buy}\geq\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon, the matching surplus of his transaction is:

ukSur(fkbuy)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy.u_{k}^{\rm Sur}(f_{k}^{\rm buy})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy}. (46)

The delay cost is:

ukDelay(fkbuy)=(min{AthAA,N}AA1)d.u_{k}^{\rm Delay}(f_{k}^{\rm buy})=(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}{A}\rceil A-1)d. (47)

Hence, the payoff of setting transaction fee as fkbuyf_{k}^{\rm buy} is

uk=ukSur(fkbuy)ukDelay(fkbuy).u_{k}=u_{k}^{\rm Sur}(f_{k}^{\rm buy})-u_{k}^{\rm Delay}(f_{k}^{\rm buy}). (48)

Note that for buyer k=min{A,N}+1k=\min\{A,N\}+1, the above (48) achieves the highest payoff of:

uk\displaystyle u_{k} umin{AthAA,N}+1\displaystyle\leq u_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1} (49)
=n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)min{bmin{AthAA,N}+1,qn}(Rmin{AthAA,N}+1Cn)2n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)\displaystyle=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})\min\{b_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1},q_{n}\}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})}
(min{AthAA,N}AA1)dσthsell(Ath,A)ϵ\displaystyle\hskip 14.22636pt-(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}{A}\rceil A-1)d-\sigma_{th}^{\rm sell}(A_{th},A)-\epsilon
ϵ.\displaystyle\leq-\epsilon.

To sum up, for buyers with k>min{A,N}k>\min\{A,N\}, increasing or decreasing the transaction fee cannot increase his payoff. Following the same analysis process, we can also prove that for sellers with n>min{K,N}n>\min\{K,N\}, he cannot increase his payoff by deviating from the pure strategy Nash equilibrium.

We then analyze buyers with kmin{A,N}k\leq\min\{A,N\}. We derive his payoff and then compare it with he deviating to set higher or lower transaction fee. For buyer kmin{A,N}k\leq\min\{A,N\} setting the transaction fee as fkbuy,NEf_{k}^{\rm buy,NE}, his matching surplus is

ukSur(fkbuy,NE)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy,NE.u_{k}^{\rm Sur}(f_{k}^{\rm buy,NE})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy,NE}. (50)

The delay cost is:

ukDelay(fkbuy,NE)=(min{AthAA,N}AA1)d.u_{k}^{\rm Delay}(f_{k}^{\rm buy,NE})=(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}{A}\rceil A-1)d. (51)

Hence, the payoff of setting transaction fee as fkbuy,NEf_{k}^{\rm buy,NE} is

uk=ukSur(fkbuy,NE)ukDelay(fkbuy,NE).u_{k}=u_{k}^{\rm Sur}(f_{k}^{\rm buy,NE})-u_{k}^{\rm Delay}(f_{k}^{\rm buy,NE}). (52)

Note that for buyer k=min{A,N}k=\min\{A,N\}, the above (52) achieves the lowest payoff of:

uk\displaystyle u_{k} umin{AthAA,N}\displaystyle\geq u_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}} (53)
=n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)min{bmin{AthAA,N}+1,qn}(Rmin{AthAA,N}+1Cn)2n=1min{AthAA,N}𝟙(Rmin{AthAA,N}+1Cn)\displaystyle=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})\min\{b_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1},q_{n}\}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}+1}\geq C_{n})}
(min{AthAA,N}AA1)dσthsell(Ath,A)ϵ\displaystyle\hskip 14.22636pt-(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}{A}\rceil A-1)d-\sigma_{th}^{\rm sell}(A_{th},A)-\epsilon
0.\displaystyle\geq 0.

When buyer kk deviates to pay a higher transaction fee, he cannot change the matching results and his delay cost. Hence, he has no incentive to increase his transaction fee. When buyer kmin{A,N}k\leq\min\{A,N\} deviates to decrease transaction fee to fkbuyσthsell(Ath,A)f_{k}^{\rm buy}\leq\sigma_{th}^{\rm sell}(A_{th},A), then he cannot get matched and getting the payoff of zero.

To sum up, for buyers with kmin{A,N}k\leq\min\{A,N\}, increasing or decreasing the transaction fee cannot increase his payoff. Following the same analysis process, we can also prove that for sellers with nmin{K,N}n\leq\min\{K,N\}, he cannot increase his payoff by deviating from the pure strategy Nash equilibrium.

This completes the proof of Proposition 1.

Proof of Proposition 2

In this proof, we only present the analysis of buyers, as the proof sketch is exactly the same as for sellers. Here we first show that buyers who adopt pure strategy in (37b) cannot increase his payoff by setting different transaction fee. Next we prove the mixed strategy in (37a).

Buyers with k>min{AthAA,N}k>\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}: For any buyer k>min{AthAA,N}k>\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}, his transaction cannot get matched and he gets zero payoff. If he deviates to set lower transaction fee, his transaction still cannot get matched, which cannot increase his payoff. If buyer kk deviates to set higher transaction fee, there are two situations:

  1. 1.

    If fkbuy>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)df_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d, then the matching surplus of his transaction is:

    ukSur(fkbuy)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy.u_{k}^{\rm Sur}(f_{k}^{\rm buy})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy}. (54)

    The delay cost is:

    ukDelay(fkbuy)=0.u_{k}^{\rm Delay}(f_{k}^{\rm buy})=0. (55)

    Hence, the payoff of setting transaction fee as fkbuyσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)df_{k}^{\rm buy}\geq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d is

    uk(fkbuy)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy<0.u_{k}(f_{k}^{\rm buy})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy}<0. (56)

    Hence, for buyer kk, setting the transaction fee as fkbuy>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)df_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d cannot increase his payoff.

  2. 2.

    Setting transaction fee as fkbuyf_{k}^{\rm buy} satisfying σthbuy(Ath,A)+ϵfkbuyσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\leq f_{k}^{\rm buy}\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d, then the matching utility of his transaction is:

    n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (57)

    The sum of fee payment and delay cost is:

    g(1Fsell,NE(fkbuy),fkbuy,min{AthAA,N,K},A).g(1-F^{\rm sell,NE}(f_{k}^{\rm buy}),f_{k}^{\rm buy},\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A). (58)

    Hence, the payoff of setting transaction fee as fkbuyf_{k}^{\rm buy} is

    uk(fkbuy)\displaystyle u_{k}(f_{k}^{\rm buy}) (59)
    =\displaystyle= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)g(1Fsell,NE(fkbuy),fkbuy,min{AthAA,N,K},A)\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-g(1-F^{\rm sell,NE}(f_{k}^{\rm buy}),f_{k}^{\rm buy},\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A)
    =\displaystyle= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)g(1,σthsell(Ath,A)+ϵ,min{AthAA,N,K},A)\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-g(1,\sigma_{th}^{\rm sell}(A_{th},A)+\epsilon,\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A)
    =\displaystyle= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)(min{AthAA,N,K}1)dσthsell(Ath,A)ϵ\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-(\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}-1)d-\sigma_{th}^{\rm sell}(A_{th},A)-\epsilon
    =\displaystyle= ϵ\displaystyle-\epsilon
    <\displaystyle< 0.\displaystyle 0.

    Hence, for buyer kk, setting the transaction fee as σthbuy(Ath,A)+ϵfkbuyσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\leq f_{k}^{\rm buy}\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d cannot increase his payoff.

To sum up, for any buyer k>min{AthAA,N}k>\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}, setting different transaction fee cannot increase his payoff.

Next we prove the mixed strategy for buyers with kmin{AthAA,N}k\leq\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}. Here we first present Lemma 2.1-2.4 to analyze the property of mixed-strategy distribution, then we derive the mixed strategy Nash equilibrium.

For all buyer (or seller) who adopt mixed strategy, we consider their strategies follows the same probability distribution. Note that the distributions of buyers and sellers are different. Moreover, as some transactions are not matched, (e.g., if N>KN>K, then some buyers’ transactions cannot be matched), the strategies of matched and unmatched ones are different. For buyer kk who adopt the mixed strategy, we define his strategy is μkNE\mu_{k}^{\rm NE}, which is a probability measure over [0,)[0,\infty). We define the corresponding CDF as GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}).

We use LL and UU to represent the strategy of transaction fee’s lower support and upper support, respectively, which are defined as follows:

L\displaystyle L sup{f¯k:μkNE({fkbuyf¯k})=1},\displaystyle\triangleq\sup\left\{\underline{f}_{k}:\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}\geq\underline{f}_{k}\})=1\right\}, (60)
U\displaystyle U inf{f¯k:μkNE({fkbuyf¯k})=1}.\displaystyle\triangleq\inf\left\{\overline{f}_{k}:\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}\leq\overline{f}_{k}\})=1\right\}.

Lemma 2.1. We define LL and UU as the lower and upper support of transaction fee-per-byte μkNE\mu_{k}^{\rm NE} at mixed strategy Nash equilibrium, respectively. Then σthbuy(Ath,A)+ϵL,Uσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\leq L,U\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d.

Proof of Lemma 2.1.

We will prove the range of LL and UU by contradiction. Notice that as we will focus on a particular buyer kk’s payoff, we will denote his payoff function as uk(fkbuy)u_{k}(f_{k}^{\rm buy}) to simplify the notation.

Assume U>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)dU>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d: then μkNE({fkbuy>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d})>0\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d\})>0 at equilibrium. When buyer kk sets fee fkbuy>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)df_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d, the matching surplus of his transaction is:

ukSur(fkbuy)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy.u_{k}^{\rm Sur}(f_{k}^{\rm buy})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy}. (61)

The delay cost is:

ukDelay(fkbuy)=0.u_{k}^{\rm Delay}(f_{k}^{\rm buy})=0. (62)

Hence, the payoff of setting transaction fee as fkbuyf_{k}^{\rm buy} is

uk(fkbuy)=n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)fkbuy.u_{k}(f_{k}^{\rm buy})=\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-f_{k}^{\rm buy}. (63)

Note that fkbuy>σthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)df_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d. Hence, buyer kk can increase his payoff by setting the transaction fee as σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, the corresponding payoff is

uk(σthbuy(Ath,A)+ϵ)=\displaystyle u_{k}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon)= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})} (64)
(min{AthAA,N,K}A1)d(σthbuy(Ath,A)+ϵ)\displaystyle-(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d-\big{(}\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\big{)}
>\displaystyle> uk(fkbuy).\displaystyle u_{k}(f_{k}^{\rm buy}).

This contradicts the Nash equilibrium, where no buyer or seller can increase his payoff by deviating. Such a contradiction shows that the upper bound UU satisfies Uσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)dU\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d.

Assume L<σthbuy(Ath,A)+ϵL<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon: then μkNE({fkbuy<σthbuy(Ath,A)+ϵ})>0\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\})>0 at equilibrium. When buyer kk sets fee fkbuy<σthbuy(Ath,A)+ϵf_{k}^{\rm buy}<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, his transaction cannot get matched and buyer kk gets zero payoff. Then buyer kk can increase his payoff by setting the transaction fee as fkbuy=σthbuy(Ath,A)+ϵf_{k}^{\rm buy}=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, where his payoff is

uk(σthbuy(Ath,A)+ϵ)=\displaystyle u_{k}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon)= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})} (65)
(min{AthAA,N,K}A1)d(σthbuy(Ath,A)+ϵ)\displaystyle-(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d-\big{(}\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\big{)}
>\displaystyle> 0.\displaystyle 0.

This contradicts the Nash equilibrium, where no buyer or seller can increase his payoff by deviating. Such a contradiction shows that the lower bound LL satisfies Lσthbuy(Ath,A)+ϵL\geq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon.

Thus, all possible cases leads to contradiction, we have σthbuy(Ath,A)+ϵL,Uσthbuy(Ath,A)+ϵ+(min{AthAA,N,K}A1)d\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon\leq L,U\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+(\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\}}{A}\rceil-1)d. This completes the proof of Lemma 2.1.

We define an atom as a point where the probability of a random variable equals to the value of this point is strictly positive. For example, fkbuyf_{k}^{\rm buy*} is an atom if μkNE({fkbuy=fkbuy})>0\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}=f_{k}^{\rm buy*}\})>0.

Lemma 2.2. For buyer’s strategy at mixed-strategy Nash equilibrium μkNE\mu_{k}^{\rm NE}, it doesn’t have any atom over [L,U][L,U], i.e., fkbuy[L,U],μkNE({fkbuy=fkbuy})=0\forall f_{k}^{\rm buy\prime}\in[L,U],\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}=f_{k}^{\rm buy\prime}\})=0.

Proof of Lemma 2.2.

We prove the result by contradiction method. Assuming there exists an atom in μkNE\mu_{k}^{\rm NE} (i.e., fkbuy[L,U],μkNE({fkbuy=fkbuy})>0\exists f_{k}^{\rm buy\prime}\in[L,U],\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}=f_{k}^{\rm buy\prime}\})>0), we will construct a strategy that achieves higher payoff than equilibrium strategy. Notice that as we will focus on a particular buyer kk’s payoff, we will denote his payoff function as uk(fkbuy)u_{k}(f_{k}^{\rm buy}) to simplify the notation.

Assume μkNE\mu_{k}^{\rm NE} has an atom x1x_{1} within [L,U][L,U], i.e., μkNE({fkbuy=x1})>0\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}=x_{1}\})>0. Then we define following probabilities:

{μkNE({fkbuy>x1})=ζ10,μkNE({fkbuy=x1})=ζ2>0,μkNE({fkbuy<x1})=ζ30,ζ1+ζ2+ζ3=1.\begin{cases}\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}>x_{1}\})=\zeta_{1}\geq 0,\\ \mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}=x_{1}\})=\zeta_{2}>0,\\ \mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}<x_{1}\})=\zeta_{3}\geq 0,\\ \zeta_{1}+\zeta_{2}+\zeta_{3}=1.\end{cases} (66)

At mixed strategy Nash equilibrium, any strategy support yields same expected payoff. Thus, buyer kk’s expected payoff can be calculated at transaction fee equaling x1x_{1}. The matching utility of his transaction is:

n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (67)

The sum of fee payment and delay cost is:

n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)(ζ1+ζ2)n(1ζ1ζ2)min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}(\zeta_{1}+\zeta_{2})^{n}(1-\zeta_{1}-\zeta_{2})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n} (68)
j=0n(nj)(ζ2ζ1+ζ2)j(ζ1ζ1+ζ2)nj(x1+l=1j+1nj+lAdj+1)\displaystyle\sum_{j=0}^{n}\binom{n}{j}(\frac{\zeta_{2}}{\zeta_{1}+\zeta_{2}})^{j}(\frac{\zeta_{1}}{\zeta_{1}+\zeta_{2}})^{n-j}(x_{1}+\sum_{l=1}^{j+1}\lceil\frac{n-j+l}{A}\rceil\frac{d}{j+1})
<\displaystyle< n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1n(x1+n+1Ad)\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(x_{1}+\lceil\frac{n+1}{A}\rceil d)
=\displaystyle= g(ζ1,x1,min{AthAA,N,K},A).\displaystyle g(\zeta_{1},x_{1},\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A).

Hence, the payoff of setting transaction fee as x1x_{1} satisfies

uk(fkbuy)\displaystyle u_{k}(f_{k}^{\rm buy}) (69)
=\displaystyle= n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn)g(ζ1,x1,min{AthAA,N,K},A).\displaystyle\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}-g(\zeta_{1},x_{1},\min\{\lceil\frac{A_{th}}{A}\rceil A,N,K\},A).

Define

ϕ=\displaystyle\phi= n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)(ζ1+ζ2)n(1ζ1ζ2)min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}(\zeta_{1}+\zeta_{2})^{n}(1-\zeta_{1}-\zeta_{2})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n} (70)
j=0n(nj)(ζ2ζ1+ζ2)j(ζ1ζ1+ζ2)njl=1j+1nj+lAdj+1\displaystyle\sum_{j=0}^{n}\binom{n}{j}(\frac{\zeta_{2}}{\zeta_{1}+\zeta_{2}})^{j}(\frac{\zeta_{1}}{\zeta_{1}+\zeta_{2}})^{n-j}\sum_{l=1}^{j+1}\lceil\frac{n-j+l}{A}\rceil\frac{d}{j+1}
n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1nn+1Ad.\displaystyle-\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\lceil\frac{n+1}{A}\rceil d.

We set a sufficiently small δ2(0,ϕ2)\delta_{2}\in(0,\frac{\phi}{2}), such that there is no atom between (x1,x1+δ2](x_{1},x_{1}+\delta_{2}] and satisfies following condition:

n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1nn+1Ad\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\lceil\frac{n+1}{A}\rceil d
n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1+δ2)]n[GkNE(x1+δ2)]min{AthAA,K,N}1nn+1Ad0.\displaystyle-\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}+\delta_{2})]^{n}[G_{k}^{\rm NE}(x_{1}+\delta_{2})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\lceil\frac{n+1}{A}\rceil d\geq 0.

(there must exist δ2\delta_{2} satisfy the above condition, as x1+δ2x_{1}+\delta_{2} can be arbitrarily close to x1x_{1} and atom cannot continuously exists). We consider buyer kk sets the trasnaction fee as x1+δ2x_{1}+\delta_{2}, the sum of buyer kk’ fee payment and delay cost is

n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1+δ2)]n[GkNE(x1+δ2)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}+\delta_{2})]^{n}[G_{k}^{\rm NE}(x_{1}+\delta_{2})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n} (71)
[(x1+δ2)+n+1Ad]\displaystyle[(x_{1}+\delta_{2})+\lceil\frac{n+1}{A}\rceil d]
\displaystyle\leq n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1n(x1+δ2+n+1Ad)\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(x_{1}+\delta_{2}+\lceil\frac{n+1}{A}\rceil d)
=\displaystyle= n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1n(x1+n+1Ad)+δ2\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(x_{1}+\lceil\frac{n+1}{A}\rceil d)+\delta_{2}
<\displaystyle< n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)ζ1n(1ζ1)min{AthAA,K,N}1n(x1+n+1Ad)+ϕ2\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\zeta_{1}^{n}(1-\zeta_{1})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(x_{1}+\lceil\frac{n+1}{A}\rceil d)+\frac{\phi}{2}
<\displaystyle< n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)(ζ1+ζ2)n(1ζ1ζ2)min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}(\zeta_{1}+\zeta_{2})^{n}(1-\zeta_{1}-\zeta_{2})^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
j=0n(nj)(ζ2ζ1+ζ2)j(ζ1ζ1+ζ2)nj(x1+l=1j+1nj+lAdj+1)\displaystyle\sum_{j=0}^{n}\binom{n}{j}(\frac{\zeta_{2}}{\zeta_{1}+\zeta_{2}})^{j}(\frac{\zeta_{1}}{\zeta_{1}+\zeta_{2}})^{n-j}(x_{1}+\sum_{l=1}^{j+1}\lceil\frac{n-j+l}{A}\rceil\frac{d}{j+1})

Note that the matching utilities are the same when buyer kk set the transaction fee as x1+δ2x_{1}+\delta_{2} and x1x_{1}, which is in equation (67). Thus buyer kk can increase his payoff by setting the transaction fee as x1+δ2x_{1}+\delta_{2}, which is a contradiction to Nash equilibrium. Thus, we have proved μkNE\mu_{k}^{\rm NE} doesn’t have any atom. This completes the proof of Lemma 2.2.

Lemma 2.3. We use μkNE\mu_{k}^{\rm NE} to represent buyer kk’s strategy at mixed strategy Nash equilibrium, LL and UU to represent the strategy of transaction fee-per-byte’s lower and upper support, and GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) to represent the CDF of the strategy of transaction fee-per-byte. Then GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) is strictly increasing over [L,U][L,U].

Proof of Lemma 2.3.

We will prove that the CDF GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) is strictly increasing over [L,U][L,U] by contradiction. Assuming the CDF is not strictly increasing, we will construct a strategy that achieves higher payoff than equilibrium strategy. Notice that as we will focus on a particular buyer kk’s payoff, we will denote his payoff function as uk(fkbuy)u_{k}(f_{k}^{\rm buy}) to simplify the notation.

Assume μkNE\mu_{k}^{\rm NE}’s CDF GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) is constant over [x1,x1][x_{1},x_{1}^{{}^{\prime}}] (i.e, μkNE({x1fkbuyx1})=0\mu_{k}^{\rm NE}(\{x_{1}\leq f_{k}^{\rm buy}\leq x_{1}^{{}^{\prime}}\})=0), x1<x1x_{1}<x_{1}^{{}^{\prime}}, and x1,x1[L,U]x_{1},x_{1}^{{}^{\prime}}\in[L,U], such that GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) is not strictly increasing over [x1,x1][x_{1},x_{1}^{{}^{\prime}}]. Then, there is a positive probability of buyer kk’s transaction fee-per-byte is between [x1,U][x_{1}^{{}^{\prime}},U], i.e., μkNE({fkbuyx1})>0\mu_{k}^{\rm NE}(\{f_{k}^{\rm buy}\geq x_{1}^{{}^{\prime}}\})>0. (Otherwise the upper support should be x1x_{1}, which is defined as strictly smaller than UU.) Then there are two possible cases:

  1. 1.

    Strategy support includes point x1x_{1}^{{}^{\prime}}. Notice that there is no atom at x1x_{1}^{{}^{\prime}} based on Lemma 2.2. At mixed strategy Nash equilibrium, any strategy support yields same expected payoff. Thus, buyer kk’s expected payoff can be calculated at fee-per-byte equaling x1x_{1}^{\prime}. The matching utility is

    n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (72)

    The sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1)]n[GkNE(x1)]min{AthAA,K,N}1n(x1+n+1Ad).\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(x_{1}^{{}^{\prime}}+\lceil\frac{n+1}{A}\rceil d). (73)

    We consider buyer kk sets the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}. His matching utility is the same as in (72). However, the sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1+x12)]n[GkNE(x1+x12)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})]^{n}[G_{k}^{\rm NE}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n} (74)
    (x1+x12+n+1Ad)\displaystyle(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}+\lceil\frac{n+1}{A}\rceil d)
    =\displaystyle= n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1)]n[GkNE(x1)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    (x1+n+1Ad)x1x12.\displaystyle(x_{1}^{{}^{\prime}}+\lceil\frac{n+1}{A}\rceil d)-\frac{x_{1}^{{}^{\prime}}-x_{1}}{2}.

    We compare the payoff of setting the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2} and the mixed strategy at equilibrium, we have

    uk(x1+x12)uk(x1)=x1x12>0.\displaystyle u_{k}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})-u_{k}(x_{1}^{{}^{\prime}})=\frac{x_{1}^{{}^{\prime}}-x_{1}}{2}>0.

    Note that the matching utilities are the same when buyer kk set the transaction fee as x1+δ2x_{1}+\delta_{2} and x1x_{1}, which is in equation (72). Thus buyer kk can increase his payoff by setting the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}, which is a contradiction to Nash equilibrium.

  2. 2.

    Users’ strategy support does not include point x1x_{1}^{{}^{\prime}}. There must exist a sufficiently small δ3>0\delta_{3}>0, such that x1+δ3x_{1}^{{}^{\prime}}+\delta_{3} belongs to the support of users’ strategy and satisfies following condition:

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n){[1GkNE(x1)]n[GkNE(x1)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\Bigg{\{}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    [1GkNE(x1+δ3)]n[GkNE(x1+δ3)]min{AthAA,K,N}1n}n+1Ad<x1x12.\displaystyle-[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\Bigg{\}}\lceil\frac{n+1}{A}\rceil d<\frac{x_{1}^{{}^{\prime}}-x_{1}}{2}.

    (there must exist δ3\delta_{3} satisfy the above condition, as x1+δ3x_{1}^{{}^{\prime}}+\delta_{3} can be arbitrarily close to x1x_{1}^{{}^{\prime}}, otherwise we can always consider a larger x1x_{1}^{{}^{\prime}} where the CDF is constant over [x1,x1][x_{1},x_{1}^{{}^{\prime}}]) At mixed strategy Nash equilibrium, any strategy support yields same expected payoff. Thus, buyer kk’s expected payoff can be calculated at fee-per-byte equaling x1+δ3x_{1}^{\prime}+\delta_{3}. The matching utility is

    n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (75)

    The sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1+δ3)]n[GkNE(x1+δ3)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    [(x1+δ3)+n+1Ad].\displaystyle[(x_{1}^{{}^{\prime}}+\delta_{3})+\lceil\frac{n+1}{A}\rceil d].

    We consider buyer kk sets the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}. The matching surplus is the same as in (75). However, the sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1+x12)]n[GkNE(x1+x12)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})]^{n}[G_{k}^{\rm NE}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    (x1+x12+n+1Ad)\displaystyle(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}+\lceil\frac{n+1}{A}\rceil d)
    =\displaystyle= n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(x1)]n[GkNE(x1)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    (x1+x12+n+1Ad).\displaystyle(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}+\lceil\frac{n+1}{A}\rceil d).

    We compare the payoff of setting the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2} and the mixed strategy μkNE\mu_{k}^{\rm NE}, we have

    uk(x1+x12)uk(x1+δ3)\displaystyle u_{k}(\frac{x_{1}^{{}^{\prime}}+x_{1}}{2})-u_{k}(x_{1}^{{}^{\prime}}+\delta_{3})
    =\displaystyle= (x1x12+δ3)n=0min{AthAA,K,N}1(min{AthAA,K,N}1n){[1GkNE(x1)]n[GkNE(x1)]min{AthAA,K,N}1n\displaystyle(\frac{x_{1}^{{}^{\prime}}-x_{1}}{2}+\delta_{3})-\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\Bigg{\{}[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    [1GkNE(x1+δ3)]n[GkNE(x1+δ3)]min{AthAA,K,N}1n}n+1Ad>0.\displaystyle-[1-G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{n}[G_{k}^{\rm NE}(x_{1}^{{}^{\prime}}+\delta_{3})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\Bigg{\}}\lceil\frac{n+1}{A}\rceil d>0.

    Note that the matching utilities are the same when buyer kk set the transaction fee as x1+δ2x_{1}+\delta_{2} and x1x_{1}, which is in equation (75). Thus buyer kk can increase his payoff by setting the transaction fee as x1+x12\frac{x_{1}^{{}^{\prime}}+x_{1}}{2}, which is a contradiction to Nash equilibrium.

Thus, we have proved that the CDF GkNEG_{k}^{\rm NE} is strictly increasing over [L,U][L,U]. This completes the proof of Lemma 2.3.

Lemma 2.4. We use μkNE\mu_{k}^{\rm NE} to represent buyer kk’s strategy at mixed strategy Nash equilibrium, LL and UU to represent the strategy of transaction fee’s lower and upper support, and GkNE(fkrmbuy)G_{k}^{\rm NE}(f_{k}^{rmbuy}) to represent the CDF of the strategy of transaction fee-per-byte. Then L=σthbuy(Ath,A)+ϵL=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon and U=σthbuy(Ath,A)+ϵ+min{AthAA,K,N}AdU=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d.

Proof of Lemma 2.4.

We prove by contradiction. Note that Lemma 2.1 has proved that Lσthbuy(Ath,A)+ϵL\geq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon. Hence, we assume L>σthbuy(Ath,A)+ϵL>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, we will construct a strategy that achieves higher payoff than equilibrium strategy. Notice that as we will focus on a particular buyer kk’s payoff, we will denote his payoff function as uk(fkbuy)u_{k}(f_{k}^{\rm buy}) to simplify the notation.

When L>σthbuy(Ath,A)+ϵL>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon. There are two cases:

  • User ii’s transaction fee strategy support at mixed strategy Nash equilibrium includes point LL. At mixed strategy Nash equilibrium, any strategy support yields same expected payoff. Thus, buyer kk’s expected payoff can be calculated at fee-per-byte equaling LL. The matching utility is

    n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (76)

    The sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(L)]n[GkNE(L)]min{AthAA,K,N}1n(L+n+1Ad)\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(L)]^{n}[G_{k}^{\rm NE}(L)]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(L+\lceil\frac{n+1}{A}\rceil d)
    =\displaystyle= L+min{AthAA,K,N}Ad.\displaystyle L+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d.

    We consider buyer kk sets the transaction fee as σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon. The matching surplus is the same as in (76). However, the sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(L)]n[GkNE(L)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(L)]^{n}[G_{k}^{\rm NE}(L)]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    (σthbuy(Ath,A)+ϵ+n+1Ad)\displaystyle(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{n+1}{A}\rceil d)
    =\displaystyle= (σthbuy(Ath,A)+ϵ+n+1Ad)\displaystyle(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{n+1}{A}\rceil d)
    <\displaystyle< L+min{AthAA,K,N}Ad.\displaystyle L+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d.

    Note that the matching utilities are the same when buyer kk set the transaction fee as x1+δ2x_{1}+\delta_{2} and x1x_{1}, which is in equation (76). Thus buyer kk can increase his payoff by setting the transaction fee as σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, which is a contradiction to Nash equilibrium.

  • Users’ strategy support does not include point LL. Note that there exist a sufficiently small δ4>0\delta_{4}>0, such that L+δ4L+\delta_{4} belongs to the support of users’ strategy at mixed strategy Nash equilibrium and satisfies following condition:

    min{AthAA,K,N}Adn=0min{AthAA,K,N}1(min{AthAA,K,N}1n)\displaystyle\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d-\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}
    [1GkNE(L+δ4)]n[GkNE(L+δ4)]min{AthAA,K,N}1nn+1Ad\displaystyle[1-G_{k}^{\rm NE}(L+\delta_{4})]^{n}[G_{k}^{\rm NE}(L+\delta_{4})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\lceil\frac{n+1}{A}\rceil d
    <(Lσthbuy(Ath,A)ϵ).\displaystyle<(L-\sigma_{th}^{\rm buy}(A_{th},A)-\epsilon).

    (there must exist δ4\delta_{4} satisfy the above condition, as L+δ4L+\delta_{4} can be arbitrarily close to LL, otherwise LL is not the lower bound.) At mixed strategy Nash equilibrium, any strategy support yields same expected payoff. Thus, buyer kk’s expected payoff can be calculated at fee-per-byte equaling L+δ4L+\delta_{4}. The matching utility is

    n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (77)

    The sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(L+δ4)]n[GkNE(L+δ4)]min{AthAA,K,N}1n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(L+\delta_{4})]^{n}[G_{k}^{\rm NE}(L+\delta_{4})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}
    (L+δ4+n+1Ad).\displaystyle(L+\delta_{4}+\lceil\frac{n+1}{A}\rceil d).

    We consider buyer kk sets the transaction fee as σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon. The matching surplus is the same as in (77). However, the sum of fee and delay cost is

    n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1GkNE(σthbuy(Ath,A)+ϵ)]n\displaystyle\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1-G_{k}^{\rm NE}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon)]^{n}
    [GkNE(σthbuy(Ath,A)+ϵ)]min{AthAA,K,N}1n(σthbuy(Ath,A)+ϵ+n+1Ad)\displaystyle[G_{k}^{\rm NE}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon)]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{n+1}{A}\rceil d)
    =\displaystyle= σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad.\displaystyle\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d.

    We compare the payoff of adopting pure strategy σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon and the mixed strategy μkNE\mu_{k}^{\rm NE}, we have

    uk(σthbuy(Ath,A)+ϵ)uk(L+δ4)=σthbuy(Ath,A)ϵmin{AthAA,K,N}Ad+L+δ4\displaystyle u_{k}(\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon)-u_{k}(L+\delta_{4})=-\sigma_{th}^{\rm buy}(A_{th},A)-\epsilon-\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d+L+\delta_{4}
    +n=0min{AthAA,K,N}1(min{AthAA,K,N}1n){[1GkNE(L+δ4)]}n[GkNE(L+δ4)]min{AthAA,K,N}1nn+1Ad\displaystyle+\sum_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}\{[1-G_{k}^{\rm NE}(L+\delta_{4})]\}^{n}[G_{k}^{\rm NE}(L+\delta_{4})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}\lceil\frac{n+1}{A}\rceil d
    >\displaystyle> δ4\displaystyle\delta_{4}
    >\displaystyle> 0.\displaystyle 0.

    Thus buyer kk can increase his payoff by setting the transaction fee as σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, which is a contradiction to Nash equilibrium.

This completes the proof of L=σthbuy(Ath,A)+ϵL=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon.

Next we prove U=σthbuy(Ath,A)+ϵ+min{AthAA,K,N}AdU=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d by contradiction.

Note that Lemma 2.1 has proved that Uσthbuy(Ath,A)+ϵ+min{AthAA,K,N}AdU\leq\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d. Then we assume U<σthbuy(Ath,A)+ϵ+min{AthAA,K,N}AdU<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d. Notice that any strategy within the strategy support yields same expected payoff and strategy support of fee-per-byte must include L=σthbuy(Ath,A)+ϵL=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon. Then we consider buyer kk sets transaction fee as fkbuy=Uf_{k}^{\rm buy}=U. The matching utility is

n=1min{AthAA,N}𝟙(RkCn)min{bk,qn}(RkCn)2n=1min{AthAA,N}𝟙(RkCn).\frac{\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})\min\{b_{k},q_{n}\}(R_{k}-C_{n})}{2\sum_{n=1}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,N\}}\mathbbm{1}(R_{k}\geq C_{n})}. (78)

The sum of fee and delay cost is UU. However, for buyer kk sets the transaction fee as LL, the sum of fee and delay cost is

σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad>U.\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d>U. (79)

Thus, different strategies within the strategy support yield different expected payoffs, which is a contradiction to mixed strategy Nash equilibrium. Thus, we have proved that U=σthbuy(Ath,A)+ϵ+min{AthAA,K,N}AdU=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d.

This completes the proof of Lemma 2.4.

Finally we prove the CDF of transaction fee GkNE(fkbuy)G_{k}^{\rm NE}(f_{k}^{\rm buy}) satisfies Equation (35). Notice that any strategy within the strategy support yields same expected payoff and strategy support of fee must include σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon, thus for any strategy fkbuy[σthbuy(Ath,A)+ϵ,σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad]f_{k}^{\rm buy}\in[\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon,\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d], the expected payoff of strategy fkbuyf_{k}^{\rm buy} and strategy σthbuy(Ath,A)+ϵ\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon should be the same, which is:

n=0min{AthAA,K,N}1(min{AthAA,K,N}1n)[1\displaystyle\sum\limits_{n=0}^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}\binom{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1}{n}[1- GkNE(fkbuy)]n[GkNE(fkbuy)]min{AthAA,K,N}1n(fkbuy+n+1Ad)\displaystyle G_{k}^{\rm NE}(f_{k}^{\rm buy})]^{n}[G_{k}^{\rm NE}(f_{k}^{\rm buy})]^{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}-1-n}(f_{k}^{\rm buy}+\lceil\frac{n+1}{A}\rceil d) (80)
=σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad\displaystyle=\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d
\displaystyle\big{\Downarrow}
g(1GkNE(fkbuy),fkbuy,min{AthAA,K,N},A)\displaystyle g(1-G_{k}^{\rm NE}(f_{k}^{\rm buy}),f_{k}^{\rm buy},\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\},A) =g(1,σthbuy(Ath,A)+ϵ,min{AthAA,K,N},A).\displaystyle=g(1,\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon,\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\},A).

When fkbuy[σthbuy(Ath,A)+ϵ,σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad]f_{k}^{\rm buy}\not\in[\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon,\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d], then fkbuyf_{k}^{\rm buy} no longer belongs to the strategy support and we have

GkNE(fkbuy)={0,if fkbuy<σthbuy(Ath,A)+ϵ,1,if fkbuy>σthbuy(Ath,A)+ϵ+min{AthAA,K,N}Ad.G_{k}^{\rm NE}(f_{k}^{\rm buy})=\begin{cases}0,&\text{if $f_{k}^{\rm buy}<\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon$,}\\ 1,&\text{if $f_{k}^{\rm buy}>\sigma_{th}^{\rm buy}(A_{th},A)+\epsilon+\lceil\frac{\min\{\lceil\frac{A_{th}}{A}\rceil A,K,N\}}{A}\rceil d$.}\end{cases} (81)

Based on Equations (80) and (81), we complete the proof of Proposition 2.

VII-C Existing BBOB System PoA Analysis

Proof of Theorem 2.

We prove this result by constructing two cases where price of anarchy (PoA) is infinity.

We first construct an example where setting the block size too high leads to infinity PoA. We consider a 2-buyer-2-seller example illustrated in Fig. 11, which satisfies C1+2ϵ=R2<C2=R12ϵC_{1}+2\epsilon=R_{2}<C_{2}=R_{1}-2\epsilon. Hence, it means R1C1R_{1}\geq C_{1} and R2<C2R_{2}<C_{2}. We consider the buying quantities and selling quantities are all 1. Under such setting, we consider the case A2A\geq 2.

Refer to caption
Figure 11: Buyer’s utility and seller’s cost

At Nash equilibrium of Stage I, users will set the transaction fee as in Table II.

TABLE II: Stage I Equilibrium under C1+2ϵ=R2<C2=R12ϵC_{1}+2\epsilon=R_{2}<C_{2}=R_{1}-2\epsilon and A>1A>1
1 2
Buyer ϵ\epsilon ϵ\epsilon
Seller ϵ\epsilon ϵ\epsilon

For this example, the social welfare is

sw=R1+R2C1C2=4ϵ.sw=R_{1}+R_{2}-C_{1}-C_{2}=4\epsilon. (82)

The social optimum is to match R1R_{1} with C2C_{2}, which is

swopt=R1C2.sw^{\rm opt}=R_{1}-C_{2}. (83)

The ratio between social optimum and social welfare is

swoptsw=R1C24ϵ.\frac{sw^{\rm opt}}{sw}=\frac{R_{1}-C_{2}}{4\epsilon}. (84)

As long as we choose R1C2R_{1}-C_{2} to be sufficiently large, PoA, which is largest possible ratio is unbounded.

This completes the construction of the example where setting the block size too high leads to infinity PoA.

We then construct an example where setting the block size too low leads to infinity PoA.

We consider a 2-buyer-2-seller example illustrated in Fig. 12, which satisfies C1<C2+2ϵ<R2<R1C_{1}<C_{2}+2\epsilon<R_{2}<R_{1}. We consider the buying quantities and selling quantities are all 1. Hence, under such setting, we consider the case A<2A<2.

Refer to caption
Figure 12: Buyer’s utility and seller’s cost

Based on users’ fee equilibrium characterized by Propositions 1 and 2, miners must record all transactions in blockchain: 2 transactions in the first block and 2 transactions in the second block. Hence, the social welfare is

sw=R1+R2C1C22d.sw=R_{1}+R_{2}-C_{1}-C_{2}-2d. (85)

The social optimum is to record all transactions in the first block, which is

swopt=R1+R2C1C2>0.sw^{\rm opt}=R_{1}+R_{2}-C_{1}-C_{2}>0. (86)

The ratio between social optimum and social welfare is

swoptsw=R1+R2C1C2R1+R2C1C22d.\frac{sw^{\rm opt}}{sw}=\frac{R_{1}+R_{2}-C_{1}-C_{2}}{R_{1}+R_{2}-C_{1}-C_{2}-2d}. (87)

Then we have

limd(R1+R2C1C22)+swoptsw=limd(R1+R2C1C22)+R1+R2C1C2R1+R2C1C22d=.\lim\limits_{d\rightarrow(\frac{R_{1}+R_{2}-C_{1}-C_{2}}{2})^{+}}\frac{sw^{\rm opt}}{sw}=\lim\limits_{d\rightarrow(\frac{R_{1}+R_{2}-C_{1}-C_{2}}{2})^{+}}\frac{R_{1}+R_{2}-C_{1}-C_{2}}{R_{1}+R_{2}-C_{1}-C_{2}-2d}=\infty. (88)

As long as we choose delay cost dd to be sufficiently close to R1+R2C1C22\frac{R_{1}+R_{2}-C_{1}-C_{2}}{2}, PoA, which is largest possible ratio is unbounded.

This completes the construction of the example where setting the block size too low leads to infinity PoA.

This completes the proof of Theorem 2.

VII-D Stage 0 Analysis

VII-D1 Adjustable Block Size Mechanism for Complete Information

Proof of Theorem 3.

We first prove the result for homogeneous trading quantity b¯=b¯\underline{b}=\overline{b}, by showing AthA_{th} can achieve the social optimum under the three cases.

To simplify the notation, we consider b¯=b¯=1\underline{b}=\overline{b}=1. For b¯=b¯1\underline{b}=\overline{b}\not=1, we can just multiply the social welfare and social optimum by a linear factor of b¯\underline{b}.

  1. 1.

    Case 1: As illustrated in Fig. 13, buying utility and selling cost satisfy R1<C1R_{1}<C_{1}.

    Refer to caption
    Figure 13: Buyer’s utility and seller’s cost when R1<C1R_{1}<C_{1}

    Under this case, there is no possible match. Hence, the social optimum is zero. Any block size AA also yields no match and corresponding social welfare is zero. Hence, any AthA_{th} achieves social optimum.

  2. 2.

    Case 2: As illustrated in Fig. 14, buying utility and selling cost satisfy RKCNR_{K}\geq C_{N}.

    Refer to caption
    Figure 14: Buyer’s utility and seller’s cost when RKCNR_{K}\geq C_{N}

    Hence, the social optimum is as follows:

    swopt=n=1min{K,N}(RnCn).sw^{\rm opt}=\sum_{n=1}^{\min\{K,N\}}(R_{n}-C_{n}). (89)

    We consider three subcases to show that Ath=min{K,N}A_{th}=\min\{K,N\} achieves social optimum.

    1. (a)

      If K=NK=N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, the following strategies constitute a Nash equilibrium:

      fnsell,NE=fkbuy,NE=ϵ,n𝒩,k𝒦.\displaystyle f_{n}^{\rm sell,NE}=f_{k}^{\rm buy,NE}=\epsilon,\quad\forall n\in\mathcal{N},\forall k\in\mathcal{K}. (90)

      Under such an equilibrium, miners randomly match buying and selling transactions. Even though a buyer or a seller deviates to higher fee, he is still randomly matched. For this subcase, the social welfare is:

      sw=n𝒩(RnCn)=swopt.sw=\sum_{n\in\mathcal{N}}(R_{n}-C_{n})=sw^{\rm opt}. (91)

      Hence, Ath=min{K,N}A_{th}=\min\{K,N\} achieves social optimum.

    2. (b)

      If K>NK>N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, the following strategies constitute a Nash equilibrium:

      fkbuy,NE={n=1N(RN+1Cn)2N+ϵ,if kN.n=1N(RN+1Cn)2N,if k>N.\displaystyle f_{k}^{\rm buy,NE}=\begin{cases}\dfrac{\sum_{n=1}^{N}(R_{N+1}-C_{n})}{2N}+\epsilon,&\text{if $k\leq N$.}\\ \dfrac{\sum_{n=1}^{N}(R_{N+1}-C_{n})}{2N},&\text{if $k>N$.}\end{cases} (92)
      fnsell,NE=0,n𝒩.\displaystyle f_{n}^{\rm sell,NE}=0,\quad\forall n\in\mathcal{N}. (93)

      Under such an equilibrium, for buyer with index k>Nk>N, they pay the maximal fee they can afford; while for buyer with index kNk\leq N, they pay the maximal fee ϵ\epsilon higher than the buyer with index k>Nk>N. For this subcase, the social welfare is:

      sw=n𝒩(RnCn)=swopt.sw=\sum_{n\in\mathcal{N}}(R_{n}-C_{n})=sw^{\rm opt}. (94)

      Hence, Ath=min{K,N}A_{th}=\min\{K,N\} achieves social optimum.

    3. (c)

      If K<NK<N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, then the following strategies constitute a Nash equilibrium:

      fkbuy,NE=0,k𝒦,\displaystyle f_{k}^{\rm buy,NE}=0,\quad\forall k\in\mathcal{K}, (95)
      fnsell,NE={k=1K(RkCK+1)2K+ϵ,if nK,k=1K(RkCK+1)2K,if n>K.\displaystyle f_{n}^{\rm sell,NE}=\begin{cases}\dfrac{\sum_{k=1}^{K}(R_{k}-C_{K+1})}{2K}+\epsilon,&\text{if $n\leq K$,}\\ \dfrac{\sum_{k=1}^{K}(R_{k}-C_{K+1})}{2K},&\text{if $n>K$.}\end{cases} (96)

      Under such an equilibrium, for seller with index n>Kn>K, they pay the maximal fee they can afford; while for seller with index nKn\leq K, they pay the maximal fee ϵ\epsilon higher than the buyer with index n>Kn>K. For this subcase, the social welfare and social optimum are the same:

      sw=k𝒦(RkCk)=swopt.sw=\sum_{k\in\mathcal{K}}(R_{k}-C_{k})=sw^{\rm opt}. (97)

      Hence, Ath=min{K,N}A_{th}=\min\{K,N\} achieves social optimum.

  3. 3.

    Case 3: As illustrated in Fig. 15, there exists jj such that RjCjR_{j}\geq C_{j} and Rj+1<Cj+1R_{j+1}<C_{j+1}.

    Refer to caption
    Figure 15: Buyer’s utility and seller’s cost when RjCjR_{j}\geq C_{j} and Rj+1<Cj+1R_{j+1}<C_{j+1}

    Hence, the social optimum is as follows:

    swopt=i=1j(RiCi).sw^{\rm opt}=\sum_{i=1}^{j}(R_{i}-C_{i}). (98)

    Under Ath=jA_{th}=j, the following strategy constitutes a NE:

    fkbuy,NE={0,if 1kj and Rj+1<C1,i=1j𝟙(Rj+1Ci)[Rj+1Ci]2i=1j𝟙(Rj+1Ci)+ϵ,if 1kj and Rj+1C1,0,if kj+1 and Rj+1<C1,i=1j𝟙(Rj+1Ci)[Rj+1Ci]2i=1j𝟙(Rj+1Ci),if kj+1 and Rj+1C1,\displaystyle f_{k}^{\rm buy,NE}=\begin{cases}0,&\text{if $1\leq k\leq j$ and $R_{j+1}<C_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})[R_{j+1}-C_{i}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})}+\epsilon,&\text{if $1\leq k\leq j$ and $R_{j+1}\geq C_{1}$,}\\ 0,&\text{if $k\geq j+1$ and $R_{j+1}<C_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})[R_{j+1}-C_{i}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})},&\text{if $k\geq j+1$ and $R_{j+1}\geq C_{1}$,}\end{cases} (99)
    fnsell,NE={0,if 1nj and Cj+1>R1,i=1j𝟙(RiCj+1)[RiCj+1]2i=1j𝟙(RiCj+1)+ϵ,if 1nj and Cj+1R1.0,if nj+1 and Cj+1>R1,i=1j𝟙(RiCj+1)[RiCj+1]2i=1j𝟙(RiCj+1),if nj+1 and Cj+1R1.\displaystyle f_{n}^{\rm sell,NE}=\begin{cases}0,&\text{if $1\leq n\leq j$ and $C_{j+1}>R_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})[R_{i}-C_{j+1}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})}+\epsilon,&\text{if $1\leq n\leq j$ and $C_{j+1}\leq R_{1}$.}\\ 0,&\text{if $n\geq j+1$ and $C_{j+1}>R_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})[R_{i}-C_{j+1}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})},&\text{if $n\geq j+1$ and $C_{j+1}\leq R_{1}$.}\end{cases} (100)

    For this case, the social welfare is:

    sw=i=1j(RiCi)=swopt.sw=\sum_{i=1}^{j}(R_{i}-C_{i})=sw^{\rm opt}. (101)

    Hence, Ath=jA_{th}=j achieves social optimum.

To sum up, for homogeneous trading quantity b¯=b¯\underline{b}=\overline{b} and setting the block size as A=AthA=A_{th}, the social welfare always equals social optimum. Hence, the PoA of homogeneous trading quantity b¯=b¯\underline{b}=\overline{b} is PoA = 1.

This completes the proof of for homogeneous trading quantity b¯=b¯\underline{b}=\overline{b}.

Next, we prove the case of heterogeneous trading quantities by analyzing the PoA under the three cases.

  1. 1.

    Case 1: As illustrated in Fig. 16, buying utility and selling cost satisfy R1<C1R_{1}<C_{1}. Under this case, there is no possible match. Hence, the social optimum is zero. Any block size AA also yields no match and corresponding social welfare is zero. Hence, any block size achieves social optimum. We have PoA b¯b¯\leq\frac{\overline{b}}{\underline{b}}.

    Refer to caption
    Figure 16: Buyer’s utility and seller’s cost when R1<C1R_{1}<C_{1}
  2. 2.

    Case 2: As illustrated in Fig. 17, buying utility and selling cost satisfy RKCNR_{K}\geq C_{N}.

    Refer to caption
    Figure 17: Buyer’s utility and seller’s cost when RKCNR_{K}\geq C_{N}

    Hence, the social optimum is as follows:

    swopt=n𝒩k𝒦xknmin{bk,qn}(RkCn)b¯n=1min{K,N}(RnCn).sw^{\rm opt}=\sum_{n\in\mathcal{N}}\sum_{k\in\mathcal{K}}x_{kn}\min\{b_{k},q_{n}\}(R_{k}-C_{n})\leq\overline{b}\sum_{n=1}^{\min\{K,N\}}(R_{n}-C_{n}). (102)

    We consider three subcases to show the social welfare of setting block size as Ath=min{K,N}A_{th}=\min\{K,N\}.

    1. (a)

      If K=NK=N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, the following strategies constitute a Nash equilibrium:

      fnsell=fkbuy=ϵ,n𝒩,k𝒦.\displaystyle f_{n}^{\rm sell}=f_{k}^{\rm buy}=\epsilon,\quad\forall n\in\mathcal{N},\forall k\in\mathcal{K}. (103)

      Under such an equilibrium, miners randomly match buying and selling transactions. Even though a buyer or a seller deviates to higher fee, he is still randomly matched. For this subcase, the social welfare satisfies:

      swb¯n𝒩(RnCn).sw\geq\underline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (104)

      Moreover, the social optimum satisfies:

      swoptb¯n𝒩(RnCn).sw^{\rm opt}\leq\overline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (105)

      Hence, the ratio between social optimum and social welfare satisfies

      swoptswb¯b¯.\frac{sw^{\rm opt}}{sw}\leq\frac{\overline{b}}{\underline{b}}. (106)
    2. (b)

      If K>NK>N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, the following strategies constitute a Nash equilibrium:

      fkbuy={n=1Nmin{bN+1,qn}(RN+1Cn)2N+ϵ,if kN.n=1Nmin{bN+1,qn}(RN+1Cn)2N,if k>N.\displaystyle f_{k}^{\rm buy}=\begin{cases}\dfrac{\sum_{n=1}^{N}\min\{b_{N+1},q_{n}\}(R_{N+1}-C_{n})}{2N}+\epsilon,&\text{if $k\leq N$.}\\ \dfrac{\sum_{n=1}^{N}\min\{b_{N+1},q_{n}\}(R_{N+1}-C_{n})}{2N},&\text{if $k>N$.}\end{cases} (107)
      fnsell=0,n𝒩.\displaystyle f_{n}^{\rm sell}=0,\quad\forall n\in\mathcal{N}. (108)

      Under such an equilibrium, for buyer with index k>Nk>N, they pay the maximal fee they can afford; while for buyer with index kNk\leq N, they pay the maximal fee ϵ\epsilon higher than the buyer with index k>Nk>N. For this subcase, the social welfare satisfies:

      swb¯n𝒩(RnCn).sw\geq\underline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (109)

      Moreover, the social optimum satisfies:

      swoptb¯n𝒩(RnCn).sw^{\rm opt}\leq\overline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (110)

      Hence, the ratio between social optimum and social welfare satisfies

      swoptswb¯b¯.\frac{sw^{\rm opt}}{sw}\leq\frac{\overline{b}}{\underline{b}}. (111)
    3. (c)

      If k<Nk<N, then under Ath=min{K,N}A_{th}=\min\{K,N\}, then the following strategies constitute a Nash equilibrium:

      fkbuy=0,k𝒦,\displaystyle f_{k}^{\rm buy}=0,\quad\forall k\in\mathcal{K}, (112)
      fnsell={k=1Kmin{bk,qK+1}(RkCK+1)2K+ϵ,if nK,k=1Kmin{bk,qK+1}(RkCK+1)2K,if n>K.\displaystyle f_{n}^{\rm sell}=\begin{cases}\dfrac{\sum_{k=1}^{K}\min\{b_{k},q_{K+1}\}(R_{k}-C_{K+1})}{2K}+\epsilon,&\text{if $n\leq K$,}\\ \dfrac{\sum_{k=1}^{K}\min\{b_{k},q_{K+1}\}(R_{k}-C_{K+1})}{2K},&\text{if $n>K$.}\end{cases} (113)

      Under such an equilibrium, for seller with index n>Kn>K, they pay the maximal fee they can afford; while for seller with index nKn\leq K, they pay the maximal fee ϵ\epsilon higher than the buyer with index n>Kn>K. For this subcase, the social welfare satisfies:

      swb¯n𝒩(RnCn).sw\geq\underline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (114)

      Moreover, the social optimum satisfies:

      swoptb¯n𝒩(RnCn).sw^{\rm opt}\leq\overline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (115)

      Hence, the ratio between social optimum and social welfare satisfies

      swoptswb¯b¯.\frac{sw^{\rm opt}}{sw}\leq\frac{\overline{b}}{\underline{b}}. (116)
  3. 3.

    Case 3: As illustrated in Fig. 18, there exists jj such that RjCjR_{j}\geq C_{j} and Rj+1<Cj+1R_{j+1}<C_{j+1}.

    Refer to caption
    Figure 18: Buyer’s utility and seller’s cost when RjCjR_{j}\geq C_{j} and Rj+1<Cj+1R_{j+1}<C_{j+1}

    Hence, the social optimum is as follows:

    swopt=n𝒩k𝒦xknmin{bk,qn}(RkCn)b¯i=1j(RiCi).sw^{\rm opt}=\sum_{n\in\mathcal{N}}\sum_{k\in\mathcal{K}}x_{kn}\min\{b_{k},q_{n}\}(R_{k}-C_{n})\leq\overline{b}\sum_{i=1}^{j}(R_{i}-C_{i}). (117)

    Under Ath=kA_{th}=k, the following strategy constitutes a NE:

    fkbuy={0,if 1kj and Rj+1<C1,i=1j𝟙(Rj+1Ci)min{bj+1,qi}[Rj+1Ci]2i=1j𝟙(Rj+1Ci)+ϵ,if 1kj and Rj+1C1,0,if kj+1 and Rj+1<C1,i=1j𝟙(Rj+1Ci)min{bj+1,qi}[Rj+1Ci]2i=1j𝟙(Rj+1Ci),if kj+1 and Rj+1C1,\displaystyle f_{k}^{\rm buy}=\begin{cases}0,&\text{if $1\leq k\leq j$ and $R_{j+1}<C_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})\min\{b_{j+1},q_{i}\}[R_{j+1}-C_{i}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})}+\epsilon,&\text{if $1\leq k\leq j$ and $R_{j+1}\geq C_{1}$,}\\ 0,&\text{if $k\geq j+1$ and $R_{j+1}<C_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})\min\{b_{j+1},q_{i}\}[R_{j+1}-C_{i}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{j+1}\geq C_{i})},&\text{if $k\geq j+1$ and $R_{j+1}\geq C_{1}$,}\end{cases} (118)
    fnsell={0,if 1nj and Cj+1>R1,i=1j𝟙(RiCj+1)min{bi,qj+1}[RiCj+1]2i=1j𝟙(RiCj+1)+ϵ,if 1nj and Cj+1R1.0,if nj+1 and Cj+1>R1,i=1j𝟙(RiCj+1)min{bi,qj+1}[RiCj+1]2i=1j𝟙(RiCj+1),if nj+1 and Cj+1R1.\displaystyle f_{n}^{\rm sell}=\begin{cases}0,&\text{if $1\leq n\leq j$ and $C_{j+1}>R_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})\min\{b_{i},q_{j+1}\}[R_{i}-C_{j+1}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})}+\epsilon,&\text{if $1\leq n\leq j$ and $C_{j+1}\leq R_{1}$.}\\ 0,&\text{if $n\geq j+1$ and $C_{j+1}>R_{1}$,}\\ \dfrac{\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})\min\{b_{i},q_{j+1}\}[R_{i}-C_{j+1}]}{2\sum_{i=1}^{j}\mathbbm{1}(R_{i}\geq C_{j+1})},&\text{if $n\geq j+1$ and $C_{j+1}\leq R_{1}$.}\end{cases} (119)

    For this case, the social welfare satisfies:

    swb¯n𝒩(RnCn).sw\geq\underline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (120)

    Moreover, the social optimum satisfies:

    swoptb¯n𝒩(RnCn).sw^{\rm opt}\leq\overline{b}\sum_{n\in\mathcal{N}}(R_{n}-C_{n}). (121)

    Hence, the ratio between social optimum and social welfare satisfies

    swoptswb¯b¯.\frac{sw^{\rm opt}}{sw}\leq\frac{\overline{b}}{\underline{b}}. (122)

To sum up, for heterogeneous trading quantity b¯b¯\underline{b}\not=\overline{b} and setting the block size as A=AthA=A_{th}, the ratio between social optimum and social welfare always satisfies

swoptswb¯b¯.\frac{sw^{\rm opt}}{sw}\leq\frac{\overline{b}}{\underline{b}}. (123)

Hence, the PoA of heterogeneous trading quantity b¯b¯\underline{b}\not=\overline{b} satisfies

PoAb¯b¯.\text{PoA}\leq\frac{\overline{b}}{\underline{b}}. (124)

This completes the proof of for heterogeneous trading quantity b¯b¯\underline{b}\not=\overline{b}.

This completes the proof of Theorem 3.

VII-D2 Adjustable Block Size Mechanism for Incomplete Information

Proof of Theorem 4.

To facilitate the proof, we define

ρ=KN,\rho=\frac{K}{N}, (125)

where ρ>0\rho>0 characterizes the ratio between number of buyers and sellers. Moreover, we first set the general block size as A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor with 0<δ<min{1,ρ}C(η)0<\delta<\min\{1,\rho\}-C(\eta), and then we evaluate a special case where δ=Nψ\delta=N^{-\psi}. Note that when δ=Nψ\delta=N^{-\psi}, the block size AA is exactly the block size set in Theorem 4.

Refer to caption
Figure 19: A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor illustration.

We illustrate how we set block size in Fig. 19. We explain why we set block size as A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor: We set block size as A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor. So on average, block 1 includes buying transactions with utility higher than R1(1C(η)+δρ)R^{-1}(1-\frac{C(\eta)+\delta}{\rho}) and selling transactions with cost lower than C1(C(η)+δ)C^{-1}(C(\eta)+\delta). For δ=Nψ>0\delta=N^{-\psi}>0, we have C1(C(η)+δ)>R1(1C(η)+δρ)C^{-1}(C(\eta)+\delta)>R^{-1}(1-\frac{C(\eta)+\delta}{\rho}). So for the unrecorded transactions, they are unlikely to be matched (probability they can be matched exponentially decreases with NN). Hence, for large NN, we do not need block 2 to record the rest transactions. This avoids the delay cost dd, achieving a constant approximation ratio.

We will first prove the homogeneous trading quantity of b¯=b¯\underline{b}=\overline{b}. In the proof, we will first estimates the social optimum. Next we estimate the social welfare loss when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor.

To simplify the notation, we consider b¯=b¯=1\underline{b}=\overline{b}=1 for homogeneous trading quantity. For b¯=b¯1\underline{b}=\overline{b}\not=1, we can just multiply the social welfare and social optimum by a linear factor of b¯\underline{b}.

Social optimum estimation: We denote the buying utilities in a decreasing order as R1R2RρNR_{1}\geq R_{2}\geq\cdots\geq R_{\rho N} and denote selling costs in an increasing order as C1C2CNC_{1}\leq C_{2}\leq\cdots\leq C_{N}. Then when RiCiR_{i}\geq C_{i}, the social optimum case should include it in blockchain. Hence, the social optimum can be derived as follows:

swopt=i=1min{ρN,N}(RiCi)𝔼[RiCi|RiCi].sw^{\rm opt}=\sum\limits_{i=1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. (126)

Note that RiR_{i} is the ρN+1i\rho N+1-i-th order statistics of ρN\rho N iid random variables (i.e., buying utilities). Moreover, CiC_{i} is ii-th order statistics of NN iid random variables (i.e., selling costs).

Refer to caption
Figure 20: Three parts to estimate swoptsw^{\rm opt}.

As illustrated in Fig. 20, we estimate swoptsw^{\rm opt} in equation (126) by three parts. Our estimation is to prove that when NN is large, part 1 are matched with probability 1, part 2’s match can be approximated, and part 3 are matched with probability of 0.

The detailed estimation is as follows:

swopt=\displaystyle sw^{\rm opt}= i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (127)
+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
+i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi].\displaystyle+\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}].

Here we estimate three parts of equation (127) as follows:

  1. 1.

    Estimation of i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. For 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, the expectation satisfies:

    𝔼[Ri]R1(1iρN+1)R1(1NC(η)δNρN+1)R1(1C(η)δρ).\displaystyle\mathbb{E}[R_{i}]\approx R^{-1}\left(1-\frac{i}{\rho N+1}\right)\geq R^{-1}\left(1-\frac{\lfloor NC(\eta)-\delta N\rfloor}{\rho N+1}\right)\approx R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right). (128)
    𝔼[Ci]C1(iN+1)C1(NC(η)δNN+1)C1(C(η)δ).\displaystyle\mathbb{E}[C_{i}]\approx C^{-1}\left(\frac{i}{N+1}\right)\leq C^{-1}\left(\frac{\lfloor NC(\eta)-\delta N\rfloor}{N+1}\right)\approx C^{-1}\left(C(\eta)-\delta\right). (129)

    The variance satisfies:

    Var(Ri)(ρN+1i)i(ρN)3[1r(R1(ρN+1iρN+1))]2.\displaystyle\text{Var}(R_{i})\approx\frac{(\rho N+1-i)i}{(\rho N)^{3}}\left[\frac{1}{r\left(R^{-1}(\frac{\rho N+1-i}{\rho N+1})\right)}\right]^{2}. (130)
    Var(Ci)i(N+1i)N3[1c(C1(iN+1))]2.\displaystyle\text{Var}(C_{i})\approx\frac{i(N+1-i)}{N^{3}}\left[\frac{1}{c\left(C^{-1}(\frac{i}{N+1})\right)}\right]^{2}. (131)

    Then RiR_{i} and CiC_{i} can be approximated by normal distribution when NN\rightarrow\infty.101010Based on asymptotic distribution of a central order statistics theorem. http://www.math.ntu.edu.tw/~hchen/teaching/LargeSample/notes/noteorder.pdfhttps://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9936687 Then to estimate the probability of RiCiR_{i}\geq C_{i}, we can use the standard method to estimate the probability of one normal-distributed random variable larger than another normal-distributed random variable as follows:

    μi𝔼[Ri]𝔼[Ci]=R1(1iρN+1)C1(iN+1).\displaystyle\mu_{i}\triangleq\mathbb{E}[R_{i}]-\mathbb{E}[C_{i}]=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right). (132)
    σi2Var(Ri)+Var(Ci).\displaystyle\sigma_{i}^{2}\triangleq\text{Var}(R_{i})+\text{Var}(C_{i}). (133)

    Given δ>0\delta>0, we have:

    μi=R1(1iρN+1)C1(iN+1)\displaystyle\mu_{i}=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right) R1(1C(η)δρ)C1(C(η)δ)\displaystyle\geq R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right) (134)
    >R1(1C(η)ρ)C1(C(η))\displaystyle>R^{-1}\left(1-\frac{C(\eta)}{\rho}\right)-C^{-1}\left(C(\eta)\right)
    =0.\displaystyle=0.

    Then for any 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, we have

    (RiCi)=(RiCiμiσiμiσi)=(Zμiσi),\mathbb{P}(R_{i}\geq C_{i})=\mathbb{P}\Big{(}\frac{R_{i}-C_{i}-\mu_{i}}{\sigma_{i}}\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}=\mathbb{P}\Big{(}Z\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}, (135)

    where ZZ is a standard normal variable. Moreover, we note that:

    μiNσi\displaystyle\hskip 14.22636pt\frac{\mu_{i}}{\sqrt{N}\sigma_{i}} (136)
    μNC(η)δNNσNC(η)δN\displaystyle\geq\frac{\mu_{\lfloor NC(\eta)-\delta N\rfloor}}{\sqrt{N}\sigma_{\lfloor NC(\eta)-\delta N\rfloor}}
    =R1(1C(η)δρ)C1(C(η)δ)[C(η)δ][ρC(η)+δ]ρ3[1r(R1(1C(η)δρ))]2+[C(η)δ][1C(η)+δ][1c(C1(C(η)δ))]2.\displaystyle=\frac{R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right)}{\sqrt{\frac{[C(\eta)-\delta][\rho-C(\eta)+\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)-\delta}{\rho})\right)}\right]^{2}+[C(\eta)-\delta][1-C(\eta)+\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)-\delta)\right)}\right]^{2}}}.

    and we define

    ΔR1(1C(η)δρ)C1(C(η)δ)[C(η)δ][ρC(η)+δ]ρ3[1r(R1(1C(η)δρ))]2+[C(η)δ][1C(η)+δ][1c(C1(C(η)δ))]2,\Delta\triangleq\frac{R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right)}{\sqrt{\frac{[C(\eta)-\delta][\rho-C(\eta)+\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)-\delta}{\rho})\right)}\right]^{2}+[C(\eta)-\delta][1-C(\eta)+\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)-\delta)\right)}\right]^{2}}}, (137)

    where Δ>0\Delta>0 is a constant given δ>0\delta>0. We use Φ\Phi to denote the CDF of standard normal distribution. For large NN and for any 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, equation (135) becomes:

    (RiCi)\displaystyle\mathbb{P}(R_{i}\geq C_{i}) =Φ(μiσi)\displaystyle=\Phi\Big{(}\frac{\mu_{i}}{\sigma_{i}}\Big{)} (138)
    Φ(μNC(η)δNσNC(η)δN)\displaystyle\geq\Phi\Big{(}\frac{\mu_{\lfloor NC(\eta)-\delta N\rfloor}}{\sigma_{\lfloor NC(\eta)-\delta N\rfloor}}\Big{)}
    =Φ(NΔ)\displaystyle=\Phi\Big{(}\sqrt{N}\Delta\Big{)}
    112πNΔeNΔ22\displaystyle\approx 1-\frac{1}{\sqrt{2\pi N}\Delta}e^{-\frac{N\Delta^{2}}{2}}
    1.\displaystyle\approx 1.

    Hence, we have:

    i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (139)
    \displaystyle\approx i=1NC(η)δN𝔼[RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[R_{i}-C_{i}]
    \displaystyle\approx i=1NC(η)δNR1(1iρN+1)C1(iN+1)\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right)
    =\displaystyle= [(ρN+1)i=1NC(η)δNR1(1iρN+1)ρN+1][(N+1)i=1NC(η)δNC1(iN+1)N+1]\displaystyle\left[(\rho N+1)\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\frac{R^{-1}\left(1-\frac{i}{\rho N+1}\right)}{\rho N+1}\right]-\left[(N+1)\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\frac{C^{-1}\left(\frac{i}{N+1}\right)}{N+1}\right]
    \displaystyle\approx [(ρN+1)1C(η)δρ1R1(x)𝑑x][(N+1)0C(η)δC1(x)𝑑x].\displaystyle\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx\right]-\left[(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right].
  2. 2.

    Estimation of i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. For this part, we have (RiCi)1\mathbb{P}(R_{i}\geq C_{i})\leq 1 and 𝔼[RiCi|RiCi]1\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\leq 1. Hence, we have

    i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]i=NC(η)δN+1NC(η)+δN12δN.\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\leq\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}1\leq 2\delta N. (140)
  3. 3.

    Estimation of i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. For NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, the expectation satisfies:

    𝔼[Ri]R1(1iρN+1)R1(1NC(η)+δN+1ρN+1)R1(1C(η)+δρ).\displaystyle\mathbb{E}[R_{i}]\approx R^{-1}\left(1-\frac{i}{\rho N+1}\right)\leq R^{-1}\left(1-\frac{\lfloor NC(\eta)+\delta N\rfloor+1}{\rho N+1}\right)\approx R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right). (141)
    𝔼[Ci]C1(iN+1)C1(NC(η)+δN+1N+1)C1(C(η)+δ).\displaystyle\mathbb{E}[C_{i}]\approx C^{-1}\left(\frac{i}{N+1}\right)\geq C^{-1}\left(\frac{\lfloor NC(\eta)+\delta N\rfloor+1}{N+1}\right)\approx C^{-1}\left(C(\eta)+\delta\right). (142)

    The variance satisfies:

    Var(Ri)(ρN+1i)i(ρN)3[1r(R1(ρN+1iρN+1))]2.\displaystyle\text{Var}(R_{i})\approx\frac{(\rho N+1-i)i}{(\rho N)^{3}}\left[\frac{1}{r\left(R^{-1}(\frac{\rho N+1-i}{\rho N+1})\right)}\right]^{2}. (143)
    Var(Ci)i(N+1i)N3[1c(C1(iN+1))]2.\displaystyle\text{Var}(C_{i})\approx\frac{i(N+1-i)}{N^{3}}\left[\frac{1}{c\left(C^{-1}(\frac{i}{N+1})\right)}\right]^{2}. (144)

    Then RiR_{i} and CiC_{i} can be approximated by normal distribution when NN\rightarrow\infty.111111Based on asymptotic distribution of a central order statistics theorem. http://www.math.ntu.edu.tw/~hchen/teaching/LargeSample/notes/noteorder.pdfhttps://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9936687 Then to estimate the probability of RiCiR_{i}\geq C_{i}, we can use the standard method to estimate the probability of one normal-distributed random variable larger than another normal-distributed random variable as follows:

    μi𝔼[Ri]𝔼[Ci]=R1(1iρN+1)C1(iN+1).\displaystyle\mu_{i}\triangleq\mathbb{E}[R_{i}]-\mathbb{E}[C_{i}]=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right). (145)
    σi2Var(Ri)+Var(Ci).\displaystyle\sigma_{i}^{2}\triangleq\text{Var}(R_{i})+\text{Var}(C_{i}). (146)

    Given δ>0\delta>0, we have:

    μi=R1(1iρN+1)C1(iN+1)\displaystyle\mu_{i}=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right) R1(1C(η)+δρ)C1(C(η)+δ)\displaystyle\leq R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)-C^{-1}\left(C(\eta)+\delta\right) (147)
    <R1(1C(η)ρ)C1(C(η))\displaystyle<R^{-1}\left(1-\frac{C(\eta)}{\rho}\right)-C^{-1}\left(C(\eta)\right)
    =0.\displaystyle=0.

    Then for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, we have

    (RiCi)=(RiCiμiσiμiσi)=(Zμiσi),\mathbb{P}(R_{i}\geq C_{i})=\mathbb{P}\Big{(}\frac{R_{i}-C_{i}-\mu_{i}}{\sigma_{i}}\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}=\mathbb{P}\Big{(}Z\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}, (148)

    where ZZ is a standard normal variable. Moreover, we note that:

    μiNσi\displaystyle\hskip 14.22636pt-\frac{\mu_{i}}{\sqrt{N}\sigma_{i}} (149)
    μNC(η)+δNNσNC(η)+δN\displaystyle\geq-\frac{\mu_{\lfloor NC(\eta)+\delta N\rfloor}}{\sqrt{N}\sigma_{\lfloor NC(\eta)+\delta N\rfloor}}
    =R1(1C(η)+δρ)+C1(C(η)+δ)[C(η)+δ][ρC(η)δ]ρ3[1r(R1(1C(η)+δρ))]2+[C(η)+δ][1C(η)δ][1c(C1(C(η)+δ))]2.\displaystyle=\frac{-R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)+C^{-1}\left(C(\eta)+\delta\right)}{\sqrt{\frac{[C(\eta)+\delta][\rho-C(\eta)-\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)+\delta}{\rho})\right)}\right]^{2}+[C(\eta)+\delta][1-C(\eta)-\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)+\delta)\right)}\right]^{2}}}.

    and we define

    Δ2R1(1C(η)+δρ)+C1(C(η)+δ)[C(η)+δ][ρC(η)δ]ρ3[1r(R1(1C(η)+δρ))]2+[C(η)+δ][1C(η)δ][1c(C1(C(η)+δ))]2,\Delta_{2}\triangleq\frac{-R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)+C^{-1}\left(C(\eta)+\delta\right)}{\sqrt{\frac{[C(\eta)+\delta][\rho-C(\eta)-\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)+\delta}{\rho})\right)}\right]^{2}+[C(\eta)+\delta][1-C(\eta)-\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)+\delta)\right)}\right]^{2}}}, (150)

    where Δ2>0\Delta_{2}>0 is a constant given δ>0\delta>0. We use Φ\Phi to denote the CDF of standard normal distribution. For large NN and for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, equation (148) becomes:

    (RiCi)\displaystyle\mathbb{P}(R_{i}\geq C_{i}) =Φ(μiσi)\displaystyle=\Phi\Big{(}\frac{\mu_{i}}{\sigma_{i}}\Big{)} (151)
    Φ(μNC(η)+δNσNC(η)+δN)\displaystyle\leq\Phi\Big{(}\frac{\mu_{\lfloor NC(\eta)+\delta N\rfloor}}{\sigma_{\lfloor NC(\eta)+\delta N\rfloor}}\Big{)}
    =Φ(NΔ2)\displaystyle=\Phi\Big{(}-\sqrt{N}\Delta_{2}\Big{)}
    =1Φ(NΔ2)\displaystyle=1-\Phi\Big{(}\sqrt{N}\Delta_{2}\Big{)}
    12πNΔ2eNΔ222\displaystyle\approx\frac{1}{\sqrt{2\pi N}\Delta_{2}}e^{-\frac{N\Delta_{2}^{2}}{2}}
    0.\displaystyle\approx 0.

    Hence, we have:

    i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]0.\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\approx 0. (152)

To sum up, we estimate swoptsw^{\rm opt} as

swopt=\displaystyle sw^{\rm opt}= i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (153)
+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
+i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
<\displaystyle< [(ρN+1)1C(η)δρ1R1(x)𝑑x][(N+1)0C(η)δC1(x)𝑑x]+2δN.\displaystyle\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx\right]-\left[(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right]+2\delta N.

Next we estimate the social welfare when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor. The social welfare when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor comprising of the following:

sw=\displaystyle sw= i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]sw1losssw2loss.\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]-sw^{\rm loss}_{1}-sw^{\rm loss}_{2}. (154)

The social welfare loss comes from two blocks sw1losssw^{\rm loss}_{1} and sw2losssw^{\rm loss}_{2}. We will compute them one by one.

  • The social welfare loss in block 1: The social welfare loss in block 1 comes from the situation that miners include some transactions to get fees, but these transactions reduces the social welfare.

    Refer to caption
    Figure 21: Social welfare loss due to R2R_{2} and C2C_{2}.

    Fig. 21 illustrates the social welfare loss due to R2R_{2} and C2C_{2}. The social optimum under such case is R1C1R_{1}-C_{1}. However, at Nash equilibrium, miners will match R1R_{1} with C2C_{2} and R2R_{2} with C1C_{1}, such that they can collect all transactions’ fees. This yields the social welfare of R1+R2C1C2R_{1}+R_{2}-C_{1}-C_{2}. Hence, the social welfare loss compared with social optimum for such a situation is C2R2C_{2}-R_{2}.

    Under A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor, the expected social welfare loss due to R2R_{2} and C2C_{2} is

    sw1,2loss=\displaystyle sw^{\rm loss}_{1,2}= (C1R2C2R1)𝔼[C2R2|C1R2C2R1]\displaystyle\mathbb{P}(C_{1}\leq R_{2}\leq C_{2}\leq R_{1})\mathbb{E}[C_{2}-R_{2}|C_{1}\leq R_{2}\leq C_{2}\leq R_{1}] (155)
    <\displaystyle< (R2C2)𝔼[C2R2|R2C2].\displaystyle\mathbb{P}(R_{2}\leq C_{2})\mathbb{E}[C_{2}-R_{2}|R_{2}\leq C_{2}].
    Refer to caption
    Figure 22: Social welfare loss due to R3R_{3} and C3C_{3}.

    Fig. 22 illustrates the social welfare loss due to R3R_{3} and C3C_{3}. The social optimum under such case is R1+R2C1C2R_{1}+R_{2}-C_{1}-C_{2}. However, miners will match R1R_{1} with C3C_{3}, R2R_{2} with C2C_{2}, and R3R_{3} with C1C_{1}. Such that they can collect all transactions’ fees. This yields the social welfare of R1+R2+R3C1C2C3R_{1}+R_{2}+R_{3}-C_{1}-C_{2}-C_{3}. Hence, the social welfare loss compared with the social optimum for such a situation is C3R3C_{3}-R_{3}.

    Under A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor, the expected social welfare loss due to R3R_{3} and C3C_{3} is

    sw1,3loss=\displaystyle sw^{\rm loss}_{1,3}= (C1R3C2R2C3R1)𝔼[C3R3|C1R3C2R2C3R1]\displaystyle\mathbb{P}(C_{1}\leq R_{3}\leq C_{2}\leq R_{2}\leq C_{3}\leq R_{1})\mathbb{E}[C_{3}-R_{3}|C_{1}\leq R_{3}\leq C_{2}\leq R_{2}\leq C_{3}\leq R_{1}] (156)
    <\displaystyle< (R3C3)𝔼[C3R3|R3C3].\displaystyle\mathbb{P}(R_{3}\leq C_{3})\mathbb{E}[C_{3}-R_{3}|R_{3}\leq C_{3}].

    We can use such method to calculate all the social welfare loss due to RiR_{i} and CiC_{i}, where i=2i=2 to NC(η)+δN\lfloor NC(\eta)+\delta N\rfloor. Hence the total expected social welfare loss from block 1 is

    sw1loss=\displaystyle sw^{\rm loss}_{1}= i=2NC(η)+δNsw1,iloss\displaystyle\sum_{i=2}^{\lfloor NC(\eta)+\delta N\rfloor}sw^{\rm loss}_{1,i} (157)
    <\displaystyle< i=2NC(η)+δN(RiCi)𝔼[CiRi|RiCi]\displaystyle\sum_{i=2}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]
    =\displaystyle= i=2NC(η)δN(RiCi)𝔼[CiRi|RiCi]+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[CiRi|RiCi].\displaystyle\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}].

    We estimate two parts one by one:

    1. 1.

      For i=2NC(η)δN(RiCi)𝔼[CiRi|RiCi]\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}], based on (138), we have

      (RiCi)0,2iNC(η)δN.\mathbb{P}(R_{i}\leq C_{i})\approx 0,\quad\forall 2\leq i\leq\lfloor NC(\eta)-\delta N\rfloor. (158)

      Hence, we have

      i=2NC(η)δN(RiCi)𝔼[CiRi|RiCi]0.\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]\approx 0. (159)
    2. 2.

      For i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[CiRi|RiCi]\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}], we have

      i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[CiRi|RiCi]\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}] (160)
      \displaystyle\leq i=NC(η)δN+1NC(η)+δN𝔼[CiRi|RiCi]\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]
      \displaystyle\leq i=NC(η)δN+1NC(η)+δN1\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}1
      =\displaystyle= 2δN.\displaystyle 2\delta N.

    This completes the computation of sw1losssw^{\rm loss}_{1}.

  • The social welfare loss in block 2: Note that based on equation (151), for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, we have

    (RiCi)0.\mathbb{P}(R_{i}\geq C_{i})\approx 0. (161)

    In other words, when NN\rightarrow\infty, the probability of there are transaction left for block 2 is zero. Hence, the social welfare loss due to block 2 is zero:

    sw2loss=0.sw^{\rm loss}_{2}=0. (162)

Based on all these discussions, we can estimate the ratio between social optimum and social welfare, under block size A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor when NN\rightarrow\infty:

swoptsw\displaystyle\hskip 11.38109pt\frac{sw^{\rm opt}}{sw} (163)
=swopti=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]sw1losssw2loss\displaystyle=\frac{sw^{\rm opt}}{\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]-sw^{\rm loss}_{1}-sw^{\rm loss}_{2}}
<swopti=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]sw1losssw2loss\displaystyle<\frac{sw^{\rm opt}}{\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]-sw^{\rm loss}_{1}-sw^{\rm loss}_{2}}
<[(ρN+1)1C(η)δρ1R1(x)𝑑x][(N+1)0C(η)δC1(x)𝑑x]+2δN[(ρN+1)1C(η)δρ1R1(x)𝑑x][(N+1)0C(η)δC1(x)𝑑x]2δN\displaystyle<\frac{\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx\right]-\left[(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right]+2\delta N}{\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx\right]-\left[(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right]-2\delta N}
ρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x+2δρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x2δ.\displaystyle\approx\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}.

Then, we will use the Squeeze Theorem to prove that PoA is 1 when setting δ=Nψ\delta=N^{-\psi}. Based on (163), the ratio between social optimum and social welfare satisfies:

1swoptswρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x+2δρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x2δ.1\leq\frac{sw^{\rm opt}}{sw}\leq\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}. (164)

First, for 1swoptsw1\leq\frac{sw^{\rm opt}}{sw}, we have

limNδ=Nψswoptsw1.\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{sw^{\rm opt}}{sw}\geq 1. (165)

Then, we analyze

swoptswρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x+2δρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x2δ.\frac{sw^{\rm opt}}{sw}\leq\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}. (166)

Note that the term ρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx in above equation must be higher than a strictly positive constant. The reason is as follows: based on equation (139), we have:

ρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x\displaystyle\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx (167)
=\displaystyle= limN[(ρN+1)1C(η)δρ1R1(x)𝑑x][(N+1)0C(η)δC1(x)𝑑x]N\displaystyle\lim\limits_{N\rightarrow\infty}\frac{\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx\right]-\left[(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right]}{N}
=\displaystyle= limNi=1NC(η)δNR1(1iρN+1)C1(iN+1)N\displaystyle\lim\limits_{N\rightarrow\infty}\frac{\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right)}{N}
=\displaystyle= limN[i=1NC(η)δN2R1(1iρN+1)C1(iN+1)]+[i=NC(η)δN2+1NC(η)δNR1(1iρN+1)C1(iN+1)]N\displaystyle\lim\limits_{N\rightarrow\infty}\frac{\left[\sum\limits_{i=1}^{\lfloor\frac{NC(\eta)-\delta N}{2}\rfloor}R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right)\right]+\left[\sum\limits_{i=\lfloor\frac{NC(\eta)-\delta N}{2}\rfloor+1}^{\lfloor NC(\eta)-\delta N\rfloor}R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right)\right]}{N}
>\displaystyle> limNNC(η)δN2[R1(1NC(η)δN2(ρN+1))C1(NC(η)δN2(N+1))]N\displaystyle\lim\limits_{N\rightarrow\infty}\frac{\lfloor\frac{NC(\eta)-\delta N}{2}\rfloor\left[R^{-1}\left(1-\frac{NC(\eta)-\delta N}{2(\rho N+1)}\right)-C^{-1}\left(\frac{NC(\eta)-\delta N}{2(N+1)}\right)\right]}{N}
+limNNC(η)δN2[R1(1NC(η)δNρN+1)C1(NC(η)δNN+1)]N\displaystyle+\lim\limits_{N\rightarrow\infty}\frac{\lfloor\frac{NC(\eta)-\delta N}{2}\rfloor\left[R^{-1}\left(1-\frac{NC(\eta)-\delta N}{\rho N+1}\right)-C^{-1}\left(\frac{NC(\eta)-\delta N}{N+1}\right)\right]}{N}
=\displaystyle= C(η)δ2[R1(1C(η)δ2ρ)C1(C(η)δ2)]\displaystyle\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)-\delta}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)-\delta}{2}\right)\right]
+C(η)δ2[R1(1C(η)δρ)C1(C(η)δ)]\displaystyle+\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right)\right]
>\displaystyle> C(η)δ2[R1(1C(η)2ρ)C1(C(η)2)]+C(η)δ2[R1(1C(η)ρ)C1(C(η))]\displaystyle\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)}{2}\right)\right]+\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)}{\rho}\right)-C^{-1}\left(C(\eta)\right)\right]
=\displaystyle= C(η)δ2[R1(1C(η)2ρ)C1(C(η)2)].\displaystyle\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)}{2}\right)\right].

Note that [R1(1C(η)2ρ)C1(C(η)2)]>0\left[R^{-1}\left(1-\frac{C(\eta)}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)}{2}\right)\right]>0. Moreover, when δ=Nψ\delta=N^{-\psi} and NN\rightarrow\infty, δ\delta must be smaller than C(η)2\frac{C(\eta)}{2}. Hence, equation (167) becomes:

ρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x\displaystyle\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx (168)
>\displaystyle> C(η)δ2[R1(1C(η)2ρ)C1(C(η)2)]\displaystyle\frac{C(\eta)-\delta}{2}\left[R^{-1}\left(1-\frac{C(\eta)}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)}{2}\right)\right]
>\displaystyle> C(η)4[R1(1C(η)2ρ)C1(C(η)2)]\displaystyle\frac{C(\eta)}{4}\left[R^{-1}\left(1-\frac{C(\eta)}{2\rho}\right)-C^{-1}\left(\frac{C(\eta)}{2}\right)\right]
>\displaystyle> 0.\displaystyle 0.

Based on equations (167) and (168), we have shown the term ρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx must be strictly positive. Hence, for equation (166), we have

limNδ=NψswoptswlimNδ=Nψρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x+2δρ1C(η)δρ1R1(x)𝑑x0C(η)δC1(x)𝑑x2δ=1.\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{sw^{\rm opt}}{sw}\leq\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}=1. (169)

Based on equations (165) and (169). we have

limNδ=Nψswoptsw=1.\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{sw^{\rm opt}}{sw}=1. (170)

This means that setting the block size as N(C(η)+Nψ)\lfloor N\big{(}C(\eta)+N^{-\psi}\big{)}\rfloor always achieves the social optimum. Hence, the PoA of homogeneous trading quantity b¯=b¯\underline{b}=\overline{b} is PoA = 1.

This completes the proof of for homogeneous trading quantity b¯=b¯\underline{b}=\overline{b}.

Proof for heterogeneous trading quantities: We will first estimate the social optimum. Next we estimate the social welfare loss when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor.

Social optimum estimation: We denote the buying utilities in a decreasing order as R1R2RρNR_{1}\geq R_{2}\geq\cdots\geq R_{\rho N} and denote selling costs in an increasing order as C1C2CNC_{1}\leq C_{2}\leq\cdots\leq C_{N}. We also range to buying quantities and asking quantities in a decreasing order as b1b2bρNb_{1}\geq b_{2}\geq\cdots\geq b_{\rho N} and q1q2qNq_{1}\geq q_{2}\geq\cdots\geq q_{N}.

Note that for RiR_{i}, its buying quantities are not necessarily the ii-th highest. Hence, based on Rearrangement Inequality, the social optimum satisfy:

swopti=1min{ρN,N}𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi].sw^{\rm opt}\leq\sum\limits_{i=1}^{\min\{\rho N,N\}}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. (171)

Note that RiR_{i} is the ρN+1i\rho N+1-i-th order statistics of ρN\rho N iid random variables (i.e., buying utilities), bib_{i} is the ρN+1i\rho N+1-i-th order statistics of ρN\rho N iid random variables (i.e., buying quantities), CiC_{i} is ii-th order statistics of NN iid random variables (i.e., selling costs), and qiq_{i} is the N+1iN+1-i-th order statistics of NN iid random variables (i.e., selling quantities).

Refer to caption
Figure 23: Three parts to estimate swoptsw^{\rm opt}.

As illustrated in Fig. 23, we estimate swoptsw^{\rm opt} in equation (171) by three parts. Our estimation is to prove that when NN is large, part 1 are matched with probability 1, part 2’s match can be approximated, and part 3 are matched with probability of 0.

The detailed estimation is as follows:

swopt\displaystyle sw^{\rm opt}\leq i=1NC(η)δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (172)
+i=NC(η)δN+1NC(η)+δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
+i=NC(η)+δN+1min{ρN,N}𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi].\displaystyle+\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}].

Here we estimate three parts of equation (172) as follows:

  1. 1.

    Estimation of i=1NC(η)δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. We first estimate 𝔼[min{bi,qi}]\mathbb{E}[\min\{b_{i},q_{i}\}] then we estimate (RiCi)𝔼[RiCi|RiCi]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}].

    For 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, the expectations of bib_{i} and qiq_{i} satisfy:

    𝔼[bi]B1(1iρN+1).\displaystyle\mathbb{E}[b_{i}]\approx B^{-1}\left(1-\frac{i}{\rho N+1}\right). (173)
    𝔼[qi]Q1(1iN+1).\displaystyle\mathbb{E}[q_{i}]\approx Q^{-1}\left(1-\frac{i}{N+1}\right). (174)

    Moreover, since min{X,Y}\min\{X,Y\} is a concave function, Jensen’s inequality tells us:

    𝔼[min{bi,qi}]min{𝔼[bi],𝔼[qi]}=min{B1(1iρN+1),Q1(1iN+1)}.\mathbb{E}[\min\{b_{i},q_{i}\}]\leq\min\{\mathbb{E}[b_{i}],\mathbb{E}[q_{i}]\}=\min\left\{B^{-1}\left(1-\frac{i}{\rho N+1}\right),Q^{-1}\left(1-\frac{i}{N+1}\right)\right\}. (175)

    For 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, the expectations of RiR_{i} and CiC_{i} satisfy:

    𝔼[Ri]R1(1iρN+1)R1(1NC(η)δNρN+1)R1(1C(η)δρ).\displaystyle\mathbb{E}[R_{i}]\approx R^{-1}\left(1-\frac{i}{\rho N+1}\right)\geq R^{-1}\left(1-\frac{\lfloor NC(\eta)-\delta N\rfloor}{\rho N+1}\right)\approx R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right). (176)
    𝔼[Ci]C1(iN+1)C1(NC(η)δNN+1)C1(C(η)δ).\displaystyle\mathbb{E}[C_{i}]\approx C^{-1}\left(\frac{i}{N+1}\right)\leq C^{-1}\left(\frac{\lfloor NC(\eta)-\delta N\rfloor}{N+1}\right)\approx C^{-1}\left(C(\eta)-\delta\right). (177)

    The variance satisfies:

    Var(Ri)(ρN+1i)i(ρN)3[1r(R1(ρN+1iρN+1))]2.\displaystyle\text{Var}(R_{i})\approx\frac{(\rho N+1-i)i}{(\rho N)^{3}}\left[\frac{1}{r\left(R^{-1}(\frac{\rho N+1-i}{\rho N+1})\right)}\right]^{2}. (178)
    Var(Ci)i(N+1i)N3[1c(C1(iN+1))]2.\displaystyle\text{Var}(C_{i})\approx\frac{i(N+1-i)}{N^{3}}\left[\frac{1}{c\left(C^{-1}(\frac{i}{N+1})\right)}\right]^{2}. (179)

    Then RiR_{i} and CiC_{i} can be approximated by normal distribution when NN\rightarrow\infty.121212Based on asymptotic distribution of a central order statistics theorem. http://www.math.ntu.edu.tw/~hchen/teaching/LargeSample/notes/noteorder.pdfhttps://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9936687 Then to estimate the probability of RiCiR_{i}\geq C_{i}, we can use the standard method to estimate the probability of one normal-distributed random variable larger than another normal-distributed random variable as follows:

    μi𝔼[Ri]𝔼[Ci]=R1(1iρN+1)C1(iN+1).\displaystyle\mu_{i}\triangleq\mathbb{E}[R_{i}]-\mathbb{E}[C_{i}]=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right). (180)
    σi2Var(Ri)+Var(Ci).\displaystyle\sigma_{i}^{2}\triangleq\text{Var}(R_{i})+\text{Var}(C_{i}). (181)

    Given δ>0\delta>0, we have:

    μi=R1(1iρN+1)C1(iN+1)\displaystyle\mu_{i}=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right) R1(1C(η)δρ)C1(C(η)δ)\displaystyle\geq R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right) (182)
    >R1(1C(η)ρ)C1(C(η))\displaystyle>R^{-1}\left(1-\frac{C(\eta)}{\rho}\right)-C^{-1}\left(C(\eta)\right)
    =0.\displaystyle=0.

    Then for any 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, we have

    (RiCi)=(RiCiμiσiμiσi)=(Zμiσi),\mathbb{P}(R_{i}\geq C_{i})=\mathbb{P}\Big{(}\frac{R_{i}-C_{i}-\mu_{i}}{\sigma_{i}}\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}=\mathbb{P}\Big{(}Z\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}, (183)

    where ZZ is a standard normal variable. Moreover, we note that:

    μiNσi\displaystyle\hskip 14.22636pt\frac{\mu_{i}}{\sqrt{N}\sigma_{i}} (184)
    μNC(η)δNNσNC(η)δN\displaystyle\geq\frac{\mu_{\lfloor NC(\eta)-\delta N\rfloor}}{\sqrt{N}\sigma_{\lfloor NC(\eta)-\delta N\rfloor}}
    =R1(1C(η)δρ)C1(C(η)δ)[C(η)δ][ρC(η)+δ]ρ3[1r(R1(1C(η)δρ))]2+[C(η)δ][1C(η)+δ][1c(C1(C(η)δ))]2.\displaystyle=\frac{R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right)}{\sqrt{\frac{[C(\eta)-\delta][\rho-C(\eta)+\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)-\delta}{\rho})\right)}\right]^{2}+[C(\eta)-\delta][1-C(\eta)+\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)-\delta)\right)}\right]^{2}}}.

    and we define

    ΔR1(1C(η)δρ)C1(C(η)δ)[C(η)δ][ρC(η)+δ]ρ3[1r(R1(1C(η)δρ))]2+[C(η)δ][1C(η)+δ][1c(C1(C(η)δ))]2,\Delta\triangleq\frac{R^{-1}\left(1-\frac{C(\eta)-\delta}{\rho}\right)-C^{-1}\left(C(\eta)-\delta\right)}{\sqrt{\frac{[C(\eta)-\delta][\rho-C(\eta)+\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)-\delta}{\rho})\right)}\right]^{2}+[C(\eta)-\delta][1-C(\eta)+\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)-\delta)\right)}\right]^{2}}}, (185)

    where Δ>0\Delta>0 is a constant given δ>0\delta>0. We use Φ\Phi to denote the CDF of standard normal distribution. For large NN and for any 1iNC(η)δN1\leq i\leq\lfloor NC(\eta)-\delta N\rfloor, equation (183) becomes:

    (RiCi)\displaystyle\mathbb{P}(R_{i}\geq C_{i}) =Φ(μiσi)\displaystyle=\Phi\Big{(}\frac{\mu_{i}}{\sigma_{i}}\Big{)} (186)
    Φ(μNC(η)δNσNC(η)δN)\displaystyle\geq\Phi\Big{(}\frac{\mu_{\lfloor NC(\eta)-\delta N\rfloor}}{\sigma_{\lfloor NC(\eta)-\delta N\rfloor}}\Big{)}
    =Φ(NΔ)\displaystyle=\Phi\Big{(}\sqrt{N}\Delta\Big{)}
    112πNΔeNΔ22\displaystyle\approx 1-\frac{1}{\sqrt{2\pi N}\Delta}e^{-\frac{N\Delta^{2}}{2}}
    1.\displaystyle\approx 1.

    To sum up, we have:

    i=1NC(η)δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (187)
    \displaystyle\leq i=1NC(η)δNmin{𝔼[bi],𝔼[qi]}𝔼[RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\min\{\mathbb{E}[b_{i}],\mathbb{E}[q_{i}]\}\mathbb{E}[R_{i}-C_{i}]
    \displaystyle\approx i=1NC(η)δNmin{B1(1iρN+1),Q1(1iN+1)}(R1(1iρN+1)C1(iN+1))\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\min\left\{B^{-1}\left(1-\frac{i}{\rho N+1}\right),Q^{-1}\left(1-\frac{i}{N+1}\right)\right\}\left(R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right)\right)
    \displaystyle\approx (N+1)0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))𝑑x.\displaystyle(N+1)\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx.
  2. 2.

    Estimation of i=NC(η)δN+1NC(η)+δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. For this part, we have 𝔼[min{bi,qi}]1\mathbb{E}[\min\{b_{i},q_{i}\}]\leq 1, (RiCi)1\mathbb{P}(R_{i}\geq C_{i})\leq 1 and 𝔼[RiCi|RiCi]1\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\leq 1. Hence, we have

    i=NC(η)δN+1NC(η)+δN𝔼[min{bi,qi}](RiCi)𝔼[RiCi|RiCi]i=NC(η)δN+1NC(η)+δN12δN.\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\min\{b_{i},q_{i}\}]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\leq\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}1\leq 2\delta N. (188)
  3. 3.

    Estimation of i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]. For NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, the expectations of RiR_{i} and CiC_{i} satisfy:

    𝔼[Ri]R1(1iρN+1)R1(1NC(η)+δN+1ρN+1)R1(1C(η)+δρ).\displaystyle\mathbb{E}[R_{i}]\approx R^{-1}\left(1-\frac{i}{\rho N+1}\right)\leq R^{-1}\left(1-\frac{\lfloor NC(\eta)+\delta N\rfloor+1}{\rho N+1}\right)\approx R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right). (189)
    𝔼[Ci]C1(iN+1)C1(NC(η)+δN+1N+1)C1(C(η)+δ).\displaystyle\mathbb{E}[C_{i}]\approx C^{-1}\left(\frac{i}{N+1}\right)\geq C^{-1}\left(\frac{\lfloor NC(\eta)+\delta N\rfloor+1}{N+1}\right)\approx C^{-1}\left(C(\eta)+\delta\right). (190)

    The variances satisfy:

    Var(Ri)(ρN+1i)i(ρN)3[1r(R1(ρN+1iρN+1))]2.\displaystyle\text{Var}(R_{i})\approx\frac{(\rho N+1-i)i}{(\rho N)^{3}}\left[\frac{1}{r\left(R^{-1}(\frac{\rho N+1-i}{\rho N+1})\right)}\right]^{2}. (191)
    Var(Ci)i(N+1i)N3[1c(C1(iN+1))]2.\displaystyle\text{Var}(C_{i})\approx\frac{i(N+1-i)}{N^{3}}\left[\frac{1}{c\left(C^{-1}(\frac{i}{N+1})\right)}\right]^{2}. (192)

    Then RiR_{i} and CiC_{i} can be approximated by normal distribution when NN\rightarrow\infty.131313Based on asymptotic distribution of a central order statistics theorem. http://www.math.ntu.edu.tw/~hchen/teaching/LargeSample/notes/noteorder.pdfhttps://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9936687 Then to estimate the probability of RiCiR_{i}\geq C_{i}, we can use the standard method to estimate the probability of one normal-distributed random variable larger than another normal-distributed random variable as follows:

    μi𝔼[Ri]𝔼[Ci]=R1(1iρN+1)C1(iN+1).\displaystyle\mu_{i}\triangleq\mathbb{E}[R_{i}]-\mathbb{E}[C_{i}]=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right). (193)
    σi2Var(Ri)+Var(Ci).\displaystyle\sigma_{i}^{2}\triangleq\text{Var}(R_{i})+\text{Var}(C_{i}). (194)

    Given δ>0\delta>0, we have:

    μi=R1(1iρN+1)C1(iN+1)\displaystyle\mu_{i}=R^{-1}\left(1-\frac{i}{\rho N+1}\right)-C^{-1}\left(\frac{i}{N+1}\right) R1(1C(η)+δρ)C1(C(η)+δ)\displaystyle\leq R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)-C^{-1}\left(C(\eta)+\delta\right) (195)
    <R1(1C(η)ρ)C1(C(η))\displaystyle<R^{-1}\left(1-\frac{C(\eta)}{\rho}\right)-C^{-1}\left(C(\eta)\right)
    =0.\displaystyle=0.

    Then for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, we have

    (RiCi)=(RiCiμiσiμiσi)=(Zμiσi),\mathbb{P}(R_{i}\geq C_{i})=\mathbb{P}\Big{(}\frac{R_{i}-C_{i}-\mu_{i}}{\sigma_{i}}\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}=\mathbb{P}\Big{(}Z\geq-\frac{\mu_{i}}{\sigma_{i}}\Big{)}, (196)

    where ZZ is a standard normal variable. Moreover, we note that:

    μiNσi\displaystyle\hskip 14.22636pt-\frac{\mu_{i}}{\sqrt{N}\sigma_{i}} (197)
    μNC(η)+δNNσNC(η)+δN\displaystyle\geq-\frac{\mu_{\lfloor NC(\eta)+\delta N\rfloor}}{\sqrt{N}\sigma_{\lfloor NC(\eta)+\delta N\rfloor}}
    =R1(1C(η)+δρ)+C1(C(η)+δ)[C(η)+δ][ρC(η)δ]ρ3[1r(R1(1C(η)+δρ))]2+[C(η)+δ][1C(η)δ][1c(C1(C(η)+δ))]2.\displaystyle=\frac{-R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)+C^{-1}\left(C(\eta)+\delta\right)}{\sqrt{\frac{[C(\eta)+\delta][\rho-C(\eta)-\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)+\delta}{\rho})\right)}\right]^{2}+[C(\eta)+\delta][1-C(\eta)-\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)+\delta)\right)}\right]^{2}}}.

    and we define

    Δ2R1(1C(η)+δρ)+C1(C(η)+δ)[C(η)+δ][ρC(η)δ]ρ3[1r(R1(1C(η)+δρ))]2+[C(η)+δ][1C(η)δ][1c(C1(C(η)+δ))]2,\Delta_{2}\triangleq\frac{-R^{-1}\left(1-\frac{C(\eta)+\delta}{\rho}\right)+C^{-1}\left(C(\eta)+\delta\right)}{\sqrt{\frac{[C(\eta)+\delta][\rho-C(\eta)-\delta]}{\rho^{3}}\left[\frac{1}{r\left(R^{-1}(1-\frac{C(\eta)+\delta}{\rho})\right)}\right]^{2}+[C(\eta)+\delta][1-C(\eta)-\delta]\left[\frac{1}{c\left(C^{-1}(C(\eta)+\delta)\right)}\right]^{2}}}, (198)

    where Δ2>0\Delta_{2}>0 is a constant given δ>0\delta>0. We use Φ\Phi to denote the CDF of standard normal distribution. For large NN and for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, equation (196) becomes:

    (RiCi)\displaystyle\mathbb{P}(R_{i}\geq C_{i}) =Φ(μiσi)\displaystyle=\Phi\Big{(}\frac{\mu_{i}}{\sigma_{i}}\Big{)} (199)
    Φ(μNC(η)+δNσNC(η)+δN)\displaystyle\leq\Phi\Big{(}\frac{\mu_{\lfloor NC(\eta)+\delta N\rfloor}}{\sigma_{\lfloor NC(\eta)+\delta N\rfloor}}\Big{)}
    =Φ(NΔ2)\displaystyle=\Phi\Big{(}-\sqrt{N}\Delta_{2}\Big{)}
    =1Φ(NΔ2)\displaystyle=1-\Phi\Big{(}\sqrt{N}\Delta_{2}\Big{)}
    12πNΔ2eNΔ222\displaystyle\approx\frac{1}{\sqrt{2\pi N}\Delta_{2}}e^{-\frac{N\Delta_{2}^{2}}{2}}
    0.\displaystyle\approx 0.

    Hence, we have:

    i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]0.\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]\approx 0. (200)

To sum up, we estimate swoptsw^{\rm opt} as

swopt=\displaystyle sw^{\rm opt}= i=1NC(η)δN(RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (201)
+i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
+i=NC(η)+δN+1min{ρN,N}(RiCi)𝔼[RiCi|RiCi]\displaystyle+\sum\limits_{i=\lfloor NC(\eta)+\delta N\rfloor+1}^{\min\{\rho N,N\}}\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]
<\displaystyle< (N+1)0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))dx+2δN.\displaystyle(N+1)\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta N.

Next we estimate the social welfare when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor. Since miners will randomly match transactions, the expected quantity of trading is the minimal of buying quantity and selling quantity. The CDF of the minimal is

Htrade(κ)=B(κ)+Q(κ)B(κ)Q(κ).H_{\rm trade}(\kappa)=B(\kappa)+Q(\kappa)-B(\kappa)Q(\kappa). (202)

The expectation of trading quantity is denoted as

𝔼[κ]\displaystyle\mathbb{E}[\kappa] =01κ[b(κ)+q(κ)b(κ)Q(κ)B(κ)q(κ)]dκ\displaystyle=\int_{0}^{1}\kappa[b(\kappa)+q(\kappa)-b(\kappa)Q(\kappa)-B(\kappa)q(\kappa)]d\kappa (203)
=𝔼[b]+𝔼[q]01κ[b(κ)Q(κ)+B(κ)q(κ)]dκ\displaystyle=\mathbb{E}[b]+\mathbb{E}[q]-\int_{0}^{1}\kappa[b(\kappa)Q(\kappa)+B(\kappa)q(\kappa)]d\kappa

We denote The social welfare when setting A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor comprising of the following:

sw=\displaystyle sw= i=1NC(η)δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]+i=NC(η)δN+1NC(η)+δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (204)
swloss1swloss2.\displaystyle-sw^{\rm loss}_{1}-sw^{\rm loss}_{2}.

We will compute the terms in (204) one by one.

  • i=1NC(η)δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]: based on the proof of Theorem 3, we have

    i=1NC(η)δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]\displaystyle\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}] (205)
    =\displaystyle= 𝔼[κ][(ρN+1)1C(η)δρ1R1(x)dx(N+1)0C(η)δC1(x)dx].\displaystyle\mathbb{E}[\kappa]\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx\right].
  • i=NC(η)δN+1NC(η)+δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]: This term must be strictly positive, we neglect this term and treat it as zero, since we derive a lower bound of the approximation ratio.

  • swloss1sw^{\rm loss}_{1}: swloss1sw^{\rm loss}_{1} denotes the social welfare loss in block 1, which comes from the situation that miners include some transactions to get fees, but these transactions reduces the social welfare.

    Refer to caption
    Figure 24: Social welfare loss due to R2R_{2} and C2C_{2}.

    Fig. 24 illustrates the social welfare loss due to R2R_{2} and C2C_{2}. The social optimum under such case is R1C1R_{1}-C_{1}. However, at Nash equilibrium, miners will match R1R_{1} with C2C_{2} and R2R_{2} with C1C_{1}, such that they can collect all transactions’ fees. This yields the social welfare of R1+R2C1C2R_{1}+R_{2}-C_{1}-C_{2}. Hence, the social welfare loss compared with social optimum for such a situation is C2R2C_{2}-R_{2}.

    Under A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor, the expected social welfare loss due to R2R_{2} and C2C_{2} is

    swloss1,2=\displaystyle sw^{\rm loss}_{1,2}= 𝔼[κ](C1R2C2R1)𝔼[C2R2|C1R2C2R1]\displaystyle\mathbb{E}[\kappa]\mathbb{P}(C_{1}\leq R_{2}\leq C_{2}\leq R_{1})\mathbb{E}[C_{2}-R_{2}|C_{1}\leq R_{2}\leq C_{2}\leq R_{1}] (206)
    <\displaystyle< 𝔼[κ](R2C2)𝔼[C2R2|R2C2].\displaystyle\mathbb{E}[\kappa]\mathbb{P}(R_{2}\leq C_{2})\mathbb{E}[C_{2}-R_{2}|R_{2}\leq C_{2}].
    Refer to caption
    Figure 25: Social welfare loss due to R3R_{3} and C3C_{3}.

    Fig. 25 illustrates the social welfare loss due to R3R_{3} and C3C_{3}. The social optimum under such case is R1+R2C1C2R_{1}+R_{2}-C_{1}-C_{2}. However, miners will match R1R_{1} with C3C_{3}, R2R_{2} with C2C_{2}, and R3R_{3} with C1C_{1}. Such that they can collect all transactions’ fees. This yields the social welfare of R1+R2+R3C1C2C3R_{1}+R_{2}+R_{3}-C_{1}-C_{2}-C_{3}. Hence, the social welfare loss compared with the social optimum for such a situation is C3R3C_{3}-R_{3}.

    Under A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor, the expected social welfare loss due to R3R_{3} and C3C_{3} is

    swloss1,3=\displaystyle sw^{\rm loss}_{1,3}= 𝔼[κ](C1R3C2R2C3R1)𝔼[C3R3|C1R3C2R2C3R1]\displaystyle\mathbb{E}[\kappa]\mathbb{P}(C_{1}\leq R_{3}\leq C_{2}\leq R_{2}\leq C_{3}\leq R_{1})\mathbb{E}[C_{3}-R_{3}|C_{1}\leq R_{3}\leq C_{2}\leq R_{2}\leq C_{3}\leq R_{1}] (207)
    <\displaystyle< 𝔼[κ](R3C3)𝔼[C3R3|R3C3].\displaystyle\mathbb{E}[\kappa]\mathbb{P}(R_{3}\leq C_{3})\mathbb{E}[C_{3}-R_{3}|R_{3}\leq C_{3}].

    We can use such method to calculate all the social welfare loss due to RiR_{i} and CiC_{i}, where i=2i=2 to NC(η)+δN\lfloor NC(\eta)+\delta N\rfloor. Hence the total expected social welfare loss from block 1 is

    swloss1=\displaystyle sw^{\rm loss}_{1}= i=2NC(η)+δNswloss1,i\displaystyle\sum_{i=2}^{\lfloor NC(\eta)+\delta N\rfloor}sw^{\rm loss}_{1,i} (208)
    <\displaystyle< i=2NC(η)+δN𝔼[κ](RiCi)𝔼[CiRi|RiCi]\displaystyle\sum_{i=2}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]
    =\displaystyle= i=2NC(η)δN𝔼[κ](RiCi)𝔼[CiRi|RiCi]+i=NC(η)δN+1NC(η)+δN𝔼[κ](RiCi)𝔼[CiRi|RiCi].\displaystyle\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}].

    We estimate two parts one by one:

    1. 1.

      For i=2NC(η)δN𝔼[κ](RiCi)𝔼[CiRi|RiCi]\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}], based on (186), we have

      (RiCi)0,2iNC(η)δN.\mathbb{P}(R_{i}\leq C_{i})\approx 0,\quad\forall 2\leq i\leq\lfloor NC(\eta)-\delta N\rfloor. (209)

      Hence, we have

      i=2NC(η)δN𝔼[κ](RiCi)𝔼[CiRi|RiCi]0.\sum_{i=2}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]\approx 0. (210)
    2. 2.

      For i=NC(η)δN+1NC(η)+δN(RiCi)𝔼[CiRi|RiCi]\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}], we have

      i=NC(η)δN+1NC(η)+δN𝔼[κ](RiCi)𝔼[CiRi|RiCi]\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\leq C_{i})\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}] (211)
      \displaystyle\leq i=NC(η)δN+1NC(η)+δN𝔼[κ]𝔼[CiRi|RiCi]\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{E}[C_{i}-R_{i}|R_{i}\leq C_{i}]
      \displaystyle\leq i=NC(η)δN+1NC(η)+δN𝔼[κ]\displaystyle\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]
      =\displaystyle= 2δN𝔼[κ].\displaystyle 2\delta N\mathbb{E}[\kappa].
  • swloss2sw^{\rm loss}_{2}: swloss2sw^{\rm loss}_{2} denotes the social welfare loss in block 2: Note that based on equation (199), for any NC(η)+δN+1imin{ρN,N}\lfloor NC(\eta)+\delta N\rfloor+1\leq i\leq\min\{\rho N,N\}, we have

    (RiCi)0.\mathbb{P}(R_{i}\geq C_{i})\approx 0. (212)

    In other words, when NN\rightarrow\infty, the probability of there are transaction left for block 2 is zero. Hence, the social welfare loss due to block 2 is zero:

    swloss2=0.sw^{\rm loss}_{2}=0. (213)

Based on all these discussions, we can estimate the ratio between the social optimum and social welfare under block size A=NC(η)+δNA=\lfloor NC(\eta)+\delta N\rfloor when NN\rightarrow\infty:

swoptsw\displaystyle\frac{sw^{\rm opt}}{sw} (214)
=\displaystyle= swopti=1NC(η)δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]+i=NC(η)δN+1NC(η)+δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]swloss1swloss2\displaystyle\frac{sw^{\rm opt}}{\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]+\sum\limits_{i=\lfloor NC(\eta)-\delta N\rfloor+1}^{\lfloor NC(\eta)+\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]sw^{\rm loss}_{1}-sw^{\rm loss}_{2}}
<\displaystyle< swopti=1NC(η)δN𝔼[κ](RiCi)𝔼[RiCi|RiCi]swloss1swloss2\displaystyle\frac{sw^{\rm opt}}{\sum\limits_{i=1}^{\lfloor NC(\eta)-\delta N\rfloor}\mathbb{E}[\kappa]\mathbb{P}(R_{i}\geq C_{i})\mathbb{E}[R_{i}-C_{i}|R_{i}\geq C_{i}]-sw^{\rm loss}_{1}-sw^{\rm loss}_{2}}
<\displaystyle< (N+1)0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))dx+2δN𝔼[κ][(ρN+1)1C(η)δρ1R1(x)dx(N+1)0C(η)δC1(x)dx2δN]\displaystyle\frac{(N+1)\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta N}{\mathbb{E}[\kappa]\left[(\rho N+1)\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-(N+1)\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta N\right]}
\displaystyle\approx 0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))dx+2δ𝔼[κ][ρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx2δ]\displaystyle\frac{\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta}{\mathbb{E}[\kappa]\left[\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta\right]}
=\displaystyle= 0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))dx+2δ𝔼[κ][0C(η)δR1(1xρ)C1(x)dx2δ],\displaystyle\frac{\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta}{\mathbb{E}[\kappa]\left[\int_{0}^{C(\eta)-\delta}R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)dx-2\delta\right]},

where

𝔼[κ]=𝔼[b]+𝔼[q]01κ[b(κ)Q(κ)+B(κ)q(κ)]dκ.\mathbb{E}[\kappa]=\mathbb{E}[b]+\mathbb{E}[q]-\int_{0}^{1}\kappa[b(\kappa)Q(\kappa)+B(\kappa)q(\kappa)]d\kappa.\\ (215)

As the buying and selling quantities are within [b¯,b¯][\underline{b},\overline{b}], we have min{B1(1xρ),Q1(1x)}b¯\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\leq\overline{b} and 𝔼[κ]b¯\mathbb{E}[\kappa]\geq\underline{b}. Hence, (214) becomes

swoptsw\displaystyle\frac{sw^{\rm opt}}{sw} (216)
<\displaystyle< 0C(η)δmin{B1(1xρ),Q1(1x)}(R1(1xρ)C1(x))dx+2δ𝔼[κ][0C(η)δR1(1xρ)C1(x)dx2δ]\displaystyle\frac{\int_{0}^{C(\eta)-\delta}\min\Big{\{}B^{-1}(1-\frac{x}{\rho}),Q^{-1}(1-x)\Big{\}}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta}{\mathbb{E}[\kappa]\left[\int_{0}^{C(\eta)-\delta}R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)dx-2\delta\right]}
=\displaystyle= b¯[0C(η)δ(R1(1xρ)C1(x))dx+2δ]b¯[0C(η)δR1(1xρ)C1(x)dx2δ]\displaystyle\frac{\overline{b}\left[\int_{0}^{C(\eta)-\delta}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta\right]}{\underline{b}\left[\int_{0}^{C(\eta)-\delta}R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)dx-2\delta\right]}
=\displaystyle= b¯b¯0C(η)δ(R1(1xρ)C1(x))dx+2δ0C(η)δR1(1xρ)C1(x)dx2δ\displaystyle\frac{\overline{b}}{\underline{b}}\cdot\frac{\int_{0}^{C(\eta)-\delta}\left(R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)\right)dx+2\delta}{\int_{0}^{C(\eta)-\delta}R^{-1}(1-\frac{x}{\rho})-C^{-1}(x)dx-2\delta}
=\displaystyle= b¯b¯ρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx+2δρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx2δ.\displaystyle\frac{\overline{b}}{\underline{b}}\cdot\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}.

We take the limit on both side of (216), then we have:

limNδ=NψswoptswlimNδ=Nψb¯b¯ρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx+2δρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx2δ.\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{sw^{\rm opt}}{sw}\leq\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{\overline{b}}{\underline{b}}\cdot\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}. (217)

Based on (169), we have:

limNδ=NψswoptswlimNδ=Nψb¯b¯ρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx+2δρ1C(η)δρ1R1(x)dx0C(η)δC1(x)dx2δ=b¯b¯.\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{sw^{\rm opt}}{sw}\leq\lim\limits_{\begin{subarray}{c}N\rightarrow\infty\\ \delta=N^{-\psi}\end{subarray}}\frac{\overline{b}}{\underline{b}}\cdot\frac{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx+2\delta}{\rho\int_{1-\frac{C(\eta)-\delta}{\rho}}^{1}R^{-1}(x)dx-\int_{0}^{C(\eta)-\delta}C^{-1}(x)dx-2\delta}=\frac{\overline{b}}{\underline{b}}. (218)

Hence, the ratio between the social optimum and social welfare for heterogeneous trading quantity is upper bounded by b¯b¯\frac{\overline{b}}{\underline{b}}. The PoA, as the maximum ratio, is upper bounded by b¯b¯\frac{\overline{b}}{\underline{b}}.

This completes the proof of heterogeneous-quantity trading.

This completes the proof of Theorem 4.

VIII Experiment

This section provides a comprehensive introduction to the implementation of our Adjustable Block Size (ABS) mechanism in the Ethereum blockchain and the experiment. The ABS mechanism aims to dynamically adjust the block size, which in Ethereum is represented by the gas limit of each block.

VIII-A Experiment Overview

In Ethereum, the block size is determined by the gas limit. To implement our ABS mechanism, we adjust the gas limit of each block to control the block size. We utilize Geth version 1.11.2 [41] as the Ethereum client and modify its source code to implement the gas limit adjustment. After the implementation, we run the blockchain protocol and generate the buying and selling transactions to match.

VIII-B Experiment Details

The experiment includes four steps:

VIII-B1 Modifying Geth Source Code

To adjust the gas limit of each block, we modify the “block_validator.go” file in the Geth source code. Specifically, we update the function responsible for calculating the gas limit “CalcGasLimit”. In order to set the block size to accommodate approximately 100 transactions, we configure the gas limit to 2,100,000 since each typical transaction consumes approximately 21,000 gas. The code modification is shown in Figure 26, where we add comments to the original code of “CalcGasLimit” and include our modifications. Additionally, we update the gas limit in the “genesis.json” file to the following value:

Ψ"gasLimit": "0x200b20",

This change is made because the gas limit is specified in hexadecimal format.

Refer to caption
Figure 26: Gas limit adjustment.

VIII-B2 Running the Modified Ethereum Client

After modifying the gas limit, we run a local instance of the Ethereum blockchain using the modified Geth client in a Cygwin64 terminal. The steps to achieve this are outlined below:

  1. 1.

    Navigate to the Geth client directory and compile the file. The commands are as follows:

    ΨΨcd /cygdrive/d/Program\ Files/go-ethereum-1.11.2.2
    ΨΨ
    ΨΨmake geth
    Ψ
    
  2. 2.

    Remove blockchain data from any previous experiments (if it exists). The command is:

    ΨΨgeth removedb
    Ψ
    
  3. 3.

    Initialize the genesis file and run the modified client. The commands are:

    ΨΨ./build/bin/geth init "D:\Program Files\go-ethereum-1.11.2.2
    ΨΨ\cmd\devp2p\internal\ethtest\testdata\genesis.json"
    ΨΨ
    ΨΨ./build/bin/geth --networkid 12345 --nodiscover --mine --
    ΨΨminer.etherbase 0xF90FDcB13069361f27e3aC5a2A1aca66E37437f2
    ΨΨ--miner.threads 1 --http --http.port 8545 --http.api web3,
    ΨΨeth,net,personal
    Ψ
    

Figure 27 shows the operation result of blockchain execution after running our modified client. It shows the mining history of blocks, and the red rectangle in the figure shows that we have modified the fixed gas limit to 2,100,000.

Refer to caption
Figure 27: Ethereum blockchain mining.

VIII-B3 Verification of Gas Limit:

We open a new Cygwin64 terminal to verify the implementation by inspecting the gas limit of the mined blocks. After navigating to the appropriate directory, we retrieved the block information. The code executed is as follows:

Ψcd /cygdrive/d/Program\ Files/go-ethereum-1.11.2.2
Ψ
Ψcurl -X POST --data "{\"jsonrpc\":\"2.0\",\"method\":\"eth_
ΨΨgetBlockByNumber\",\"params\":[\"latest\",true],\"id\":1}"
Ψ-H "Content-Type: application/json" http://localhost:8545

Figure 28 displays the results of executing the code. The red rectangle in the figure highlights that the block’s gas limit is indeed set to 0x200b20 in hexadecimal, which is equivalent to 2,100,000 and matches the value we configured. This confirms that the ABS mechanism has been successfully implemented.

Refer to caption
Figure 28: A block’s gas limit.

VIII-B4 Transaction Generation:

We open a new cmd to generate the buying and selling transactions. First, we navigate to the folder and install Web3.js with specific version:

Ψcd /d D:\Program Files\go-ethereum-1.11.2.2\
Ψethereum-transaction
Ψ
Ψnpm install web3@1.6.1

Next is to run the code

Ψnode sendTransaction3.js

The code of “sendTransaction3.js” is as follows:

Ψconst Web3 = require(’web3’);
Ψconst web3 = new Web3(’http://localhost:8545’);  // Initialize Web3 with HTTP provider
Ψ
Ψ// Your account and private key
Ψconst account = ’0xF90FDcB13069361f27e3aC5a2A1aca66E37437f2’;
Ψconst privateKey = ’0xec65482032b5cf235cffc47aacd4d9f2e1fc71d670e82c9110d17a4776ea6dde’;
Ψ
Ψconst recipientAccounts = [
Ψ’0xeA8EC02a56D1a334C61036032Bb9ad349FB6C160’,
Ψ’0xc4cc8Fe4B613C7774157FEd7d7F898C52b415eF2’,
Ψ’0x303bDCeD279e89bb3B0f10A9c2f4738Bdc8496e3’,
Ψ’0xcb1E67065D274DD8A2bb03fa77C798fC902ec670’,
Ψ’0x18F3F58D9F408723f2E2EFAaAC756dDf0Fc05869’,
Ψ’0x65B2E2E97B2076B27aE15713D2a0916694E9220F’,
Ψ’0xAd3F680F5d594A49c4b39926A40c3Af832Ecfacb’,
Ψ’0xEF9835504AD5A42CdAABeE58c7f8299534Ff14DA’,
Ψ’0xaBeCed76e700790cC03EFD2691fAc9D82706e97e’,
Ψ’0x49591Eaaa296180ba24ad7568Ccb30946Fd6d7c0’,
Ψ’0xf36137dEA116d4296485534CE90c3D88A56d13E2’,
Ψ’0xF241E66491f58F0C0FAf82a7F7eB0EF857742550’,
Ψ’0x61f244C8D7B354B09fa657b2DA6C36571fcac821’,
Ψ’0x7b369bFC4b3BFAc833c84521424C4f41c037B3a8’,
Ψ’0xdc332E90Ed666eed9330Cf72740f14B17A9ae36c’,
Ψ’0x84796451696BdBA236E9b82B19B06Be831F41Ca8’,
Ψ’0x259648887B2A2322007C06B8C33382B460d1017F’,
Ψ’0xa9F6ac59Eb8ECF113D2e05FBDa8a567fe66774c9’,
Ψ’0x43f01580C9E2f38548b9687930db349cfD8c6B89’,
Ψ’0x006498deE48fd6dd4b300fb25438b0C741C61613’
Ψ];
Ψ
Ψ// Ensure the address is checksummed
Ψconst checksumAddress = web3.utils.toChecksumAddress(account);
Ψ
Ψ// Add the private key to Web3’s wallet
Ψweb3.eth.accounts.wallet.add(privateKey);  // Add private key to Web3 wallet
Ψ
Ψ// Function to generate a random number within a range
Ψconst getRandomInRange = (min, max) => {
ΨΨreturn Math.floor(Math.random() * (max - min + 1)) + min;
Ψ};
Ψ
Ψ// Function to send a single transaction
Ψconst sendSingleTransaction = async (index, nonce) => {
ΨΨ// Generate a random gas price between 10 gwei and 100 gwei (for example)
ΨΨconst gasPrice = web3.utils.toWei(getRandomInRange(10, 100).toString(), ’gwei’);
ΨΨ
ΨΨ// Select a random recipient from the list
ΨΨconst recipient = recipientAccounts[index % recipientAccounts.length];  // Ensure we don’t go out of bounds
ΨΨ
ΨΨ// Prepare the transaction details
ΨΨconst tx = {
ΨΨΨfrom: checksumAddress,
ΨΨΨto: recipient,  // Randomized recipient address
ΨΨΨvalue: web3.utils.toWei(’0.1’, ’ether’),  // Transaction value in Ether (0.1 ETH for each transaction)
ΨΨΨgas: 21000,  // Gas limit
ΨΨΨgasPrice: gasPrice,  // Randomized gas price
ΨΨΨnonce: nonce  // Unique nonce for each transaction
ΨΨ};
ΨΨ
ΨΨ// Sign and send the transaction
ΨΨtry {
ΨΨΨconst signedTx = await web3.eth.accounts.signTransaction(tx, privateKey);
ΨΨΨconst receipt = await web3.eth.sendSignedTransaction(signedTx.rawTransaction);
ΨΨΨconsole.log(‘Transaction ${index + 1} successful:‘, receipt);
ΨΨ} catch (err) {
ΨΨΨconsole.error(‘Error sending transaction ${index + 1}:‘, err);
ΨΨ}
Ψ};
Ψ
Ψ// Function to send 10 transactions concurrently with unique nonces
Ψconst sendTransactionsConcurrently = async () => {
ΨΨ// Get the current nonce for the sender’s account
ΨΨconst currentNonce = await web3.eth.getTransactionCount(checksumAddress);
ΨΨ
ΨΨconst transactionPromises = [];
ΨΨ
ΨΨfor (let i = 0; i < 10; i++) {
ΨΨΨ// Add each transaction promise to the array with unique nonce
ΨΨΨtransactionPromises.push(sendSingleTransaction(i, currentNonce + i));  // Increment nonce for each transaction
ΨΨ}
ΨΨ
ΨΨ// Wait for all transactions to complete concurrently
ΨΨawait Promise.all(transactionPromises);
Ψ};
Ψ
Ψ// Execute the function to send 10 transactions concurrently
ΨsendTransactionsConcurrently().then(() => {
ΨΨconsole.log(’All transactions have been sent.’);
Ψ}).catch(err => {
ΨΨconsole.error(’Error in sending transactions:’, err);
Ψ});

Figure 29 displays the results that miners successfully record the transactions in the blockchain. This completes the experiment.

Refer to caption
Figure 29: Transaction recorded in blockchain.

Through the experiment, we successfully adjusted the block size in the Ethereum blockchain by modifying the gas limit of each block and complete matching. This implementation demonstrates the feasibility and practicality of ABS mechanism.

References

  • [1] D. Ghelani, “What is non-fungible token (nft)? a short discussion about nft terms used in nft,” Authorea Preprints, 2022.
  • [2] “Market value,” https://www.binance.com/en/price/dydx-chain, 2024.
  • [3] “Issue of decentralized order book,” https://pintu.co.id/en/academy/post/what-is-decentralized-order-book#pros-and-cons-of-decentralized-order-book, 2023.
  • [4] K. Li, S. Guan, and D. Lee, “Towards understanding and characterizing the arbitrage bot scam in the wild,” in Abstracts of the 2024 ACM SIGMETRICS/IFIP PERFORMANCE Joint International Conference on Measurement and Modeling of Computer Systems, ser. SIGMETRICS/PERFORMANCE ’24.   New York, NY, USA: Association for Computing Machinery, 2024, p. 89–90. [Online]. Available: https://doi.org/10.1145/3652963.3655088
  • [5] B. G. Gebraselase, B. E. Helvik, and Y. Jiang, “Effect of miner incentive on the confirmation time of bitcoin transactions,” in 2021 IEEE International Conference on Blockchain (Blockchain).   IEEE, 2021, pp. 521–529.
  • [6] “Price slippage in matching,” https://www.coingecko.com/learn/slippage-crypto, 2023.
  • [7] “Dex matching issue,” https://101blockchains.com/defi-slippage-explained/, 2024.
  • [8] “Bitcoin cash,” https://crypto.marketswiki.com/index.php?title=Bitcoin_cash, 2020.
  • [9] P. Daian, S. Goldfeder, T. Kell, Y. Li, X. Zhao, I. Bentov, L. Breidenbach, and A. Juels, “Flash boys 2.0: Frontrunning in decentralized exchanges, miner extractable value, and consensus instability,” in 2020 IEEE symposium on security and privacy (SP).   IEEE, 2020, pp. 910–927.
  • [10] M. Schnaubelt, “Deep reinforcement learning for the optimal placement of cryptocurrency limit orders,” European Journal of Operational Research, vol. 296, no. 3, pp. 993–1006, 2022.
  • [11] N. Hautsch, C. Scheuch, and S. Voigt, “Building trust takes time: limits to arbitrage for blockchain-based assets,” Review of Finance, p. rfae004, 2024.
  • [12] L. Heimbach and R. Wattenhofer, “Sok: Preventing transaction reordering manipulations in decentralized finance,” in Proceedings of the 4th ACM Conference on Advances in Financial Technologies, 2022, pp. 47–60.
  • [13] F. Victor and A. M. Weintraud, “Detecting and quantifying wash trading on decentralized cryptocurrency exchanges,” in Proceedings of the Web Conference 2021, 2021, pp. 23–32.
  • [14] A. Raheman, A. Kolonin, B. Goertzel, G. Hegyközi, and I. Ansari, “Architecture of automated crypto-finance agent,” in 2021 International Symposium on Knowledge, Ontology, and Theory (KNOTH).   IEEE, 2021, pp. 10–14.
  • [15] “Bitcoin xt,” https://en.bitcoin.it/wiki/Bitcoin_XT, 2015.
  • [16] “Ethereum fee,” https://www.blocknative.com/blog/eip-1559-fees, 2021.
  • [17] W. Li, S. Andreina, J.-M. Bohli, and G. Karame, “Securing proof-of-stake blockchain protocols,” in Data Privacy Management, Cryptocurrencies and Blockchain Technology: ESORICS 2017 International Workshops, DPM 2017 and CBT 2017, Oslo, Norway, September 14-15, 2017, Proceedings.   Springer, 2017, pp. 297–315.
  • [18] “Transaction delay,” https://www.blockchain.com/explorer/charts/n-transactions, 2025.
  • [19] C. Wang, X. Chu, and Y. Qin, “Measurement and analysis of the bitcoin networks: A view from mining pools,” in 2020 6th International Conference on Big Data Computing and Communications (BIGCOM).   IEEE, 2020, pp. 180–188.
  • [20] “Fee calculator,” https://www.cashbackforex.com/tools/exchange-fees-calculator?s=blockchain-com-exchange, Jan 2025.
  • [21] “Chainlink introduction,” https://www.globalxetfs.com/chainlink-the-basics/, 2023.
  • [22] “Serum introduction,” https://medium.com/perpdex/serum-order-book-implementation-2fca9301f76e, 2022.
  • [23] D. Easley, M. O’Hara, and S. Basu, “From mining to markets: The evolution of bitcoin transaction fees,” Journal of Financial Economics, vol. 134, no. 1, pp. 91–109, 2019.
  • [24] Y. Liu, S. Ke, Z. Fang, M. H. Cheung, W. Cai, and J. Huang, “A storage sustainability mechanism with heterogeneous miners in blockchain,” IEEE Journal on Selected Areas in Communications, vol. 40, no. 12, pp. 3645–3659, 2022.
  • [25] “Bitcoin protocol,” https://github.com/Maguines/Bitcoin-v0.1, 2016.
  • [26] J. Messias, M. Alzayat, B. Chandrasekaran, K. P. Gummadi, P. Loiseau, and A. Mislove, “Selfish & opaque transaction ordering in the bitcoin blockchain: the case for chain neutrality,” in Proceedings of the 21st ACM Internet Measurement Conference, 2021, pp. 320–335.
  • [27] “Ethereum staking distribution,” https://dune.com/hildobby/eth2-staking, 2024.
  • [28] “dydx order type,” https://docs.dydx.exchange/api_integration-trading/order_types, 2024.
  • [29] A. A. Alchian, “The meaning of utility measurement,” The American Economic Review, vol. 43, no. 1, pp. 26–50, 1953.
  • [30] A. Ntakaris, M. Magris, J. Kanniainen, M. Gabbouj, and A. Iosifidis, “Benchmark dataset for mid-price forecasting of limit order book data with machine learning methods,” Journal of Forecasting, vol. 37, no. 8, pp. 852–866, 2018.
  • [31] E. Akyildirim, O. Cepni, S. Corbet, and G. S. Uddin, “Forecasting mid-price movement of bitcoin futures using machine learning,” Annals of Operations Research, vol. 330, no. 1, pp. 553–584, 2023.
  • [32] A. Ntakaris, J. Kanniainen, M. Gabbouj, and A. Iosifidis, “Mid-price prediction based on machine learning methods with technical and quantitative indicators,” Plos one, vol. 15, no. 6, p. e0234107, 2020.
  • [33] T. Roughgarden, “Transaction fee mechanism design for the ethereum blockchain: An economic analysis of eip-1559,” arXiv preprint arXiv:2012.00854, 2020.
  • [34] J. Li, G. Sun, L. Duan, and Q. Wu, “Multi-objective optimization for uav swarm-assisted iot with virtual antenna arrays,” IEEE Transactions on Mobile Computing, 2023.
  • [35] S. Gao, C. A. Courcoubetis, and L. Duan, “Average-case analysis of greedy matching for large-scale d2d resource sharing,” IEEE Transactions on Mobile Computing, vol. 23, no. 5, pp. 3707–3721, 2023.
  • [36] S. Gao, C. Courcoubetis, and L. Duan, “Dynamic matching for ride-sharing with deadlines,” in 2024 22nd International Symposium on Modeling and Optimization in Mobile, Ad Hoc, and Wireless Networks (WiOpt).   IEEE, 2024, pp. 241–248.
  • [37] “Nft trading dataset,” https://www.kaggle.com/datasets/mathurinache/nft-history-sales?resource=download, 2022.
  • [38] “Bitcoin order book dataset,” https://www.kaggle.com/datasets/maxreis/df-order-book, 2020.
  • [39] W.-d. Yu and K.-W. Wang, “Best value or lowest bid? a quantitative perspective,” Journal of Construction Engineering and Management, vol. 138, no. 1, pp. 128–134, 2012.
  • [40] “Blockchain order book protocol,” https://b2broker.com/news/what-is-cryptocurrency-matching-engine/, 2023.
  • [41] “Ethereum clients,” https://chainstack.com/ethereum-clients-geth-and-erigon/, 2022.
  • [42] Q. Zhou, H. Huang, Z. Zheng, and J. Bian, “Solutions to scalability of blockchain: A survey,” Ieee Access, vol. 8, pp. 16 440–16 455, 2020.
  • [43] G. Sun, J. Li, Y. Liu, S. Liang, and H. Kang, “Time and energy minimization communications based on collaborative beamforming for uav networks: A multi-objective optimization method,” IEEE Journal on Selected Areas in Communications, vol. 39, no. 11, pp. 3555–3572, 2021.