This is the first of several posts on the Steem platform where we explain the technology behind RaiBlocks.
In today's post, we explain how the RaiBlocks cryptocurrency platform is capable of processing an unlimited number of transactions per second, termed transaction throughput. RaiBlocks does this by requiring senders and recipients to order their own respective transactions. Prevailing technologies, like Bitcoin, order transactions through a wasteful competition, severely limiting their throughput. The ability to support unlimited throughput allows RaiBlocks to eliminate transactions fees, in contrast to Bitcoin which has exorbitant fees. Unlimited throughput is requisite for applications such as machine-to-machine commerce (also known as the “internet-of-things”, or IOT for short) and micropayments.
Transactions Must be Recorded in the Proper Order
A central problem of any accounting system is that of tallying transactions in the right order. To understand the significance of ordering, consider the following set of transactions to and from a single account (that we call “Account A”), starting with a balance of 0 coins.
- Account A receives 10 coins. [balance = 10]
- Account A sends 15 coins. [balance = -5]
- Account A receives 10 coins. [balance = 5]
If the transactions are tallied in the order written, Account A will have a negative balance of -5 coins after transaction #2. For cryptocurrencies, that have potentially anonymous accounts, negative balances are completely impractical. The reason is obvious: there would be nothing to stop a malefactor from incurring a negative balance in Account A, sending the surplus to Account B, and then walking away with their ill-gotten profit, leaving a perpetually unpaid “debt” in Account A.
In the example above, the existence of a negative balance is not necessary because the number of coins received (credited) exceeds the number sent (debited) after all transactions are tallied. The transactions need only to be ordered correctly to prevent the occurrence of a negative balance during the process:
- Account A receives 10 coins. [balance = 10]
- Account A receives 10 coins. [balance = 20]
- Account A sends 15 coins. [balance = 5]
Decentralization Requires the Ordering of Transactions
A cryptocurrency platform like RaiBlocks involves many users who interact with the platform independently. These users do not coordinate with each other when they send funds, and their accounting records (called ledgers) are not synchronized with a central copy. Additionally, no central authority exists to restrict how these users interact with the platform. To reflect the lack of centralization, cryptocurrencies are termed to be decentralized.
In a decentralized transaction system, it is impossible to restrict when users decide to send transactions, or to force them to create perfectly consistent timestamps that specify in what order the transactions should be processed. Instead, responsibility is typically delegated to individuals, called miners, who sift through groups (called blocks) of transactions and create a consistent ordering that does not eventuate undesirable outcomes such as negative balances. For this effort, these miners are awarded an income, which amounts to a tax on the rest of the system.
Inefficient Ordering in Bitcoin Necessitates High Transaction Fees
In Bitcoin, this tax is enormous, and is reflected both in transaction fees and the so-called block reward. At the moment I type this, Bitcoin fees are atypically low for Bitcoin, at about $1.20 per transaction. Even so, $1.20 is an unreasonable fee for most values users may want to send. For example, a $1.20 fee represents a 12% fee on a $10 transaction. With fees of this size, Bitcoin cannot be used in many parts of the world where $1.20 might represent a day’s or even several days’ pay.
The reason that Bitcoin fees are so high is that miners must not only do the work to order transactions, but compete in an energy-intensive computational contest that gives the winner the authority to order a particular block of transactions and certify them. This contest is called proof-of-work, and is the way the network finds agreement, or consensus. Although not a perfectly accurate way to describe it, one may think of consensus as a network-wide agreement on the balance of every account in the network. As it turns out, proof-of-work is the original consensus technology that underpins the success of distributed cash like Bitcoin.
For winning the proof-of-work contest, and for processing the transactions, the winner claims all the fees paid in the block of transactions. Additionally, the winner claims a block reward of new bitcoin. In principle, the value of this bitcoin competes with the previously existing bitcoin, exerting downward pressure on the price of all Bitcoin in the network. Therefore, block rewards dilute the bitcoin supply through inflation, and in this sense represent a tax on the entire network.
Since Bitcoin was created, newer consensus technologies that use much less energy have been introduced. Most notable is proof-of-stake. Although these technologies may eventually prove to be more successful than proof-of-work, they still solve the ordering problem in fundamentally the same way as Bitcoin: through a contest. In proof-of-stake, this contest is decided by both luck and how much stake (coins) the competing block signers have. Inefficiency manifests in a variety of ways, and all degrade the performance of proof-of-stake cryptocurrencies.
Inefficient Ordering Limits Transaction Throughput
The insolubility of the transaction ordering problem, as approached by proof-of-work and proof-of-stake systems, is reflected by the limited speed that networks of these types can process transactions. On the low end, Bitcoin can process at most seven transactions per second (7 tps). At the high end, the BitShares network, which uses a partially-centralized consensus technology called delegated proof-of-stake, can process about 100,000 tps. Although 100,000 tps is staggering when compared to Bitcoin, it does not approach the ideal throughput, which is unlimited.
RaiBlocks Drastically Increases Throughput by Requiring Account Holders to Order Transactions
The reason RaiBlocks is unique in its ability to offer unlimited throughput is that it takes a potentially revolutionary approach to transaction ordering: account holders assign a transaction order for both debit and credit transactions. To understand what that means, consider the following two sets of transactions:
Transaction Set I
- Account X receives 10 coins
- Account X sends 10 coins
Transaction Set II
- Account X receives 10 coins
- Account Y sends 10 coins
Obviously, Transaction Set I must be properly ordered to prevent a potential negative balance of Account X. If transaction #2 precedes #1, then Account X may at some time have a balance of as much as -10 coins. However, the ordering of Transaction Set II is irrelevant: either transaction #3 or transaction #4 can come first, without affecting the balances of the two involved accounts (X and Y).
It should be clear from this example that it is possible for an account to order its own debits and credits, without the involvement of third parties, like miners. In this example, therefore, Account X can solely determine the ordering of transactions #1 and #2.
It turns out that requiring accounts to order their own transactions eliminates almost all sources of conflict in a cryptocurrency network, meaning that achieving consensus is vastly easier for RaiBlocks than Bitcoin, for example. Bitcoin, and practically all other cryptocurrencies, order transactions through a competition, unnecessarily creating consensus problems that RaiBlocks does not have.
Developer's Sketch of How He Envisions Transaction Ordering in RaiBlocks
The above sketch was penned by lead devloper, Colin LeMahieu, when describing RaiBlocks transaction ordering for some other team members. Although not explained herein, we thought it looked pretty neat, so decided to make it the cover photo for this post.
In the future, we will go into more details about ordering and other RaiBlocks topics.
Comparison of RaiBlocks to Other Cryptocurrencies
This chart compares RaiBlocks to what we think are its most prominent competitors, IOTA and Bitcoin. Checkmarks are where we think RaiBlocks is superior. Several terms in this chart are probably not clear to readers, but don't worry, we will explain everything over time.