Ethereum

Before you can understand ethereum, it helps to first understand the internet.

Today, our personal data, passwords and financial information are all largely stored on other people’s computers – in clouds and servers owned by companies like Amazon, Facebook or Google. Even this CoinDesk article is stored on a server controlled by a company that charges to hold this data should it be called upon.

This setup has a number of conveniences, as these companies deploy teams of specialists to help store and secure this data, and remove the costs that come with hosting and uptime.

But with this convenience, there is also vulnerability. As we’ve learned, a hacker or a government can gain unwelcome access to your files without your knowledge, by influencing or attacking a third-party service – meaning they can steal, leak or change important information.

Brian Behlendorf, creator of the Apache Web Server, has gone so far as to label this centralized design the “original sin” of the Internet. Some like Behlendorf argue the Internet was always meant to be decentralized, and a splintered movement has sprung up around using new tools, including blockchain technology, to help achieve this goal.

Ethereum is one of the newest technologies to join this movement

While bitcoin aims to disrupt PayPal and online banking, ethereum has the goal of using a blockchain to replace internet third parties — those that store data, transfer mortgages and keep track of complex financial instruments.

The ‘World Computer

In short, ethereum wants to be a ‘World Computer’ that would decentralize – and some would argue, democratize – the existing client-server model.

With ethereum, servers and clouds are replaced by thousands of so-called “nodes” run by volunteers from across the globe (thus forming a “world computer”).

The vision is that ethereum would enable this same functionality to people anywhere around the world, enabling them to compete to offer services on top of this infrastructure.

Scrolling through a typical app store, for example, you’ll see a variety of colorful squares representing everything from banking to fitness to messaging apps. These apps rely on the company (or another third-party service) to store your credit card information, purchasing history and other personal data – somewhere, generally in servers controlled by third-parties.

Your choice of apps is of course also governed by third parties, as Apple and Google maintain and curate (or in some cases, censor) the specific apps you’re able to download.

Take the example of an online document service like Evernote or Google Docs.

Ethereum, if all goes according to plan, would return control of the data in these types of services to its owner and the creative rights to its author.

The idea is that one entity will no longer have control over your notes and that no one could suddenly ban the app itself, temporarily taking all of your notebooks offline. Only the user can make changes, not any other entity.

In theory, it combines the control that people had over their information in the past with the easy-to-access information that we’re used to in the digital age.

Each time you save edits, or add or delete notes, every node on the network makes the change.

It’s worth noting that the idea has been met with skepticism.

Although the apps appear to be possible, it’s unclear which blockchain applications will actually prove useful, secure, or scalable, and if they will ever be as convenient to use as the apps we use today.

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’, and 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 costs 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, 60m was purchased by users in a 2014 crowdfunding campaign.

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

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

So, no one knows the total number of ether yet, and the pace of ether creation will be less clear after 2017 when ethereum plans to move to a new proof-of-stake consensus algorithm.

This will probably lead to a change in the rules of ether creation, and thus the mining subsidy might decrease.

Who created it?

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.

How to use?

The thought of using ethereum might sound intimidating, but it could be rewarding.

If the ‘unstoppable world computer’ develops according to plan, it could provide alternatives to the Facebooks and Googles that many people use everyday (as explained in “What is Ethereum?“).

Ethereum might not be as intuitive as the web as we know it today, but still, anyone with a computer or a smartphone can try the platform out as long as they own ‘ether‘ – unique pieces of code that allow updates to the blockchain’s ledger.

Ethereum wallets

First, you need a place to securely store your ether (or at least a place to store your private keys). This brings us to ethereum ‘wallets’.

One caveat is that losing your private key is a much bigger deal than misplacing a password: it means losing your ether, forever.

Removing trusted parties is a two-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.

With that in mind, there are plenty of options for wallets to store cryptocurrency: desktop wallets, web wallets, hardware wallets and 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).

Desktop wallets

Desktop wallets run on your PC or laptop. One option is to download an ethereum client (a copy of the entire ethereum blockchain). There are a few ethereum clients written in different programming languages and with different performance tradeoffs.

This process can take up to a couple days, and will only increase as ethereum grows. The wallet then needs to stay in sync with the latest transactions on the blockchain.

Mobile wallets

Mobile clients, or ‘light’ clients, require less data to be downloaded to connect to the network and make transactions, so they are more suitable for download to a smart phone.

The light client option is more convenient, but not quite as safe. Full ethereum clients offer a more secure way of receiving transactions because they do not need to trust miners or nodes to send them accurate information – they validate transactions themselves.

Storing private keys on a device that is detached from the internet (a method known as ‘cold storage’) is harder to hack and is best used for storing large ether holdings.

However, the method is not as easy to use as when ether is stored on a smartphone or internet-connected computer.

Hardware wallets

Hardware wallets, which are often as small as a finger or two, arguably offer the best of both worlds. These secure devices that can often be detached from the internet, and can sign transactions without being online.

But again, this deposit-box-like system is not a good option if you want to use ether frequently or on the move.

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 deposit box. Online tools can generate key pairs directly on your computer – not on a website’s servers, which could leave keys vulnerable if the site is hacked.

It’s also possible to generate keys using the command line, provided you have the necessary cryptographic packages installed for your preferred language.

All that said, again, if you lose your private key, it’s gone for good.

So, 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.

Buying ether

Obtaining ether varies by country, or at least by currency. You need to find someone either online or in-person who has ether and wants to trade.

There’s always the option of meeting in-person to buy or sell ether, especially if living in a city with frequent ethereum meetups, such as New York or Toronto.

That’s not always an option in less populated areas. Exchanges allow users to buy ether directly with dollars or bitcoin. Typically there is a sign-up process.

Buying ether with another currency 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 rubles, for instance, the easiest way might be to purchase bitcoin at an exchange and then trade that for ether.

Once you have ether, you can send it directly to another person (‘peer-to-peer’). It will likely cost a small transaction fee paid to miners.

Now what?

What can users do once they have ether?

You may have noticed that the wallet and exchange lingo up to this point has been quite similar to bitcoin. But ethereum applications are quite different.

Users with ether can join or create smart contracts (code that automatically executes the terms of an agreement so that you don’t have to rely on a third party).

Bundles of smart contracts can be used to create decentralized applications (‘dapps’), which you can use or join.

What’s the system?

But before we go any further, it’s worth explaining a little bit about how it works. Ethereum and other cryptocurrencies have an admittedly confusing storage system.

Perhaps it’s useful to compare it to what we already know.

Notice the string of numbers on the front of your credit card? It’s necessary for banks to determine where they should send money when the card is swiped. Cryptocurrencies allow you to generate similar identification numbers that identify where to debit funds.

In this system, there are two main components that users need for identification: the public key and the private key. Usually represented as a scrambled string of numbers and letters, the two keys are linked together by cryptography.

The public key can be sent to others so that they know where to send your money. If you want people to send you ether, you need an address: a scrambled string of letters and numbers derived from the similarly scrambled public key, for people to send coins to.

To spend ether, you need to sign over the funds with your private key, which, as the name implies, is similar to a password. In the credit card analogy, it’s similar to the pin used to unlock your funds at the ATM or in a store.

So, what’s the benefit of this system? One key difference in open blockchains (such as bitcoin and ethereum) is that users can generate an identification number for their funds at any time. They don’t need to wait for a bank to approve a bank account application and present the credit card.

How it 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.

What is the ethereum virtual machine?

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.

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: