Optimal Mining: Maximizing Bitcoin Miners' Revenues from Transaction Fees

Following the Bitcoin model, many modern blockchains reward their miners in two ways: (i) a base reward for each block that is mined, and (ii) the transaction fees of those transactions that are included in the mined block. The base reward is fixed by the respective blockchain's protocol and is not under the miner's control. Hence, for a miner who wishes to maximize earnings, the fundamental problem is to form a valid block with maximal total transaction fees and then try to mine it. Moreover, in many protocols, including Bitcoin itself, the base reward halves at predetermined intervals, hence increasing the importance of maximizing transaction fees and mining an optimal block. This problem is further complicated by the fact that transactions can be prerequisites of each other or have conflicts (in case of double-spending). In this work, we consider the problem of forming an optimal block, i.e. a valid block with maximal total transaction fees, given a set of unmined transactions. The problem is known to be NP-hard. As such, there is no hope in solving it efficiently for general instances. However, we observe that its real-world instances are quite sparse, i.e. the transactions have very few dependencies and conflicts. Using this fact, and exploiting a well-known graph sparsity parameter, namely pathwidth, we present an exact linear-time parameterized algorithm that is applicable to the real-world instances and obtains optimal results. We also provide an experimental evaluation demonstrating that our approach outperforms current Bitcoin miners in practice, obtaining a significant increase in transaction fee revenues.

[1]  Amir Kafshdar Goharshady,et al.  Irrationality, Extortion, or Trusted Third-parties: Why it is Impossible to Buy and Sell Physical Goods Securely on the Blockchain , 2021, 2021 IEEE International Conference on Blockchain (Blockchain).

[2]  Ali Shakiba,et al.  On the k-rainbow domination in graphs with bounded tree-width , 2021, Electron. J. Graph Theory Appl..

[3]  Meng Han,et al.  Miner revenue optimization algorithm based on Pareto artificial bee colony in blockchain network , 2021, EURASIP J. Wirel. Commun. Netw..

[4]  Hao Chen,et al.  A Novel Anti-attack Revenue Optimization Algorithm in the Proof-of-Work Based Blockchain , 2020, WASA.

[5]  Walter Bazán-Palomino How are Bitcoin forks related to Bitcoin? , 2020 .

[6]  Ittay Eyal,et al.  Efficient MDP Analysis for Selfish-Mining in Blockchains , 2020, AFT.

[7]  K. Chatterjee,et al.  Optimal and Perfectly Parallel Algorithms for On-demand Data-Flow Analysis , 2020, ESOP.

[8]  Krishnendu Chatterjee,et al.  Faster Algorithms for Dynamic Algebraic Queries in Basic RSMs with Constant Treewidth , 2019, ACM Trans. Program. Lang. Syst..

[9]  Ivan Beschastnikh,et al.  Erlay: Efficient Transaction Relay for Bitcoin , 2019, CCS.

[10]  Ari Juels,et al.  Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges , 2019, ArXiv.

[11]  Krishnendu Chatterjee,et al.  The treewidth of smart contracts , 2019, SAC.

[12]  Krishnendu Chatterjee,et al.  Hybrid mining: exploiting blockchain's computational power for distributed problem solving , 2019, SAC.

[13]  Jinwoo Shin,et al.  Bitcoin vs. Bitcoin Cash: Coexistence or Downfall of Bitcoin Cash? , 2019, 2019 IEEE Symposium on Security and Privacy (SP).

[14]  Krishnendu Chatterjee,et al.  Probabilistic Smart Contracts: Secure Randomness on the Blockchain , 2019, 2019 IEEE International Conference on Blockchain and Cryptocurrency (ICBC).

[15]  Krishnendu Chatterjee,et al.  Efficient parameterized algorithms for data packing , 2019, Proc. ACM Program. Lang..

[16]  Fahad Panolan,et al.  On the Parameterized Complexity of [1, j]-Domination Problems , 2018, FSTTCS.

[17]  Krishnendu Chatterjee,et al.  Ergodic Mean-Payoff Games for the Analysis of Attacks in Crypto-Currencies , 2018, CONCUR.

[18]  Krishnendu Chatterjee,et al.  Secure Credit Reporting on the Blockchain , 2018, 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData).

[19]  Marco Alberto Javarone,et al.  From Bitcoin to Bitcoin Cash: a network analysis , 2018, CRYBLOCK@MobiSys.

[20]  Sarah Meiklejohn,et al.  Smart contracts for bribing miners , 2018, IACR Cryptol. ePrint Arch..

[21]  Krishnendu Chatterjee,et al.  Quantitative Analysis of Smart Contracts , 2018, ESOP.

[22]  Fatemeh Mohammadi,et al.  An efficient algorithm for computing network reliability in small treewidth , 2017, Reliab. Eng. Syst. Saf..

[23]  Dusit Niyato,et al.  Optimal Auction for Edge Computing Resource Management in Mobile Blockchain Networks: A Deep Learning Approach , 2017, 2018 IEEE International Conference on Communications (ICC).

[24]  Krishnendu Chatterjee,et al.  JTDec: A Tool for Tree Decompositions in Soot , 2017, ATVA.

[25]  Michael Bedford Taylor,et al.  The Evolution of Bitcoin Hardware , 2017, Computer.

[26]  Fan Zhang,et al.  REM: Resource-Efficient Mining for Blockchains , 2017, IACR Cryptol. ePrint Arch..

[27]  Jason Teutsch,et al.  Smart Contracts Make Bitcoin Mining Pools Vulnerable , 2017, Financial Cryptography Workshops.

[28]  Michael J. Dinneen,et al.  On fixed-parameter tractability of the mixed domination problem for graphs with bounded tree-width , 2016, Discret. Math. Theor. Comput. Sci..

[29]  Krishnendu Chatterjee,et al.  Algorithms for Algebraic Path Properties in Concurrent Systems of Constant Treewidth Components , 2015, ACM Trans. Program. Lang. Syst..

[30]  Jason Teutsch,et al.  Demystifying Incentives in the Consensus Computer , 2015, CCS.

[31]  Jeffrey S. Rosenschein,et al.  Bitcoin Mining Pools: A Cooperative Game Theoretic Analysis , 2015, AAMAS.

[32]  Aron Laszka,et al.  When Bitcoin Mining Pools Run Dry - A Game-Theoretic Analysis of the Long-Term Impact of Attacks Between Mining Pools , 2015, Financial Cryptography Workshops.

[33]  Emin Gün Sirer,et al.  Majority Is Not Enough: Bitcoin Mining Is Vulnerable , 2013, Financial Cryptography.

[34]  H. Bodlaender A Partial k-Arboretum of Graphs with Bounded Treewidth , 1998, Theor. Comput. Sci..

[35]  Ton Kloks,et al.  Efficient and Constructive Algorithms for the Pathwidth and Treewidth of Graphs , 1993, J. Algorithms.

[36]  Hans L. Bodlaender,et al.  A linear time algorithm for finding tree-decompositions of small treewidth , 1993, STOC.

[37]  Paul D. Seymour,et al.  Graph minors. I. Excluding a forest , 1983, J. Comb. Theory, Ser. B.

[38]  Amir Kafshdar Goharshady Parameterized and Algebro-geometric Advances in Static Program Analysis. (Progrès paramétriques et algébro-géométriques dans l'analyse statique des programmes) , 2020 .

[39]  Krishnendu Chatterjee,et al.  Faster Algorithms for Quantitative Analysis of MCs and MDPs with Small Treewidth , 2020, ATVA.

[40]  David Lee Kuo Chuen,et al.  Bitcoin Mining Technology , 2015 .

[41]  S. Nakamoto,et al.  Bitcoin: A Peer-to-Peer Electronic Cash System , 2008 .

[42]  L. Dagum,et al.  OpenMP: an industry standard API for shared-memory programming , 1998 .