Ravencoin is a collection of concepts and technologies that form the basis of a digital money ecosystem. Units of currency called ravencoins are used to store and transmit value among participants in the Ravencoin network. Ravencoin users communicate with each other using the Ravencoin protocol primarily via the Internet, although other transport networks can also be used. The Ravencoin protocol stack, available as open source software, can be run on a wide range of computing devices, including laptops and smartphones, making the technology easily accessible.
Users can transfer ravencoins over the network to do just about anything that can be done with conventional currencies, including buy and sell goods, send money to people or organizations, or extend credit. Ravencoins can be purchased, sold, and exchanged for other currencies at specialized currency exchanges. Ravencoin in a sense is the perfect form of money for the Internet because it is fast, secure, and borderless.
Unlike traditional currencies, ravencoins are entirely virtual. There are no physical coins or even digital coins per se. The coins are implied in transactions that transfer value from sender to recipient. Users of Ravencoin own keys that allow them to prove ownership of transactions in the Ravencoin network, unlocking the value to spend it and transfer it to a new recipient. Those keys are often stored in a digital wallet on each user’s computer. Possession of the key that unlocks a transaction is the only prerequisite to spending ravencoins, putting the control entirely in the hands of each user.
Ravencoin is a distributed, peer-to-peer system. As such there is no "central" server or point of control. ravencoins are created through a process called "mining," which involves competing to find solutions to a mathematical problem while processing Ravencoin transactions. Any participant in the Ravencoin network (i.e., anyone using a device running the full Ravencoin protocol stack) may operate as a miner, using their computer’s processing power to verify and record transactions. Every 1 minutes on average, someone is able to validate the transactions of the past 1 minutes and is rewarded with brand new ravencoins. Essentially, Ravencoin mining decentralizes the currency-issuance and clearing functions of a central bank and replaces the need for any central bank with this global competition.
The Ravencoin protocol includes built-in algorithms that regulate the mining function across the network. The difficulty of the processing task that miners must perform—to successfully record a block of transactions for the Ravencoin network—is adjusted dynamically so that, on average, someone succeeds every 1 minute regardless of how many miners (and CPUs) are working on the task at any moment. The protocol also halves the rate at which new ravencoins are created every four years, and limits the total number of ravencoins that will be created to a fixed total of 21 billion coins. The result is that the number of ravencoins in circulation closely follows an easily predictable curve that reaches 21 billion by the year 2140. Due to Ravencoin’s diminishing rate of issuance, over the long term, the Ravencoin currency is deflationary. Furthermore, Ravencoin cannot be inflated by "printing" new money above and beyond the expected issuance rate.
Behind the scenes, Ravencoin is also the name of the protocol, a network, and a distributed computing innovation. The Ravencoin currency is really only the first application of this invention. As a developer, I see Ravencoin as akin to the Internet of money, a network for propagating value and securing the ownership of digital assets via distributed computation. There’s a lot more to Ravencoin than first meets the eye.
In this chapter we’ll get started by explaining some of the main concepts and terms, getting the necessary software, and using Ravencoin for simple transactions. In following chapters we’ll start unwrapping the layers of technology that make Ravencoin possible and examine the inner workings of the Ravencoin network and protocol.
The emergence of viable digital money is closely linked to developments in cryptography. This is not surprising when one considers the fundamental challenges involved with using bits to represent value that can be exchanged for goods and services. Two basic questions for anyone accepting digital money are:
Issuers of paper money are constantly battling the counterfeiting problem by using increasingly sophisticated papers and printing technology. Physical money addresses the double-spend issue easily because the same paper note cannot be in two places at once. Of course, conventional money is also often stored and transmitted digitally. In these cases, the counterfeiting and double-spend issues are handled by clearing all electronic transactions through central authorities that have a global view of the currency in circulation. For digital money, which cannot take advantage of esoteric inks or holographic strips, cryptography provides the basis for trusting the legitimacy of a user’s claim to value. Specifically, cryptographic digital signatures enable a user to sign a digital asset or transaction proving the ownership of that asset. With the appropriate architecture, digital signatures also can be used to address the double-spend issue.
When cryptography started becoming more broadly available and understood in the late 1980s, many researchers began trying to use cryptography to build digital currencies. These early digital currency projects issued digital money, usually backed by a national currency or precious metal such as gold.
Although these earlier digital currencies worked, they were centralized and, as a result, they were easy to attack by governments and hackers. Early digital currencies used a central clearinghouse to settle all transactions at regular intervals, just like a traditional banking system. Unfortunately, in most cases these nascent digital currencies were targeted by worried governments and eventually litigated out of existence. Some failed in spectacular crashes when the parent company liquidated abruptly. To be robust against intervention by antagonists, whether legitimate governments or criminal elements, a decentralized digital currency was needed to avoid a single point of attack. Ravencoin is such a system, completely decentralized by design, and free of any central authority or point of control that can be attacked or corrupted.
Ravencoin represents the culmination of decades of research in cryptography and distributed systems and includes four key innovations brought together in a unique and powerful combination. Ravencoin consists of:
Satoshi Nakamoto’s invention is also a practical solution to a previously unsolved problem in distributed computing, known as the "Byzantine Generals' Problem." Briefly, the problem consists of trying to agree on a course of action by exchanging information over an unreliable and potentially compromised network. Satoshi Nakamoto’s solution, which uses the concept of proof-of-work to achieve consensus without a central trusted authority, represents a breakthrough in distributed computing science and has wide applicability beyond currency. It can be used to achieve consensus on decentralized networks to prove the fairness of elections, lotteries, asset registries, digital notarization, and more.
Ravencoin is a technology, but it expresses money that is fundamentally a language for exchanging value between people. Let’s look at the people who are using ravencoin and some of the most common uses of the currency and protocol through their stories. We will reuse these stories throughout the book to illustrate the real-life uses of digital money and how they are made possible by the various technologies that are part of ravencoin.
Alice lives in Northern California’s Bay Area. She has heard about ravencoin from her techie friends and wants to start using it. We will follow her story as she learns about ravencoin, acquires some, and then spends some of her ravencoin to buy a cup of coffee at Bob’s Cafe in Palo Alto. This story will introduce us to the software, the exchanges, and basic transactions from the perspective of a retail consumer.
Carol is an art gallery owner in San Francisco. She sells expensive paintings for ravencoin. This story will introduce the risks of a "51%" consensus attack for retailers of high-value items.
Bob, the cafe owner in Palo Alto, is building a new website. He has contracted with an Indian web developer, Gopesh, who lives in Bangalore, India. Gopesh has agreed to be paid in ravencoin. This story will examine the use of ravencoin for outsourcing, contract services, and international wire transfers.
Eugenia is the director of a children’s charity in the Philippines. Recently she has discovered ravencoin and wants to use it to reach a whole new group of foreign and domestic donors to fundraise for her charity. She’s also investigating ways to use ravencoin to distribute funds quickly to areas of need. This story will show the use of ravencoin for global fundraising across currencies and borders and the use of an open ledger for transparency in charitable organizations.
Mohammed is an electronics importer in Dubai. He’s trying to use ravencoin to buy electronics from the US and China for import into the UAE to accelerate the process of payments for imports. This story will show how ravencoin can be used for large business-to-business international payments tied to physical goods.
Jing is a computer engineering student in Shanghai. He has built a "mining" rig to mine for ravencoins, using his engineering skills to supplement his income. This story will examine the "industrial" base of ravencoin: the specialized equipment used to secure the ravencoin network and issue new currency.
Each of these stories is based on real people and real industries that are currently using ravencoin to create new markets, new industries, and innovative solutions to global economic issues.
To join the ravencoin network and start using the currency, all a user has to do is download an application or use a web application. Because ravencoin is a standard, there are many implementations of the ravencoin client software. There is also a reference implementation, also known as the Satoshi client, which is managed as an open source project by a team of developers and is derived from the original implementation written by Satoshi Nakamoto.
The three main forms of ravencoin clients are:
A full client, or "full node," is a client that stores the entire history of ravencoin transactions (every transaction by every user, ever), manages the users' wallets, and can initiate transactions directly on the ravencoin network. This is similar to a standalone email server, in that it handles all aspects of the protocol without relying on any other servers or third-party services.
A lightweight client stores the user’s wallet but relies on third-party–owned servers for access to the ravencoin transactions and network. The light client does not store a full copy of all transactions and therefore must trust the third-party servers for transaction validation. This is similar to a standalone email client that connects to a mail server for access to a mailbox, in that it relies on a third party for interactions with the network.
Web clients are accessed through a web browser and store the user’s wallet on a server owned by a third party. This is similar to webmail in that it relies entirely on a third-party server.
Mobile clients for smartphones, such as those based on the Android system, can either operate as full clients, lightweight clients, or web clients. Some mobile clients are synchronized with a web or desktop client, providing a multiplatform wallet across multiple devices but with a common source of funds.
The choice of ravencoin client depends on how much control the user wants over funds. A full client will offer the highest level of control and independence for the user, but in turn puts the burden of backups and security on the user. On the other end of the range of choices, a web client is the easiest to set up and use, but the trade-off with a web client is that counterparty risk is introduced because security and control is shared with the user and the owner of the web service. If a web-wallet service is compromised, as many have been, the users can lose all their funds. Conversely, if users have a full client without adequate backups, they might lose their funds through a computer mishap.
For the purposes of this book, we will be demonstrating the use of a variety of downloadable ravencoin clients, from the reference implementation (the Satoshi client) to web wallets. Some of the examples will require the use of the reference client, which, in addition to being a full client, also exposes APIs to the wallet, network, and transaction services. If you are planning to explore the programmatic interfaces into the ravencoin system, you will need the reference client.
Alice, who we introduced in Ravencoin Uses, Users, and Their Stories, is not a technical user and only recently heard about ravencoin from a friend. She starts her journey by visiting the website ravencoin.online, where she finds a selection of wallets.
Alice follows a link from the ravencoin.online site to download and install a wallet on her desktop. ravencoin.online’s wallet is available for Windows, MacOS and Linux desktops as well as iOS and Android mobile devices.
Once Alice has downloaded and installed the ravencoin.online wallet, she runs it and is greeted by a Welcome screen, as shown in the ravencoin.online wallet Welcome screen.
The most important part of this screen is Alice’s Ravencoin address. Like an email address, Alice can share this address and anyone can use it to send money directly to her new wallet. On the screen it appears as a long string of letters and numbers: qp0fxfqz4hjw7jsghxjpthc04ukzjv324s956a6x46. Next to the wallet’s ravencoin address is a QR code, a form of barcode that contains the same information in a format that can be scanned by a smartphone camera. The QR code is the black-and-white square in the middle of the window. Alice can copy the Ravencoin address or the QR code onto her clipboard by clicking either of each of them.
Alice can also print the QR code as a way to easily give her address to others without them having to type the long string of letters and numbers.
Alice is now ready to start using her new Ravencoin wallet.
There are five other methods for getting Ravencoin as a new user:
Alice has created her Ravencoin wallet and she is now ready to receive funds. Her wallet application randomly generated a private key together with its corresponding Ravencoin address. At this point, her Ravencoin address is not known to the network or "registered" with any part of the Ravencoin system. Her address is simply a number that corresponds to a key that she can use to control access to the funds. There is no account or association between that address and an account. Until the moment this address is referenced as the recipient of value in a transaction posted on the Ravencoin ledger (the blockchain), it is simply part of the vast number of possible addresses that are "valid" in Ravencoin. Once it has been associated with a transaction, it becomes part of the known addresses in the network and Alice can check its balance on the public ledger.
Alice meets her friend Joe, who introduced her to Ravencoin, at a local restaurant so they can exchange some US dollars and put some Ravencoin into her account. She has brought a printout of her address and the QR code as displayed in her Ravencoin wallet. There is nothing sensitive, from a security perspective, about the Ravencoin address. It can be posted anywhere without risking the security of her account.
Alice wants to convert just 10 US dollars into Ravencoin, so as not to risk too much money on this new technology. She gives Joe a $10 bill and the printout of her address so that Joe can send her the equivalent amount of Ravencoin.
Next, Joe has to figure out the exchange rate so that he can give the correct amount of Ravencoin to Alice. There are hundreds of applications and websites that can provide the current market rate. We’ use the ravencoin.online Ravencoin Converter from ravencoin.online.
Joe determines the price of ravencoin to be approximately 725 US dollars per Ravencoin. At that rate he should give Alice 0.0138 Ravencoin, in return for the 10 US dollars she gave him.
Once Joe has established a fair exchange price, he opens his mobile wallet application and selects to "send" ravencoin. Alice's wallet automatically generated a fresh receive address after her previous transaction. Joe scans the barcode with his smartphone camera so that he doesn’t have to type in Alice’s ravencoin address (qqsrpw5n5qwqav285t09tcjxy0nyjyh9ls0tyfu9ym), which is quite long and difficult to type. The mobile wallet application fills in the ravencoin address and Joe can check that it scanned correctly by comparing a few digits from the address with the address on Alice's wallet.
Joe then enters the ravencoin value for the transaction, 0.0138 ravencoin. He carefully checks to make sure he has entered the correct amount, because he is about to transmit money and any mistake could be costly. Finally, he presses Send to transmit the transaction. Joe’s mobile ravencoin wallet constructs a transaction that assigns 0.0138 ravencoin to the address provided by Alice, sourcing the funds from Joe’s wallet and signing the transaction with Joe’s private keys. This tells the Ravencoin network that Joe has authorized a transfer of value from one of his addresses to Alice’s new address. As the transaction is transmitted via the peer-to-peer protocol, it quickly propagates across the Ravencoin network. In less than a second, most of the well-connected nodes in the network receive the transaction and see Alice’s address for the first time.
If Alice has a smartphone or laptop with her, she will also be able to see the transaction. The Ravencoin ledger—a constantly growing file that records every Ravencoin transaction that has ever occurred—is public, meaning that all she has to do is look up her own address and see if any funds have been sent to it. She can do this quite easily at the explorer.ravencoin.online website by entering her address in the search box. The website will show her a page listing all the transactions to and from that address. If Alice is watching that page, it will update to show a new transaction transferring 0.10 ravencoin to her balance soon after Joe hits Send.
At first, Alice’s address will show the transaction from Joe as "Unconfirmed." This means that the transaction has been propagated to the network but has not yet been included in the ravencoin transaction ledger, known as the blockchain. To be included, the transaction must be "picked up" by a miner and included in a block of transactions. Once a new block is created, in approximately 10 minutes, the transactions within the block will be accepted as "confirmed" by the network and can be spent. The transaction is seen by all instantly, but it is only "trusted" by all when it is included in a newly mined block.
Alice is now the proud owner of 0.0138 Ravencoin that she can spend. In the next chapter we will look at her first purchase with Ravencoin, and examine the underlying transaction and propagation technologies in more detail.
Chapter 1 End.