BitShares Whitepaper

Thursday, May 2, 2019
Download document
Save for later
Add to list

T HE B IT S HARES B LOCKCHAIN BitShares Blockchain Foundation officially approved spokesperson of the BitShares Blockchain www.bitshares.foundation [email protected] Abstract—The BitShares Blockchain is an industrial-grade 2.2 Blockchain decentralized platform built for high-performance financial smart contracts. It represents the first decentralized au- The Blockchain serves as a journal (e.g. a ledger) of user-signed tonomous community that lets its core token holder decide instructions that become a binding agreement as soon as they on its future direction and products. are included into a block. After inclusion into a block, the agreements are stored indefinitely by means of a hash-linked- list (the Blockchain). From this ordered sequence of transactions, a current state (think: account balances) can be determined by 1 Introduction processing all transactions consecutively starting at the very first block. As we will see later, the software will ensure that The BitShares Blockchain, as it exists today, was launched on instructions that are stored in the Blockchain have been success- 13th October 2015 with its community being established already fully authenticated and validated. For validating and processing in 2013. It implements an industrial-grade decentralized platform of operations, a common set of rules define the consequences built for high-performance smart contracts with focus on the of particular actions, which are part of the of the blockchain financial technologies sector. protocol (see section 2.5). Furthermore, BitShares represents the first decentralized au- tonomous cooperation that lets holders of its core native token BTS decide on its future direction and governance aspects. For 2.3 Networking sake of clarity and to avoid confusion with other smart contract- A blockchain merely defines a means of storage and can be ing platforms, the BitShares Blockchain implements its contracts used in a non-distributed, single-participant fashion as well as in form of operations . Even though the BitShares Blockchain in a distributed internet-based mesh network often referred to as comes with over 50 already implemented operations which de- Peer-2-Peer (P2P) network. In the latter case, multiple parties are serve to be presented, this document focuses on the description connected with each other in a way that incoming transactions of the BitShares Blockchain as a platform, its architecture as well are forwarded to every other connected participant. A transaction as its governance system using the core native token BTS. ultimately reaches a so called block producer. A block producer verifies incoming transactions against a hard-coded protocol and 2 Architecture bundles them into a single block that is added to the existing blockchain. At this point, a transaction is considered confirmed The BitShares Blockchain constitutes the following components and executed. The effects of an executed operation on the current which are described individually. state are defined in the blockchain protocol (see section 2.5). 2.1 Transactions 2.4 Consensus Consensus is the process by which a community comes to a When users want to interact with any Blockchain, they construct universally recognized, unambiguous agreement on a piece of in- so called transactions and transmit to the network (see sec- formation. In the context of blockchains, consensus means agree- tion 2.3). These present messages that contain instructions about ment about the validity rules for transactions (i.e. the blockchain what particular operation(s) a user wants to use. A common op- protocol - see section 2.5), and the order in which they have eration is the simple transfer operation that comes with transfer- been observed by the blockchain. This ultimately results in an specific instructions that provides the necessary information for agreement about the current state that is build deterministically this action, such as the sender, receiver, the amount to transfer from those validity rules and the sequence of transactions. as well as an optional encrypted memo. To allow multiple op- erations to take place subsequently, multiple operations can be The most commonly known consensus scheme is Proof-of- bundled into a single transaction. Work (PoW). Most dominant disadvantage is the heavy power To identify against the system, transactions are cryptographically consumption and the scalability in terms of transactions per signed by the users. These signatures authenticate a user and second and confirmation times. The BitShares Blockchain makes provide authorization for the operations in the transaction. use of an algorithm called Delegated Proof of Stake (DPoS) that was developed specifically to replace the wasteful ’mining’ process, increase throughput and reduce reaction times of the Release: 20180906

2.5 P ROTOCOL 2 blockchain. It is a tremendous improvement when it comes to 2.6 Extensibility consumption of electricity. The Software behind the BitShares Blockchain is extensively DPoS allows to generate a new block at fixed rate (block modularized and implements its operations independently of production/confirmation time) with minimal computational re- each other. This allows for adding new features once the corre- quirements. This means that the blockchain can process more sponding code, which the implements validation, evaluation and transactions in significantly less time and at almost no cost application methods, reaches maturity. In a sense, operations on when compared to PoW-based Blockchains1 . Block production the BitShares Blockchain are smart-contracts and allows for ex- is performed by a set of so called witnesses (block producers) tending the range of functions of the system. In contrast to other that take turns. After every turn, the order of block producers is smart-contracting platforms, however, the BitShares Blockchain randomized in a deterministic manner such that all parties agree requires new features to be vetted by the core developers and on the new order. approved by the BTS holders before they can be installed by means of a network-wide protocol upgrade. As a consequence 2.5 Protocol the platform is considered much more solid as new features The most essential part of blockchain technologies is here re- require to go through multiple stages of quality assurance. These ferred to as blockchain protocol. It defines the behavior of the protocol upgrades are well coordinated and already happened 28 entire system including consequences and side-effects when pro- times (Q3/2018) in the past. cessing transactions. Users utilize particular features by crafting a transaction that contains a particular letter-of-interest (also 2.7 Performance and Scalability referred to as operation). Since the Blockchain, as a storage, only stores incremental The BitShares Blockchain publicly demonstrated sustaining over changes (e.g. transfers), the final balance of each account to- 3,000 (three thousand) transactions per second and over 22,000 gether with other information needs to be tracked separately in operations per second on a distributed test network. This tech- the current state. nology can easily scale to over 100,000 (hundred thousand) It is important to note that the protocol is deterministic in the or more transactions per second with relatively straightforward sense that the very same state is generated when applying the improvements to server capacity and communication protocols. same sequence of operations (as provided by the blockchain). To achieve this industry-leading performance, BitShares 2 has This makes blockchain technologies tamper proof and auditable. borrowed lessons learned from the LMAX Exchange , which is In BitShares, over 50 operations are available (as of early able to process 6 million transactions per second. Among these 2018). Each of them hooks into the Blockchain protocol at least lessons are the following key points: three times: • Keep everything in memory. • Validation: During validation, the raw instructions (also • Keep the core business logic in a single thread. referred to as payload) are checked for consistency. E.g., • Keep cryptographic operations (hashes and signatures) out in case of a transfer, we ensure that the amount to transfer is of the core business logic. positive. • Divide validation into state-dependent and state- • Evaluation: In the evaluation step, the operation-specific independent checks. instruction is validated against the current state of the • Use an object oriented data model. blockchain. In case of a transfer, we here ensure that the By following these simple rules, BitShares is theoretically able to amount to be transferred is available in the account of the process >10,000 (ten thousand) transactions per second without sender. • Application: This step takes action in the sense that it any significant effort devoted to optimization. To put things modifies the current state. In the case of a transfer, we here into perspective3 , at peak times, the Ethereum and Bitcoin reduce the account balance of the sender and increase the Blockchain jointly process roughly 0.7% of the peak capacity account balance of the receiver according to the amount of of the BitShares Blockchain (Q1/2018) as prove from distributed tokens transferred. stress testing. Example: Transfer operation Consider a simple transfer 3 Identity operation that sends funds from one account to another. Here, the protocol defines the validation rules such that negative amounts BitShares makes use of human-readable account names that have are prevented. The evaluation ensures that the sender cannot to be registered together with public-keys in the blockchain prior transfer more than what is in his account balance. When applying to its usage. Thus, the blockchain acts as a name-to-public-key a transfer from Alice to Bob, Alice is credited the transferred resolver similar to the traditional domain name service (DNS). amount while Bob receives the amount. Here, transfer refers These named accounts enable users to easily remember and to the operation type, while the sender, receiver, and amount communicate their account information instead of using error- refers to the operation-specific instructions. Obviously, different prone addresses. Depending on individual needs, applications operation types come with different instructions. making use of the BitShares Blockchain can create environments 1 https://steemit.com/dpos/@dantheman/dpos-consensus- 2 https://martinfowler.com/articles/lmax.html algorithm-this-missing-white-paper 3 http://blocktivity.info/ Release: 20180906

3.1 P ERMISSIONS 3 which have full KYC (Know Your Customer) support through 3.5 Fees so called whitelisting which enables a maximum of control or Similar to most other Blockchains, interacting with the BitShares transparency when so desired. Blockchains comes with a fee for using its features (i.e. oper- ations). Each operation comes with its own fee. However, any 3.1 Permissions other token that is registered on the BitShares Blockchain, next to the core native BTS token, can be used as fee, if the governor The BitShares Blockchain designs permissions around accounts, of the other token chooses to support that. rather than around cryptography, making it easier to use. Every account can be controlled by weighted combination of other accounts and/or keys. This creates a hierarchical structure that 4 BTS - The Utility Token reflects how permissions are organized in real life, and makes The core native token of the BitShares Blockchain, BTS, serves multi-user control over funds easier for users. Hence, BitShares as a utility token and offers governance properties to its holders. does technically not have multi-signature accounts, but has Governance describes the progress of governing the Blockchains multi-account permissions. That said, each public/private key many variable aspects in a way it it can adapt to future changes pair is assigned a weight, and a threshold is defined for the more easily. authority (see definition below). In order for a transaction to be valid, enough entities must sign so that the sum of their weights meets or exceeds the threshold. 4.1 Governance On the BitShares Blockchain, decisions are made by the holders 3.2 Authorities of BTS core native token weighted by the amount of BTS owned. In order to improve voting participation and simplify the life of The BitShares Blockchain employs a first of its kind hierarchical BTS holders, voters can either vote directly or delegate voting private key system to facilitate regular keys and backup keys. power to so called proxies. This is similar to a representative Regular (active) keys are for day-to-day usage, while a separate democracy, where selected persons decide the course of action. backup (owner) key can be used to recover access to an account Those leaders have to account for their actions and can be in case of loss of the regular keys. Ideally the owner key is unelected by the core token holders. Unwanted actions includes meant to be stored offline, and only used when the account’s keys censoring, favoring, or simply failure to produce blocks in a need to be changed or to recover a lost key. Most software that timely manner. However, the difference to a democracy is that supports the BitShares Blockchain also facilitates the use of a voters in the community have their vote weighted by the amount Master Password that encrypts the client’s keys locally. of BTS that they own in their account. At any time, voters have to decide on the following aspects of the BitShares Blockchain. 3.3 Encrypted Memos An account on the BitShares Blockchain has a so called memo Members for Block Production (Witnesses) Block pro- public key associated with it that allows for initiating encrypted duction in BitShares is arranged through DPoS which requires communications between two parties by means of a shared block producers to run for witness and campaign for sufficient secret4 obtain via the Elliptic-curve Diffie-Hellman Algorithm. votes from BTS holders before they can produce blocks on the This allows to attach encrypted messages to transfers that only blockchain and consequently get rewarded per produced block. sender and receiver can decrypt. Given the governance system and quick re-tallying of votes, a misbehaving block producer can be dismissed within hours. Next to the actual selection of block producers, the voters also have a 3.4 Referral Program say over how many block producers should exist. Furthermore, the BitShares Blockchain has an integrated one- level referral system. Basically, everyone interacting on the Bit- Members for Blockchain Governance (Committee) Shares blockchain needs to deduct a transaction fee. From that The Committee comprises a board that has control over a few fee (currently) 20% go into the Working Budget (for future fund- blockchain parameters such as block size, block time, witness ing of development etc.) and the other 80% go into the referral reward, and over 30 others. Additionally, the committee can program from where, the registrar (who pays the registration fee change the fee schedule which defines the minimum fee for each and assisted the registration process) as well as the referrer (who operation offered by the system. Voters can cast a vote for how brought the user to the registrar) receive a reward. To opt-out of many members the committee should constitute as well as vote the referral program, an account can be upgraded to a so called for a particular set of members. Life-Time Member (LTM) which replaces registrar and referrer for the original user to receive a 80% refund on his fees. Project Funding (Workers) Last but not least, the voters 4A have control over who receives funding from the Working Budget shared secret is a term known from cryptography and describes a piece of data, known only to the parties involved in a specific secure communication. of the Blockchain. A worker applies for project funding and The secret can be a password, a passphrase, a big number or any data as long needs to campaign for sufficient votes before being rewarded. as it is randomly chosen. Similar to block producers and committee members, the rigorous Release: 20180906

4.2 I NITIAL A LLOCATION 4 voting system allows almost immediate removal by BTS holders Block Production (Witnesses) Block production comes at and proxies. a cost for running and maintaining equipment. The BitShares Blockchain acknowledges this fact by rewarding block producers in core BTS tokens per produced block. Depending on the 4.2 Initial Allocation valuation of BTS, the committee can modify the amount of BTS rewarded per block. As of Q1/2018, each block is rewarded with The way that BitShares, as it exists today, came into existence 1 BTS. Those BTS are taken from the working budget. is well documented in the archives of bitsharestalk.org. The BitShares Blockchain was created on 13th of October 2015 Project Funding (Workers) A certain amount of the daily by the community and block producers of BitShares 0.9 who available tokens can be allocated to make development possible decided to start a new token with a distribution identical to where by means of workers. Anyone can set up a worker on the 0.9 had evolved. It was based on code developed with private BitShares Blockchain and ask for a daily allowance in BTS. If the resources and given to the world for anyone to use under the MIT BTS holders approve a particular worker, the BTS are transferred license. The previous BitShares 0.9 Blockchain was abandoned from the daily budget. A soft-limit defines the maximum amount by the community who had the option to continue that chain but of the daily budget that is given to all approved workers. Conse- declined to do so. quently, those workers that have received more votes from BTS In the genesis block of the BitShares Blockchain a total of holders will receive their funds first. This means that workers, 2,412,042,197.37963 BTS have been distributed to individual even if approved, may not be funded if the aforementioned keys accordingly. These BTS can still be claimed by proving threshold is hit. Furthermore, workers constantly stand under the ownership of the corresponding private key. scrutiny of the BTS holders who can disapprove (i.e. retract their The BTS token comes with a limited supply that is dif- vote, ’fire’) workers that do not deliver. ferent from circulating (liquid) supply. A max supply of 3,600,570,502.10207 BTS has been put in place on the blockchain. This can never change. The difference of initial 4.5 Transaction Fees & Fee Schedule roughly 1.1B was set aside for future project funding and reward- Additional to block production and project funding which can ing block producers, and is only accessible with approval by the drain tokens from the working budget, there are transaction fees BTS holders through the worker system. This so called working paid by users of the BitShares Blockchain that go back into the budget is also often referred to as reserves. It is worth noting working budget. As a consequence, the total amount of BTS in that revenues made from transactions fees are not shared with the working budget as well as the total in- and out-flow highly holders of BTS but instead go back into the working budget to varies over time. However, if compared to most proof-of-work- further allow future development. There is no reward for holding based Blockchains that constantly reward a (more or less) fixed the core BTS token in any way. amount of tokens to miners, the BitShares Blockchain has a chance to have the working budget grow and consequently the circulating supply shrink. This is the case if the total transactions 4.3 Supply fees outweigh the tokens used for block production and project funding. In this section, we would like to discuss the actual supply of While, the BTS holders have choices to either increase or de- the core BTS token in more detail. Firstly, we define the max crease the funds used for block production and project fund- supply as that supply that can at most be in circulation, similar to ing, the committee has the choice to adapt the transaction fees how there will only ever be up to 21 million BTC on the Bitcoin by means of updating the fee schedule. In contrast to other Blockchain. Furthermore, the circulating supply represents that Blockchains, the BitShares Blockchain comes with fixed fees amount that currently is in circulation and held by participants on instead of a fee market5 . The schedule defines which feature the Blockchain. Obviously, the circulating supply will always be of the Blockchain requires which amount of transaction fee for smaller than or equal to the max supply. Furthermore, for voting, using it. only the circulating supply applies. 4.6 Legality of the BTS token 4.4 Working Budget It is worth noting that the BitShares Blockchain is not a tra- ditional registered entity and has no seat. The core token BTS The difference between max supply and circulating supply is does not imply any ownership rights. The core token merely called the Working Budget and has often in the past been referred serves as a utility for governance, arranging transaction fees to as the reserves. The BitShares Blockchain has a daily budget and operating other features that are solely implemented on the to use for development. This budget has a hard-coded upper limit BitShares Blockchain. of Total funds in the working budget/2924. From this daily budget, block production as well as for project funding are made. Of course, the BTS holders have the choice and need to approve BTS tokens leaving the working budget. 5 https://arxiv.org/abs/1709.08881 Release: 20180906