Modelling the dynamics of the bitcoin blockchain

Mwale, Mabvuto (2016-03)

Thesis (MSc)--Stellenbosch University, 2016

Thesis

ENGLISH ABSTRACT : Bitcoin is a peer to peer (P2P) electronic payment system proposed by Nakamoto in 2008. Central to the operation of Bitcoin is the blockchain, which is, in essence, a public ledger of all transactions. The blockchain is maintained by a group of volunteers called miners, who are rewarded with bitcoins for successfully mining blocks. Mining a block involves collecting and validating transactions, adding validated transactions to a block, and finally adding the block to the blockchain and broadcasting the block to the peer network. The purpose of this thesis is to examine the profitability of block discarding attacks in the Bitcoin network. To this end, we developed a discrete event simulator to model the dynamics of the blockchain. We use a simplistic network model where all participants are miners. Initially, our investigation focusses on a model where all miners are honest, following the Bitcoin rules, and all block transmissions are subject to delays. We show that the delays cause forks to occur in the blockchain, which are quickly resolved. The simulation results for our network model closely agree with those observed from the real Bitcoin network. We then examine a block discarding attack referred to as selfish-mine [32], where it is claimed that a small group of colluding miners can subvert the Bitcoin protocol. We evaluate this claim using relative revenue (the fraction of the total revenue that is credited to the pool of colluding miners) and confirmed blocks (the absolute number of blocks credited to the pool of colluding miners at the end of a mining period) for the case where there is instantaneous block transmission, and the case where block transmission is subject to delays. We show that this claim is true for the first case. However, for the latter case, selfish-mine is only profitable (in terms of the relative revenue) when the pool commands more than 30% of the total computing power of the network. We further show that a higher relative revenue does not necessarily entail a larger number of confirmed blocks and that the presence of selfish-mine causes both the honest and the dishonest miners to fare worse. Finally we present a generalized form of selfish-mine, representing a greater variety of block discarding attacks, and use a genetic algorithm to search for an optimal configuration of the generalized selfish-mine that yields a better performance for the pool. We attempt to maximize either the relative revenue or the number of confirmed blocks. Our results show that the generalized form of selfish-mine when optimally configured yields better performance than standard selfish-mine, both in terms of the relative revenue and confirmed blocks.

AFRIKAANSE OPSOMMING : Bitcoin is 'n stelsel vir elektroniese betalings van portuur tot portuur (P2P) waarmee Nakamoto in 2008 vorendag gekom het. Die werking van Bitcoin draai om die blokketting, wat in wese 'n openbare grootboek van alle transaksies is. Die blokketting word bygehou deur 'n groep vrywilligers wat as myners bekend is, wat met bitcoins beloon word indien hulle blokke suksesvol ontgin. Die ontginning van 'n blok behels die insameling en stawing van transaksies, waarna gestaafde transaksies by 'n blok bygevoeg, die blok aan die blokketting gehaak en dan na die P2Pnetwerk versend word. Die doel van hierdie tesis is om die winsgewendheid van blokverwerpingsaanvalle in die Bitcoin-netwerk te ondersoek. Hiervoor is 'n diskrete gebeurtenissimuleerder ontwikkel om die dinamiek van die blokketting te modelleer. 'n Simplistiese netwerkmodel word gebruik waarin alle deelnemers myners is. Aanvanklik konsentreer die ondersoek op 'n model waarin alle myners eerlik is en die Bitcoin-reëls volg, en waarin alle blokversendings aan vertragings onderworpe is. Daar word aangetoon dat die vertragings vertakkings in die blokketting veroorsaak, wat vinnig uitgestryk word. Die simulasieresultate uit die netwerkmodel stem grootliks ooreen met wat in die werklike Bitcoinnetwerk waargeneem word. Daarna word 'n blokverwerpingsaanval wat as 'selfsugtige ontginning' bekend is [32], ondersoek, waar 'n klein groep myners na bewering kan saamspan om die Bitcoin-protokol te ondermyn. Hierdie bewering word beoordeel aan die hand van relatiewe inkomste (die fraksie van totale inkomste wat aan die betrokke groep myners toegeskryf kan word) en bevestigde blokke (die absolute getal blokke wat aan die einde van 'n ontginningstydperk aan die groep myners toegeskryf kan word) in 'n scenario van onmiddellike blokversending sowel as 'n scenario waar blokversending aan vertragings onderworpe is. Daar word aangetoon dat hierdie bewering waar is in die eerste scenario. In die tweede scenario is selfsugtige ontginning slegs winsgewend (wat relatiewe inkomste betref) indien die groep meer as 30% van die algehele berekeningsvermoë van die netwerk beheer. Die studie toon ook dat 'n hoër relatiewe inkomste nie noodwendig 'n groter getal bevestigde blokke behels nie, en dat die aanwesigheid van selfsugtige ontginning eerlike sowel as oneerlike myners se prestasie verswak. Laastens word 'n veralgemeende vorm van selfsugtige ontginning aangebied wat 'n groter verskeidenheid blokverwerpingsaanvalle voorstel. 'n Genetiese algoritme word gebruik om 'n optimale konfigurasie van die veralgemeende selfsugtige ontginning te bepaal wat 'n beter prestasie vir die groep oplewer. Hiervoor probeer die navorser hetsy die relatiewe inkomste of die getal bevestigde blokke maksimaliseer. Die resultate toon dat die veralgemeende vorm van selfsugtige ontginning in die optimale konfigurasie beter prestasie as standaardselfsugtige ontginning oplewer wat relatiewe inkomste sowel as bevestigde blokke betref.

Please refer to this item in SUNScholar by using the following persistent URL: http://hdl.handle.net/10019.1/98844
This item appears in the following collections: