Chapter 01

What Is Ethereum?

https://www.ethereum.org/

Ethereum is a blockchain-based software platform that is primarily used to support the world’s second-largest cryptocurrency by market capitalization after Bitcoin. Like other cryptocurrencies, Ethereum can be used for sending and receiving value globally and without a third party watching or stepping in unexpectedly. 

Value exchange is the main use case of the Ethereum blockchain today, often via the blockchain’s native token, ether. But many of the developers are working on the cryptocurrency because of its long-term potential and the ambitious vision of its developers to use Ethereum to give users more control of their finances and online data. The ambitious idea – which sometimes leads to Ethereum being referred to as “world computer” – has been met with its share of critics who say it probably won’t work. But if this experiment rolls out as planned, it would spawn apps very different from Facebook and Google, which users knowingly or unknowingly trust with their data. 

Ethereum enthusiasts aim to hand control back to users with the help of a blockchain, a technology that decentralizes data so that thousands of people around the world are handed a copy. Developers can use Ethereum to build leaderless applications, which means that a user’s data cannot be tampered with by the service’s creators.

Ethereum was first proposed in 2013 by developer Vitalik Buterin, who was 19 at the time, and was one of the pioneers of the idea of expanding the technology behind Bitcoin, blockchain, to more use cases than transactions.

While Bitcoin was created with the goal of disrupting online banking and day-to-day transactions, Ethereum’s creators aim to use the same technology to replace internet third parties – those that store data, transfer mortgages and keep track of complex financial instruments. These apps aid people in innumerable ways, such as paving a way to share vacation photos with friends on social media. But they have been accused of abusing this control by censoring data or accidentally spilling sensitive user data in hacks, to name a couple of examples. 

The platform officially launched in 2015, turning the idea of Ethereum into a real, functioning network. 

Ethereum and a decentralized internet

Before you can understand Ethereum, it helps to first understand intermediaries. 

Todayintermediaries are everywhere. Behind the scenes, they help us accomplish all sorts of digital tasks. Gmail for instance helps us send emails. Venmo helps us send $10 to a friend.

This means that our personal data, financial information, and so forth are all largely stored on other people’s computers – in clouds and servers owned by companies like Facebook, Google, or PayPal. Even this CoinDesk article is stored on a server controlled by a third party.

This structure can be problematic, according to decentralization advocates. It means less direct control for users, and it also opens up opportunities for censorship, where the intermediary can step in and prevent a user from any action, whether buy a certain stock or post a certain message on social media, or block them altogether.

The idea of Ethereum is to change how apps on the internet work today, awarding users more control by replacing intermediaries with smart contracts that execute rules automatically. 

Many, including inventors of the internet, believe the internet was always meant to be decentralized, and a splintered movement has sprung up around using new tools to help achieve this goal. Ethereum is one of the technologies to join this movement.

Ethereum FAQ

How is Ethereum different from Bitcoin?

Ethereum draws inspiration from Bitcoin. They are both cryptocurrencies. Ethereum uses the same technology behind Bitcoin, a blockchain, which uses a shared, decentralized public ledger to decentralize the network so it’s not under the control of just one entity.

But while Bitcoin is used primarily as a store of value, the idea behind Ethereum is to decentralize other kinds of applications and services, from social media networks to more complex financial agreements.

Why is Ethereum sometimes called a "world computer?”

Many advocates see Ethereum as a “world computer” that could decentralize the internet.

With Ethereum, centralized servers are replaced by thousands of so-called “nodes” run by volunteers all over the world thus forming a “world computer.” The hope is that one day, anyone in the world will be able to use it.

How does an Ethereum app work?

Scrolling through a typical app store you’ll see a variety of colorful squares representing everything from banking to fitness to messaging apps. The long-term vision of the Ethereum community is to make apps that look just like these, but that work differently under the hood. 

screen-shot-2017-03-28-at-4-56-00-pm
How an Ethereum app works
(Maria Kuznetsov)

In short, the goal is for Ethereum apps to return control of the data in these types of services to its owner.

The apps built on Ethereum that offer this functionality are known as decentralized apps. Users need ether, Ethereum’s native token, to use them.

What are the next steps for Ethereum?

It’s worth noting that Ethereum has been met with healthy skepticism. For one, Ethereum is far from scalable, meaning it can’t support many users right now, throwing a wrench in the idea of a “world computer” that disrupts Google, Facebook and other centralized platforms.

Ethereum 2.0, which is planned to launch by the end of 2020, aims to fix some of these issues. Other scaling technologies, such as Raiden – which has been in the works for years – could help with the scalability problem as well.

Authored by Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 02

How to Use Ethereum

Ethereum apps aim to give people more control over their online data. Using these apps is a matter of learning how to buy, store, and use its native token, ether

If the Ethereum protocol, sometimes called the “world computer,” develops as its proponents expect, it could provide alternatives to tech platforms, such as Facebook and Google, that many people have come to depend on. Generally, those alternatives would give users more control over their digital information.

However, this control comes at a cost: ether. Every action on an Ethereum app, even as small as posting a short message to a microblogging platform, costs a little bit of ether. With ether fees, users can tap into a variety of apps on the platform.  

These apps, also known as decentralized apps (dapps), are not free because the computing resources of the Ethereum platform are limited. The more people using the platform, the higher the fees. Since the number of services that interact with Ethereum right now is relatively high, so are the fees.

In this regard, Ethereum is still a work in progress. A network upgrade, Ethereum 2.0, is gradually being phased in to tackle Ethereum’s underlying scalability issues. That will theoretically push fees lower while bolstering the security of the network.

Ethereum apps might not be as intuitive as the apps we use today, but anyone with a computer or smartphone can access them, as long as they have ether.

What is an Ethereum wallet?

Before we get some ether, we need a place to put it. This brings us to the idea of an Ethereum “wallet.” Like its real-world counterpart, an ethereum wallet is made for storing value. (It is common practice to use lower case for “ethereum” or “ether” when referring to the currency, but upper for the network or protocol.)

Most wallets are digital apps that can be accessed from a smartphone or laptop. Furthermore, these digital wallets store digital money in the form of cryptocurrencies like bitcoin and ether.

Ethereum wallets store a user’s private keys, which are secret keys that can be used to access ether. Each key is a unique long and jumbled string of letters and numbers that looks like this:

073d9dbee8875e7c91422d80413c85ba5e8e9fe7cad5dc001871dac882d07f2f 

Only the owners of the private keys can use them to spend the money associated with them. These days, ethereum wallets 

There are several types of Ethereum wallets made specifically for storing these private keys:

  • Desktop wallets
  • Mobile wallets
  • Hardware wallets
  • Paper wallets

Choosing one depends on your preferences for convenience and security. Usually these two concepts are at odds with one another: the more convenient, the worse the security (and vice versa).

When it comes to cryptocurrency wallets, there’s one major caveat to keep in mind: losing your private key means losing your ether, forever. It is a much bigger deal than misplacing a password for an online service. This is where the absence of trusted third parties becomes a double-edged sword. While intermediaries are no longer needed to verify transactions, there’s no help desk to turn to for help recovering your secret key.

Desktop and mobile wallets

Desktop wallets run on a PC or laptop, while some wallets are more portable and can be run on a smartphone. Some wallets offer both.

Desktop, mobile, and web wallets can be either:

  • Custodial: Custodial wallets take care of your private key, which is like a password to your money. This is an easy option for users who are new to Ethereum or worried about losing their private key. However, with this type of wallet, users are still relying on a third party, which poses its own risks. These entities can get hacked, for instance.
  • Non-custodial: With non-custodial wallets, you and only you are in control of your private key.

Because desktop and mobile wallets are running on a laptop or smartphone that’s connected to the internet, they’re less secure. As such, experts suggest keeping only a little money in them. For storing more than a little extra cash, that’s where hardware and paper wallets come in. 

Hardware wallets

Hardware wallets, electronic devices that are often as small as a thumb, offer more security. These devices are built for security and detached from the internet, and can sign and send ether transactions without being online. This is more secure because it is much harder to hack and is best used for storing large ether holdings.

Ledger and Trezor are two popular hardware wallets that can be used for holding ether.

Paper wallets

Another cold storage option is to print or carefully handwrite a private key on a slip of paper, a “paper wallet,” and lock it somewhere secure like a safety deposit box. 

MyEthereumWallet, or MEW, is one popular service for generating key pairs directly on your computer – not on a website’s servers. Storing private keys on a server would mean trusting the company with access to your private keys, essentially a custodial wallet (see above). It would also leave those keys vulnerable if the site is ever hacked.

Tech-savvy users can generate keys using the command-line interface on a regular computer, which is used to directly input commands via text, provided they have the necessary cryptographic packages installed.

All that said, it bears repeating that if you lose your private key, it — and any ether associated with it — is gone for good. The best practice is to spend some extra time creating multiple copies of the private key and stashing them in different secure locations, in case one is lost or destroyed.

How can I buy ether?

The easiest way to obtain ether varies by location.

There are several methods to buy ether:

  • A centralized exchange
  • A compatible ATM
  • Buying in person or via a peer-to-peer marketplace that connects users directly to one another

Finding an online ether exchange

Buying ether via a centralized exchange is usually the easiest option.

Popular exchanges such as Coinbase and Kraken allow users to buy ether directly with dollars or bitcoin. Typically there’s a sign-up process. These exchanges usually comply with Know-Your-Customer (KYC) laws, meaning they need to confirm a user’s identity before they can buy cryptocurrencies from the platform.

Buying ether with a currency other than the dollar might take an extra step.

Bitcoin is the most commonly used cryptocurrency, and people around the world are more likely to want to trade for it in their currency. So if you want to buy ether for Russian rubles, for instance, one easy option is to purchase bitcoin at an exchange and then trade that for ether.

That said, the official Ethereum website provides a list of buying options based on the country you reside in.

Ether ATMs

There are also hundreds of ether ATMs dotting the globe. This map from CoinATMRadar shows where these ATMs are located. 

ATMs are less convenient since they can only be used in person, but they do offer a couple of advantages. While exchanges accept only digital forms of payment (such as credit cards), ATMs accept cash. Sometimes exchanges take a couple of days to send a user their ether, but ATMs are instantaneous.

Buying ether in-person

Some users are privacy-conscious and would rather not use centralized exchanges, which often require a form of ID to use.

For these users, there’s always the option of meeting in person to buy or sell ether, and some cities have frequent Ethereum meetups, including New York and Toronto. However, this isn’t always an easy option in less populated areas.

Sites such as LocalCryptos connect users who want to trade by another peer-to-peer method, including directly by way of a bank transfer.

What can I do with ether?

What can users do once they have ether?

Once you have ether, you can use it to fuel decentralized apps (often called “dapps”), which are often similar to apps we use today, except they aim to cut intermediaries out of the picture. 

These dapps are built from Ethereum smart contracts, code that automatically executes the terms of an agreement so that users don’t have to rely on a third party to enforce the rules.

Examples of decentralized applications include:

  • CryptoKitties: A game for collecting and breeding funny looking digital cats. Ethereum's innovation is that it allows users more control of their digital collectibles. For instance, the digital cat cannot be deleted, unlike in other games, where the collectibles only survive as long as the company that created them. 
  • PeepEth: PeepEth is a decentralized Twitter alternative. Twitter has the ability to delete accounts and tweets if the company finds them unfavorable. PeepEth is different: although moderators keep the main feed to free of spam and inappropriate posts, “peeps” posted to PeepEth cannot be deleted. 
  • DeFi: decentralized finance (DeFi) is the term for the array of financial applications built on top of ethereum.

Some Ethereum apps have their own token, derived from ether. To participate in these, users need to trade ether for the token powering the app. For instance, Decentraland is a virtual world where users can buy virtual plots of land. It’s different from games that don’t use blockchain because users control the game, rather than a central entity.

Aggregator State of the Dapps lists nearly 3,000 such Ethereum dapps. While many are promising services and projects, sending ether to unvetted apps is not recommended.

Authored by Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 03

How Ethereum Works

Now that we’ve covered what ethereum is, let’s dive deeper into how the platform functions under the hood.

Consider the online notebook application described in “What is Ethereum?

Using ethereum, the app doesn’t require one entity to store and control its data. To accomplish this, ethereum borrows heavily from bitcoin’s protocol and its blockchain design, but tweaks it to support applications beyond money.

Ethereum aims to abstract away bitcoin’s design, however, so that developers can create applications or agreements that have additional steps, new rules of ownership, alternative transaction formats or different ways to transfer state.

The goal of ethereum’s ‘Turing-complete’ programming language is to allow developers to write more programs in which blockchain transactions could govern and automate specific outcomes.

This flexibility is perhaps ethereum’s primary innovation, as explained in the guide “How Ethereum Smart Contracts Work“.

The ethereum blockchain

The structure of the ethereum blockchain is very similar to bitcoin’s, in that it is a shared record of the entire transaction history. Every node on the network stores a copy of this history.

The big difference with ethereum is that its nodes store the most recent state of each smart contract, in addition to all of the ether transactions. (This is much more complicated than described, but the text below should help you get your feet wet.)

For each ethereum application, the network needs to keep track of the ‘state’, or the current information of all of these applications, including each user’s balance, all the smart contract code and where it’s all stored.

Bitcoin uses unspent transaction outputs to track who has how much bitcoin.

While it sounds more complex, the idea is fairly simple. Every time a bitcoin transaction is made, the network ‘breaks’ the total amount as if it was paper money, issuing back bitcoins in a way that makes the data behave similarly to physical coins or change.

To make future transactions, the bitcoin network must add up all your pieces of change, which are classed as either ‘spent’ or ‘unspent’.

Ethereum, on the other hand, uses accounts.

Like bank account funds, ether tokens appear in a wallet, and can be ported (so to speak) to another account. Funds are always somewhere, yet don’t have what you might call a continued relationship.

state-3-15-01

With ethereum, every time a program is used, a network of thousands of computers processes it.

Contracts written in a smart contract-specific programming languages are compiled into ‘bytecode’, which a feature called the ‘ethereum virtual machine’ (EVM) can read and execute.

All the nodes execute this contract using their EVMs.

screen-shot-2017-03-21-at-5-01-03-pm

Remember that every node in the network holds a copy of the transaction and smart contract history of the network, in addition to keeping track of the current ‘state’. Every time a user performs some action, all of the nodes on the network need to come to agreement that this change took place.

The goal here is for the network of miners and nodes to take responsibility for transferring the shift from state to state, rather than some authority such as PayPal or a bank. Bitcoin miners validate the shift of ownership of bitcoins from one person to another. The EVM executes a contract with whatever rules the developer initially programmed.

Actual computation on the EVM is achieved through a stack-based bytecode language (the ones and zeroes that a machine can read), but developers can write smart contracts in high-level languages such as Solidity and Serpent that are easier for humans to read and write.

As explained in our guide “How Ethereum Mining Works“, miners are the ones that are preventing bad behavior – like ensuring that no one is spending their money more than once and rejecting smart contracts that haven’t been paid for.

There are a few thousand ethereum nodes out there, and every node is compiling and executing the same code.

But, you might be thinking, isn’t that much more expensive than a normal computation? Yes, it is. That’s why the network might only be used only for particular use cases.

The official ethereum dev tutorial concedes this inefficiency, stating:

“Roughly, a good heuristic to use is that you will not be able to do anything on the EVM that you cannot do on a smartphone from 1999.”

Authored by Alyssa Hertig; images by Maria Kuznetsov

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 04

What is a Decentralized Application?

Internet users don’t have sole control over the data they share on today’s websites.

Ethereum is unique in that it attempts to wield the blockchain as a way to correct what its designers believe is a problematic part of the internet’s design.

It’s like a “decentralized appstore” where anyone can publish their unstoppable apps (dapps), which unlike today’s apps (think Gmail or Uber) don’t require a middleman to function or to manage a user’s information.

Dapps connect users and providers directly.

One example is to use this design for a decentralized Twitter that’s resistant to censorship. Once you publish a message to the blockchain, it can’t be erased, not even by the company that created the microblogging system.

There isn’t one definition of a dapp, though, as it’s a newer concept.

A couple of main characteristics are that they’re open source and don’t have a central point of failure.

Three types

With this new technology out in the wild, ethereum advocates might feel electrified by the thought of decentralizing “all the things.” But the types of applications that users can build with the computing platform might be somewhat narrow.

The ethereum white paper splits dapps into three types: apps that manage money, apps where money is involved (but also requires another piece), and apps in the “other” category, which includes voting and governance systems.

In the first type of app, a user may need to exchange ether as a way to settle a contract with another user, using the network’s distributed computer nodes as a way to facilitate the distribution of this data.

screen-shot-2017-03-28-at-5-29-48-pm

The second type of app mixes money with information from outside the blockchain.

For example, a crop insurance application that’s dependent on an outside weather feed. (Say a farmer buys a derivative that automatically pays out if there’s a drought that impacts his work.)

To execute, these smart contracts rely on so-called “oracles” that relay up-to-date information about the outside world. (Though, it’s worth noting that some developers are skeptical that this use case can be done in a decentralized way.)

screen-shot-2017-03-28-at-5-31-39-pm

If bitcoin can do away with financial authorities, is it possible to do the same for companies and other types of organizations?

Decentralized autonomous organizations are one particularly ambitious breed of dapp (this is explained further in ‘What is a DAO?‘).

The goal is form a leaderless company, program rules at the beginning about how members can vote and how to release company funds and then… let it go.

screen-shot-2017-03-28-at-5-33-07-pm

Authored by Alyssa Hertig; images by Maria Kuznetsov

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 05

What is a DAO?

Imagine this: a driverless car cruises around in search of passengers.

After dropping someone off, the car uses its profits for a trip to a charging station. Except for it’s initial programming, the car doesn’t need outside help to determine how to carry out its mission.

That’s one “thought experiment” brought to you by former bitcoin contributor Mike Hearn in which he describes how bitcoin could help power leaderless organizations 30-or-so years into the future.

What Hearn described is one dream use case for a decentralized autonomous organization, or a DAO, an idea that swirled through the community not long after bitcoin was released in 2009. The thought is that if bitcoin can do away with financial middlemen, then maybe companies and other organizations can one day operate without hierarchical management.

In short, DAOs aim to hard-code certain rules that a company would from the get-go. This could be setting aside a certain percentage of earnings for a cause or determining a process by which such a rule could be changed.

In the abstract, this is similar to how a normal company works. The big difference is that the rules of normal companies are not enforced digitally.

screen-shot-2017-03-28-at-5-33-07-pm

The best-known attempt at creating such an organization was called “The DAO.”

Launched in 2016, the project failed in a matter of months, but it’s a good example of what people have in mind when they talk about the technology.

The plan was for participants to receive DAO tokens, then vote for which projects to fund. For selecting projects to invest in, it relied on the “wisdom of crowds.”

There are a few ways that The DAO intended to improve on the governance of today’s organizations:

  • Anyone with internet access could hold DAO tokens or buy them
  • DAO creators could set whatever rules they voted on.

In abstract, DAOs function similarly. They rely on smart contracts, or pre-programmed rules that describe what can happen in the system.

These smart contracts can be programmed to carry out a variety of tasks, such as doling out funds after a certain date or when a certain percentage of voters agree to fund a project.

Some proponents say it can work for an organization where any sort of decision needs to be made, not just those related to money.

Essentially, they see it as a way to cryptographically guarantee democracy, where stakeholders can vote on adding new rules, changing the rules, or ousting a member, to name a few examples.

Security

It’s easy to see why “unstoppable code” could pose a security problem.

Today, it’s difficult to change a DAO, or the smart contracts underpinning it once it’s deployed to the ethereum blockchain. This is “good,” because one person or entity can’t change the rules.

But it’s also potentially a huge disadvantage. If someone spots a bug in a running DAO, developers can’t necessarily change the code.

That was the problem with The DAO. Observers watched the attacker slowly drain of funds, but they couldn’t do anything to stop it. (Technically, the hacker was following the rules as they were deployed).

Ethereum’s lead coders reversed the transaction history to return funds to their owners, which was a controversial decision leading to a rift in the community.

The best way to handle a similar future situation is still up to debate.

Authored by Alyssa Hertig; images by Maria Kuznetsov

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 06

How Do Ethereum Smart Contracts Work?

screen-shot-2017-03-28-at-5-43-08-pm

Like many ideas in the blockchain industry, a general confusion shrouds so called ‘smart contracts’.

A new technology made possible by public blockchains, smart contracts are difficult to understand because the term partly confuses the core interaction described.

While a standard contract outlines the terms of a relationship (usually one enforceable by law), a smart contract enforces a relationship with cryptographic code.

Put differently, smart contracts are programs that execute exactly as they are set up to by their creators.

First conceived in 1993, the idea was originally described by computer scientist and cryptographer Nick Szabo as a kind of digital vending machine. In his famous example, he described how users could input data or value, and receive a finite item from a machine, in this case a real-world snack or a soft drink.

In a simple example, ethereum users can send 10 ether to a friend on a certain date using a smart contract (See our guide “What is Ether?“).

In this case, the user would create a contract, and push the data to that contract so that it could execute the desired command.

Ethereum is a platform that’s built specifically for creating smart contracts.

But these new tools aren’t intended to be used in isolation. It is believed that they can also form the building blocks for ‘decentralized applications’ (See: “What is a Dapp?“) and even whole decentralized autonomous companies (See: “What is a DAO?‘)

How smart contracts work

It’s worth noting that bitcoin was the first to support basic smart contracts in the sense that the network can transfer value from one person to another. The network of nodes will only validate transactions if certain conditions are met.

But, bitcoin is limited to the currency use case.

By contrast, ethereum replaces bitcoin’s more restrictive language (a scripting language of a hundred or so scripts) and replaces it with a language that allows developers to write their own programs.

Ethereum allows developers to program their own smart contracts, or ‘autonomous agents’, as the ethereum white paper calls them. The language is ‘Turing-complete’, meaning it supports a broader set of computational instructions.

Smart contracts can:

  • Function as 'multi-signature' accounts, so that funds are spent only when a required percentage of people agree
  • Manage agreements between users, say, if one buys insurance from the other
  • Provide utility to other contracts (similar to how a software library works)
  • Store information about an application, such as domain registration information or membership records.

Strength in numbers

Extrapolating that last point, smart contracts are likely to need assistance from other smart contracts.

When someone places a simple bet on the temperature on a hot summer day, it might trigger a sequence of contracts under the hood.

One contract would use outside data to determine the weather, and another contract could settle the bet based on the information it received from the first contract when the conditions are met.

Running each contract requires ether transaction fees, which depend on the amount of computational power required.

As explained in our guide “How Ethereum Works“, ethereum runs smart contract code when a user or another contract sends it a message with enough transaction fees.

The Ethereum Virtual Machine then executes smart contracts in ‘bytecode’, or a series of ones and zeroes that can be read and interpreted by the network.

Authored by Alyssa Hertig; images by Maria Kuznetsov

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 07

How Ethereum Mining Works

Today, miners play an important role in making sure ethereum works.

This role isn’t immediately obvious, though.

Many new users think that the sole purpose of mining is to generate ethers in a way that doesn’t require a central issuer (see our guide “What is Ether?“). This is true. Ethereum’s tokens are created through the process of mining at a rate of 5 ether per mined block. But mining also has another at least as important role.

Usually, banks are in charge of keeping accurate records of transactions. They ensure that money isn’t created out of thin air, and that users don’t cheat and spend their money more than once.

Blockchains, though, introduce an entirely new way of record-keeping, one where the entire network, rather than an intermediary, verifies transactions and adds them to the public ledger.

Although a ‘trustless’ or ‘trust-minimizing’ monetary system is the goal, someone still needs to secure the financial records, ensuring that no one cheats.

Mining is one innovation that makes decentralized record-keeping possible.

Miners come to consensus about the transaction history while preventing fraud (notably the double spending of ethers) – an interesting problem that hadn’t been solved in decentralized currencies before proof-of-work blockchains.

Although ethereum is looking into other methods of coming to consensus about the validity of transactions, mining currently holds the platform together.

How mining works

Today, ethereum’s mining process is almost the same as bitcoin’s.

For each block of transactions, miners use computers to repeatedly and very quickly guess answers to a puzzle until one of them wins.

More specifically, the miners will run the block’s unique header metadata (including timestamp and software version) through a hash function (which will return a fixed-length, scrambled string of numbers and letters that looks random), only changing the ‘nonce value’, which impacts the resulting hash value.

If the miner finds a hash that matches the current target, the miner will be awarded ether and broadcast the block across the network for each node to validate and add to their own copy of the ledger. If miner B finds the hash, miner A will stop work on the current block and repeat the process for the next block.

It’s difficult for miners to cheat at this game. There’s no way to fake this work and come away with the correct puzzle answer. That’s why the puzzle-solving method is called ‘proof-of-work’.

On the other hand, it takes almost no time for others to verify that the hash value is correct, which is exactly what each node does.

Approximately every 12–15 seconds, a miner finds a block. If miners start to solve the puzzles more quickly or slowly than this, the algorithm automatically readjusts the difficulty of the problem so that miners spring back to roughly the 12-second solution time.

The miners randomly earn these ether, and their profitability depends on luck and the amount of computing power they devote to it.

The specific proof-of-work algorithm that ethereum uses is called ‘ethash’, designed to require more memory to make it harder to mine using expensive ASICs – specialized mining chips that are now the only profitable way of mining bitcoin.

In a sense, ethash might have succeeded in that purpose, since dedicated ASICs aren’t available to mine ethereum (at least not yet).

Furthermore, since ethereum aims to transition from proof-of-work mining to ‘proof of stake’ – which we discuss below – buying an ASIC might not be a smart option since it likely won’t prove useful for long.

Shift to proof of stake

Ethereum might not need miners forever, though.

Developers plan to ditch proof-of-work, the algorithm that the network currently uses to determine which transactions are valid and protect it from tampering, in favor of proof of stake, where the network is secured by the owners of tokens.

If and when that algorithm is rolled out, proof-of-stake could be a means for achieving distributed consensus that uses fewer resources.

Authored by Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 08

How Will Ethereum Scale?

Like other public blockchains, ethereum intends to support as many users as it can.

The problem is that, today, we don’t really know the limits of the platform.

Because of a hard-coded limit on computation per block, the ethereum blockchain currently supports roughly 15 transactions per second compared to, say, the 45,000 processed by Visa.

This limitation of ethereum and other blockchain systems has long been the subject of discussion by developers and academics.

While ethereum developers might like to highlight how the flexible smart contract platform differs from bitcoin, for example, it isn’t unique in regards to scalability.

As disappointing as that might sound, there’s hope in proposed solutions that haven’t made it into the official software yet.

Why is scaling so difficult?

Ethereum and bitcoin use a combination of technical tricks and incentives to ensure that they accurately record who owns what without a central authority.

The problem is, it’s tricky to preserve this balance while also growing the number of users (especially to the point where average people can use the system to purchase coffee or run applications).

That’s because ethereum depends on a network of “nodes,” each of which stores the entire ethereum transaction history and the current ‘state’ of account balances, contracts and storage. This is obviously a cumbersome task, especially since the total number of transactions is increasing approximately every 10–12 seconds with each new block.

The worry is that, if developers raise the size of each block to fit more transactions, the data that a node will need to store will grow larger – effectively kicking people off the network. If each node grows large enough, only a few large companies will have the resources to run them.

Despite the inconvenience, running a full node is the best way for users to take advantage of privacy and security. Making full nodes more difficult to run would further limit the number of people that can verify transactions themselves.

In other words, decentralization and scalability are currently at odds, but developers are looking for ways around this.

Sharding

There are a few ethereum scaling projects in the works, each of which tackles a different scalability problem.

As mentioned, one problem is that each node needs to store the updated state of each account on the network. “Sharding” draws from a traditional scaling technique called “database sharding,” which effectively breaks a database into pieces and puts each part on a different server.

The goal of sharding is to move away from requiring “full” nodes – those which store the full state of the network and every transaction that occurs.

Instead, each node stores a subset of this data and only verifies those transactions. If a node needs to know about transactions or blocks that it doesn’t store, then it finds another node with the information it needs.

The problem here is that the process isn’t exactly trustless, since, in this model, nodes need to rely on other nodes.

Ethereum wants to solve this problem using “cryptoeconomic incentives” that drive actors in a system to act a certain way – in this case, ensuring that nodes are passing on valid information to other nodes.

Off-chain transactions

A possibly more ambitious capacity-expanding technology borrows from bitcoin’s Lightning Network, a proposed top-layer to the blockchain that mirrors how the multi-layered internet works.

Lightning-style “off-chain” transactions could bring the technology’s capabilities closer to how users were told it was “supposed to be” – fast and nearly limitless in supply, while still not requiring users to trust any intermediary.

According to this vision, most transactions will be made on off-chain micropayment channels, lifting the burden from the underlying blockchain.

The reason that this works, in theory, is that either party can kick the transaction back to the blockchain anytime they want, giving both parties the ability to end the interaction.

With this add-on, ethereum’s computational limit doesn’t need to increase too much, and the hope is that it will still be reasonable for regular ethereum enthusiasts to run a full node.

How long will it take to scale?

This is a tricky question, as there’s still a lot of experimentation happening on the scaling front.

In creator Vitalik Buterin’s words, the long-term goal is for the platform to be able to process transactions at “Visa-scale transaction levels” or beyond.

However, as skeptical observers are keen to point out, this is based on Buterin’s analysis, and on techniques that have yet to be deployed on a public blockchain.

In sum, although ethereum currently can only handle a handful of transactions per second, its architects have high hopes for the future.

Authored by Alyssa Hertig, last edited Feb. 23, 2018

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 09

How to Mine Ethereum

Now that you know “How Ethereum Mining Works“, you may want to know how to compete in the race to mine ether yourself.

To recap, mining is the glue that holds ethereum’s ‘decentralized app store’ together by ensuring that it comes to consensus on each change to any of the applications (dapps) running on the network.

Take the online notebook described in “What is Ethereum?“. The network would not come to consensus about the ‘state’ of the notebook (say, if a note is added or deleted) without the computational power to process the changes.

Miners set computers loose to solve cryptographic puzzles in an attempt to win ether, and they need to try a huge number of computational problems until one unlocks a new batch of the asset.

One of the interesting things about open blockchains is that, in theory, anyone can set their computers to focus on these cryptographic puzzles as a way to win rewards.

The catch is that mining on major public blockchains tends to require more and more power over time, as more people invest in more powerful hardware.

In this day and age, those mining with low-powered setups are unlikely to win, but it’s still a viable past-time for hobbyists and enthusiasts alike.

Choosing mining hardware

Before getting started, you will need special computer hardware to dedicate full-time to mining.

There are two types of mining hardware: CPUs and GPUs. GPUs boast a higher hash rate, meaning they can guess puzzle answers more quickly. At time of writing, GPUs are now the only option for ether miners.

Settling on a GPU is a complex task and you can browse plenty of advice about which ones are the most profitable based on hash rate performance, power consumption and the initial expense of the card. You probably want to set up a mining rig, a machine that might be composed of multiple GPUs and might take a week to build.

Mining profitability calculators show the likely amount of ether you’ll earn at a given hash rate, and whether that ether is enough, when set against setup and electricity costs, to make a profit.

Unlike bitcoin, powerful and fast ethereum ASICs aren’t available right now.

Installing the software

After selecting some mining hardware, the next step is to install the mining software. First off, miners need to install a client to connect to the network.

Programmers familiar with the command line can install geth, which runs an ethereum node written in the scripting language ‘Go’, or any of a number of clients.

Download Geth here, using the directions for your appropriate operating system (Windows, Mac OS, or Linux), unzip it and run it.

Once installed, your node can ‘talk’ to other nodes, connecting it to the ethereum network. In addition to mining ether, it provides an interface for deploying your own smart contracts and sending transactions using the command line.

Testing

It’s also possible to mine ‘test’ ether on your own private network to experiment with smart contracts or decentralized applications (activities that require the use of tokens).

Mining on a test network doesn’t require any fancy hardware, just a home computer with geth or another client installed. But, minting fake ether obviously isn’t going to be very lucrative.

You can read more about how to set up a test network here, and how to start mining on it here.

Install Ethminer

If you’re interested in mining ‘real’ ether, you need to install mining software.

Now that you’ve downloaded a client and your node is a part of the network, you can download Ethminer. Find the download for your appropriate version of Windows here, or GPU mining instructions for other operation systems here.

Once installed, your node will officially play a part in securing the ethereum network. For more detailed instructions on any of the above, visit the official ethereum website.

Joining a mining pool

As a miner, you’re unlikely to be able to mine ether on your own.

That’s why miners ‘pool’ together their computational power into ‘mining pools’, to improve their chances of solving the cryptographic puzzles and earning ether. Then, they split the profits proportional to how much power each miner contributed.

There are many factors involved in joining a mining pool. Each pool might not be around forever, and the computational power of each pool is constantly changing, so there are a number of factors that go into deciding which to join.

One point to keep in mind is that mining pools have different payout structures.

Mining pools will have some sort of a signup process on the website so that miners can connect to the pool and begin mining.

Keep in mind, though, the mining world is a whirlwind of change. The tools that you pick up today might be obsolete next year, and some mining pools might fall away while others emerge, so it’s worth keeping aware of industry shifts.

Authored by Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 10

What Is Ether?

As we explored in “What is Ethereum?“, Ethereum aims to function both as a kind of decentralized internet and a decentralized app store, supporting a new type of application (a “dapp”) in the process.

But while no one owns Ethereum, the system that supports this functionality isn’t free. Rather, the network needs “ether,” a unique piece of code that can be used to pay for the computational resources needed to run an application or program.

Like bitcoin, ether is a digital bearer asset (similar to a security, like a bond, issued in physical form). Just like cash, it doesn’t require a third party to process or approve a transaction.

But instead of operating as a digital currency or payment, ether seeks to provide “fuel” for the decentralized apps on the network.

While this might sound complicated, you can think of a more concrete example of how tokens might power a user experience.

Let’s go back to the example of a decentralized online notebook. To post, delete or modify a note, you need to pay a transaction fee in ether to get the network to process the change.

In this way, ether has sometimes been called “digital oil.” Taking this analogy further, Ethereum transaction fees are calculated based on how much “gas” the action requires.

Each action costs an amount of gas that’s based on the computational power required and how long it takes to run. A transaction might cost 500 gas, for example, which is paid in ether.

As an economic system, the rules for ether’s economy are a bit open-ended. While bitcoin has a hard cap of 21 million bitcoins, ether does not have a similar limit.

Of the ether that does exist, 60 million was purchased by users in a 2014 crowdfunding campaign.

Another 12 million ether went to the Ethereum Foundation, a group of researchers and developers working on the underlying technology. Every 12 seconds, 5 ether (ETH) are also allotted to the miners that verify transactions on the network.

At most, 18 million ether are mined per year. Five ether are created roughly every 12 seconds, whenever a miner discovers a block, or a bundle of transactions.

Ethereum 2.0, a major upgrade to the protocol set to be implemented in December 2020, will change in the rules of ether creation, and thus the mining subsidy might decrease.

For more information, see “How Ethereum Works” and “How to Use Ethereum“.

By Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.

Chapter 11

Who Created Ethereum?

Source: Ethereal video
Vitalik Buterin

In 2008, an unknown developer (or developer group) invented bitcoin as a new way to send value over the internet. Four years later, a 19-year-old dreamed up a new platform based off of this innovation in an effort to transform the internet entirely.

Vitalik Buterin, a programmer from Toronto, first grew interested in bitcoin in 2011.

He co-founded the online news website Bitcoin Magazine in the same year, writing hundreds of articles on the cryptocurrency world. He went on to code for the privacy-minded Dark Wallet and the marketplace Egora.

Along the way, he came up with the idea of a platform that would go beyond the financial use cases allowed by bitcoin. He released a white paper in 2013 describing an alternative platform designed for any type of decentralized application developers would want to build. The system was called ethereum.

Ethereum makes it easy to create smart contracts, self-enforcing code that developers can tap for a range of applications.

For his work, Buterin was named a 2014 Thiel fellow, a contest that awards winners $100,000.

Growing community

After Buterin unveiled the ethereum white paper, other developers joined ranks.

Co-founder Dr Gavin Wood wrote the ethereum yellow paper, the “technical bible” that outlines the specification for the ethereum virtual machine (EVM) that handles the state of the ledger and runs smart contracts, for example (see: How Ethereum Works).

Co-founder Joseph Lubin went on to found the Brooklyn-based ConsenSys, a startup that focuses on building decentralized apps.

To get the project off the ground, Buterin and the other founders launched a crowdfunding campaign in July 2014 where participants purchased ether, or the ethereum tokens that function as shares in the project. (See: What is Ether?).

Raising more than $18m, it was then the most successful crowdsale to date at the time. It took another year, but the first live release, Frontier, launched on 30th July, 2015. It wasn’t a sexy platform, but the command line interface offered developers a platform for creating their own decentralized apps.

The smart contract platform took off, swelling into today’s ecosystem of hundreds of developers and even drawing the attention of tech giants like IBM and Microsoft.

The funds from ethereum’s initial $18m crowdsale and project development are now managed by the Ethereum Foundation, a non-profit entity based in Switzerland.

Authored by Alyssa Hertig

Disclosure
The leader in blockchain news, CoinDesk is a media outlet that strives for the highest journalistic standards and abides by a strict set of editorial policies. CoinDesk is an independent operating subsidiary of Digital Currency Group, which invests in cryptocurrencies and blockchain startups.