arXiv:1905.04624v2 [cs.CE] 6 Jun 2019 Diversification Across Mining Pools: Optimal Mining Strategies under PoW Panagiotis Chatzigiannis, Foteini Baldimtsi, Igor Griva and Jiasun Li George Mason University Fairfax VA 22030 Email: pchatzig@gmu.edu, foteini@gmu.edu, igriva@gmu.edu, jli29@gmu.edu Abstract—Mining is a central operation of all proof-of-work (PoW) based cryptocurrencies. The vast majority of miners today participate in “mining pools” instead of “solo mining” in order to lower risk and achieve a more steady income. However, this rise of participation in mining pools negatively affects the decentralization levels of most cryptocurrencies. In this work, we look into mining pools from the point of view of a miner: We present an analytical model and implement a computational tool that allows miners to optimally distribute their computational power over multiple pools and PoW cryptocur- rencies (i.e. build a mining portfolio), taking into account their risk aversion levels. Our tool allows miners to maximize their risk-adjusted earnings by diversifying across multiple mining pools which enhances PoW decentralization. Finally, we run an experiment in Bitcoin historical data and demonstrate that a miner diversifying over multiple pools, as instructed by our model/tool, receives a higher overall Sharpe ratio (i.e. average excess reward over its standard deviation/volatility). I. I NTRODUCTION The majority of cryptocurrencies use some type of proof- of-work (PoW) based consensus mechanism to order and finalize transactions stored in the blockchain. At any given time, a set of users all over the world (called miners or maintainers) compete in solving a PoW puzzle that will allow them to post the next block in the blockchain and at the same time claim the “coinbase” reward and any relevant transaction fees. In the early years of cryptocurrencies solo mining was the norm, and a miner using his own hardware would attempt to solve the PoW puzzle himself, earning the reward. However, as the exchange rate of cryptocurrencies increased, the PoW competition become fiercer, specialized hardware was manufactured just for the purpose of mining particular types of PoW (e.g. Bitcoin or Ethereum mining ASICs [1]), and eventually users formed coalitions for better chances of solving the puzzle. These coalitions known as mining pools, where miners are all continuously trying to mine a block with the “pool manager” being the reward recipient, enabled participating users to reduce their mining risks 1 . After the establishment of mining pools, it become nearly impossible for “solo” miners to compete on the mining game, even if they were using specialized hardware, or else they could risk not to earn any rewards at all during the hardware’s lifetime. The selection of a mining pool is not a trivial task. A large number of pools exist each offering different reward distribu- 1 We measure a miner’s “risk” by the variance of rewards over time. tion methods and earning fees (as we further discuss in Section II-B). At the same time different pools control a different ratio of the overall hashrate consumed by a cryptocurrency and larger pools (in terms of hashrate) offer lower risk, as they typically offer more frequent payouts to the miners. But how can a miner make an optimal decision about which mining pools to participate in and for which cryptocurrencies at any given time considering the variety of possible options? Our contributions. We present an analytical tool that allows risk-averse miners to optimally create a mining portfolio that maximizes their risk-adjusted rewards. We characterize miners by their total computational resources (i.e. hash power) and their risk aversion level, and mining pools by their total computational power (i.e. hash rate) and the reward mechanism they offer. We model the hash rate allocation as an optimization problem that aims to maximize the miner’s expected utility. In Section III, we provide three different versions of our model. The first one, inspired by [2], concerns a miner that wishes to mine on a single cryptocurrency, while aiming to diversify among any number of mining pools (including the solo mining option). The second version captures miners which diversify across different cryptocurrencies that use the same PoW mining algorithm. In our third version, we model miners who also wish to diversify across cryptocurrencies with different PoW mining algorithms. Our modeling technique is based on standard utility maximization, and extends the Markowitz Modern portfolio theory [3] to multiple mining pools, rather than multiple assets. In Section IV we present an implementation of our model. We develop a Python tool that uses the constrained opti- mization by linear approximation (COBYLA) [4] method to automate the pool distribution for an active miner. A miner can use our tool by providing as input its own mining power (for any PoW type) as well as his risk aversion rate and any number of pools he wishes to take into account when computing the optimal distribution of his mining power. As expected, we observe that for “reasonable” values of risk aversion level, the miner would generally allocate more of his resources to pools offering large hash power combined with small fees, without however neglecting other pools that are not as “lucrative”. Finally, to illustrate the usefulness of our tool, we run an experiment on Bitcoin historical data (Section V). We start by considering a Bitcoin miner who starts mining passively on a single chosen pool for 4 months and compute his earnings on a daily basis. Then, we consider a miner with the same hash power who