Raiblocks [XRB] Is A Fee-Less Cryptocurrency Network Giving Bitcoin A Run For Its Money
Since the implementation of Bitcoin in 2009, there has been a growing shift away from traditional, government backed currencies and financial systems towards modern payments systems based on cryptography, which offer the ability to store and transfer funds in a trust-less and secure manner . In order to function effectively, a currency must be easily transferable, non-reversible, and have limited or no fees. The increased transaction times, large fees, and questionable network scalability have raised questions about the practicality of Bitcoin as an everyday currency. In this paper, we introduce RaiBlocks, a low-latency cryptocurrency built on an innovative block-lattice data structure offering unlimited scalability and no transaction fees. RaiBlocks by design is a simple protocol with the sole purpose of being a high-performance cryptocurrency. The RaiBlocks protocol can run on low-power hardware, allowing it to be a practical, decentralised cryptocurrency for everyday use. Cryptocurrency statistics reported in this paper are accurate as of publication date.
RaiBlocks – Background
In 2008, an anonymous individual under the pseudonym Satoshi Nakamoto published a white-paper outlining the world’s first decentralised cryptocurrency, Bitcoin . A key innovation brought about by Bitcoin was the blockchain, a public, immutable and decentralised data-structure which is used as a ledger for the currency’s transactions. Unfortunately, as Bitcoin matured, several issues in the protocol made Bitcoin prohibitive for many applications:
- Poor scalability: Each block in the blockchain can store a limited amount of data, which means the system can only process so many transactions per second, making spots in a block a commodity. Currently the median transaction fee is $10.38.
- High latency: The average confirmation time is 164 minutes.
- Power inefficient: The Bitcoin network consumes an estimated 27.28TWh per year, using on average 260KWh per transaction.
Bitcoin, and other cryptocurrencies, function by achieving consensus on their global ledgers in order to verify legitimate transactions while resisting malicious actors. Bitcoin achieves consensus via an economic measure called Proof of Work (PoW). In a PoW system participants compete to compute a number, called a nonce, such that the hash of the entire block is in a target range. This valid range is inversely proportional to the cumulative computation power of the entire Bitcoin network in order to maintain a consistent average time taken to find a valid nonce. The finder of a valid nonce is then allowed to add the block to the blockchain; therefore, those who exhaust more computational resources to compute a nonce play a greater role in the state of the blockchain. PoW provides resistance against a Sybil attack, where an entity behaves as multiple entities to gain additional power in a decentralised system, and also greatly reduces race conditions that inherently exist while accessing a global data- structure. An alternative consensus protocol, Proof of Stake (PoS), was first introduced by Peercoin in 2012.
In a PoS system, participants vote with a weight equivalent to the amount of wealth they possess in a given cryptocurrency. With this arrangement, those who have a greater financial investment are given more power and are inherently incentivised to maintain the honesty of the system or risk losing their investment. PoS does away with the wasteful computation power competition, only requiring light- weight software running on low power hardware. The original RaiBlocks paper and first beta implementation were published in December, 2014, making it one of the first Directed Acyclic Graph (DAG) based cryptocurrencies.
Soon after, other DAG cryptocurrencies began to develop, most notably DagCoin/Byteball and IOTA. These DAG-based cryptocurrencies broke the blockchain mold, improving system performance and security. Byteball achieves consensus by relying on a “main-chain” comprised of honest, reputable and user-trusted “witnesses”, while IOTA achieves consensus via the cumulative PoW of stacked transactions.
Signing algorithm – ED25519
ED25519 is an elliptic curve algorithm developed in an academic setting with a focus on security from side channel attack, performance, and fixing a lot of the little annoyances in most elliptic curve systems. More information can be found here http:// ed25519.cr.yp.to/
Hashing algorithm – Blake2
Compared to existing cryptocurrencies, the hash algorithm chosen is much less important since it’s not being used in a proof of work context. In our implementation hashing is used purely as a digest algorithm against block contents. Blake2 is a highly optimized cryptographic hash function who’s predecessor was a SHA3 finalist. More information can be found here https://blake2.net/
Key derivation function – Argon2
The KDF is used for securing the account keys in the reference wallet.
Block interval – Instant
With raiblocks, each account has its own block chain and can update this chain independent of anyone else in the network. This metric is actually non-applicable however we include it since it’s a standard metric for other cryptocurrencies.
UDP message protocol
Our system is designed to operate indefinitely using the minimum amount of computing resources as possible. All messages in the system were designed to be stateless and fit within a single UDP packet. This also makes it easier for lite peers with intermittent connectivity to participate in the network without reestablishing short-term TCP connections. TCP is used only for new peers when they want to bootstrap the block chains in a bulk fashion.
The system is built to completely support both IPV4 and IPV6.
Permanent storage minimisation
- Blocks in the ledger track balance values rather than balance deltas which allows much more aggressive pruning in lite clients.
- Balances are only stored when necessary e.g. send blocks and inferred when possible e.g. receive blocks.
◦ The supply should be able to deal with deflation over time as accounts are abandoned The supply starts with 2^128 – 1 which satisfies the three supply requirements.
Lite peers and pruning
Since each account operates on its own block chain, lite peers are able to do much more selective and aggressive pruning of the block chains. Only bootstrap or peers interested in doing full ledger validation actually need to store the full ledger history.
- For each account only the frontier block needs to be kept in order to validate a subsequent block via hash chaining.
- Since send blocks contain an account’s balance, in order to calculate the balance from the block chain, only blocks up to the last send need to be kept.
Chains for inactive or small balance accounts can be dropped and left for full-validating peers to track.
RaiBlocks is pronounced like “ray blocks” and is named after Rai Stones from Yap. I always was fascinated by the use of Rai Stones as currency and appreciate the irony of naming a practical cryptocurrency after a wildly impractical currency.
Blocks are fixed size to minimize framing overhead and storing counts.
Proof of stake agreements
It’s possible for the network to see a block chain fork in the case of someone crafting a malicious ledger client. Unlike existing cryptocurrency systems, forks are an almost non-existent event and are designed to only affect the malicious account instead of the entire ledger. We use a simple proof of stake weighted by account balance for peers in the network to come to consensus about which fork to choose.
Proof of stake representatives
Many peers will not want to stay connected to the network in order to participate in proof of stake agreements if the need arises. We also don’t want to require a signature and network message from every account for every conflict. Each account is able to select another account as its representative which is able to vote with the balance owned by the account and the representative can be changed when desired. In this way many small accounts can be consolidated to a single large proof of stake vote by a peer that is willing to stay well connected to the network.
There are three important aspects of divisibility of the supply.
- The supply needs to be able to be divided up amongst a large number of users with users possibly wanting several accounts.
- Each account needs to be able to represent an adequate dynamic range of value.