Smart Contracts

The basic function that programs built on Ethereum perform are called smart contracts. Smart contracts are digital agreements that execute automatically based on real world data. An easy way to think of them is an "If-then statement." IF condition A exists, THEN perform function B.

Let's say for example Grandma wants to make sure she never forgets to give Little Billy birthday money each year. She could write a smart contract that says IF it's Little Billy's birthday, THEN pay him $10 from Grandma's account. Once this contract is broadcast to the Ethereum network, it will execute automatically each year on Little Billy's birthday.

Smart contracts have applications far beyond improving the reliability and efficiency of Grandmothers around the world. Another simple application of a smart contract is for rental payments: IF date = 1st of the month, THEN pay landlord rent amount. Processes that currently involve manual interactions between two parties can now be automated and the value can be moved in real time over the blockchain rather than settling days later as with traditional banking.

A Real World Example

Ethereum and smart contracts are a big deal because they have the ability to usher in what's been dubbed the "smart economy" - one in which slow manual processes prone to human error and deceit are replaced with automated processes that are completely transparent and trustworthy. A real world example that typifies the new "smart economy" is a project being run by a French insurance company called AXA.

AXA offers a flight insurance product that pays out a policy holder in the event that a flight is delayed by two hours or more. It currently has a product in trial that will pay out insurance claims using smart contracts and the Ethereum blockchain. The smart contract is simple: IF flight is over two hours late, THEN pay policyholder. The smart contract is connected to a database that monitors flight times. If the database shows that the flight is over two hours late, the smart contract is triggered and the policyholder is paid automatically over the blockchain.

Without the smart contract, the policyholder would have to file a claim and wait for the insurance company's claims department to process it, which could take anywhere from 1 to 2 weeks. With the smart contract, neither the insurance company nor the policyholder has to do anything. This also creates trust between the two parties because there are no grey areas - the customer can review the smart contract prior to purchasing the policy and feel comfortable that he will receive his claim in the event of a delay.

Ethereum vs Ether

As stated in the intro, Ethereum is a platform for building blockchain applications using smart contracts. What you may have just purchased on Coinbase is called Ether, which is the cryptocurrency that fuels the Ethereum network.

Ether functions more like a digital commodity than a digital currency. Just like you need gasoline to fuel your car, you need Ether to run applications on the Ethereum blockchain. In the Grandmother example cited above, Grandma would have to purchase small amounts of Ether to fuel her smart contract that pays Little Billy his birthday money.

The Ethereum blockchain functions in the same way as the Bitcoin blockchain: a network of computers run software that validates transactions through majority consensus. The people running these computers are called miners. Bitcoin miners are compensated for their resources by being paid in Bitcoin. Ethereum miners are compensated in Ether. On Little Billy's birthday, Grandma's ether transaction fee will go to whichever miner adds the block containing Grandma's transaction to the blockchain. That miner will also receive new Ether in the process.

The same supply/demand economics that apply to commodities like oil and gas also apply to Ether. Oil is valuable because it powers many of the things we use in our everyday life - it heats our homes and fuels our engines. The more people and enterprises that rely on Ethereum based applications, the higher the demand will be for Ether which will increase its value. As with all cryptocurrencies, there's plenty of speculation baked into the price - speculation that the demand for Ether will increase in the future. Since Ether is valuable, exchangeable and transferable, certain merchants are also starting to accept it as a currency.

dApps - Decentralized Apps

Applications that run smart contracts on the Ethereum blockchain are called "dApps," or decentralized apps. Just as any app developer can build apps on top of Apple's IOS operating system, developers can build on top of Ethereum's blockchain infrastructure. To the end user of a dApp, it might not look and feel any different than the apps you use today. It's the underlying blockchain infrastructure that make them different.

Since dApps function on top of the blockchain, they can be used to transfer value peer-to-peer. To return to our Grandmother example, there could be a dApp that Granny can download that lets her schedule Little Billy's birthday payments without having to code the smart contract herself. dApps are also completely open sourced so other people can access the code and build on top of them. Someone could take the code to the birthday payment dApp and add the ability for Grandma to add a note that says, "Happy Birthday Billy!" Running dApps on the blockchain also offers added security benefits. Since the transactions are distributed and encrypted across the Ethereum blockchain, there is no central place for a hacker to breach and gain access to all of the world's Grandmother to grandson birthday payment data.

At this point, I'm really beating the Grandmother/Little Billy example to death because I think it represents a simple illustration for the kinds of applications that can be built on the Ethereum blockchain. In reality, the dApps that are being built are much more complex. Here are a few examples:

Weifund - blockchain crowdfunding: Users can launch traditional crowdfunding campaigns, but through the use of smart contracts, backers can gain a financial stake in the project. If an indie film gets funded on Weifund, a backer who financed 10% of the project can collect 10% of the film's revenues. Payments will be issued in real time as the film generates revenue.

Users can launch traditional crowdfunding campaigns, but through the use of smart contracts, backers can gain a financial stake in the project. If an indie film gets funded on Weifund, a backer who financed 10% of the project can collect 10% of the film's revenues. Payments will be issued in real time as the film generates revenue. Ujo Music - Music licensing via the blockchain: An artist can create an original song and register it on Ujo's platform and set their own licensing terms. If a film producer wants to use that song in a movie, they can purchase the rights based on the terms set by the artist who will then get paid directly. This erases the need for industry middlemen like Warner Brothers who end up taking the lion's share of their artist's profits.

An artist can create an original song and register it on Ujo's platform and set their own licensing terms. If a film producer wants to use that song in a movie, they can purchase the rights based on the terms set by the artist who will then get paid directly. This erases the need for industry middlemen like Warner Brothers who end up taking the lion's share of their artist's profits. Virtue Poker - Online poker secured by the blockchain: At the height of it's popularity, online poker platforms like PokerStars were marred with issues that ranged from deck rigging to the abuse of player funds held by the company. Virtue Poker using Ethereum allows players to fund their bets directly, insuring that no central party can access and misappropriate player money. Their code is open sourced so that users can understand how hands are dealt, insuring that no one can rig the deck. Lastly, players are paid out their winnings in real time over the blockchain so no more waiting weeks for a check to come in the mail.

Ethereum Tokens

So now that you understand that Ethereum is a network for building decentralized applications that require a cryptocurrency called Ether in order to run, I'm going to introduce a confusing concept. Many dApps built on Ethereum have their own cryptocurrencies or "tokens." In order to interact with the dApps, customers need to purchase the dApp's native token.

Here's a helpful analogy I came across - when you go to a waterpark, you pay the admission fee and in return, you get a wristband. That wristband gives you the ability to ride the waterslides in the water park. With certain dApps, the token is the wristband, and a user must purchase it to interact with whatever the dApp offers.

Let's take a dApp called Golem as an example. Golem lets people rent out their excess computing power to people who need it - kind of like a computer AirBnb. To cite this article from Laura Shin, if I'm a computer graphics artist that wants to render some kind of computationally intense animation, I can purchase Golem tokens that let me tap into the Golem network to generate my animation. I then pay the people who are renting me their computers with the Golem tokens. The Golem token is a form of smart contract and this transaction is recorded on the Ethereum blockchain.

Since Golem tokens are also a cryptocurrency, they can be traded on the free market. If I'm a speculator who has no intention of using the Golem network to rent computing power, I can still buy the Golem token on an exchange in hopes that it appreciates in value. Like bitcoin, there is a fixed supply of Golem tokens so if the demand for the service increases, so will the value of the token. If I bought Golem at its original price of around 1 penny and still held it today, I would have made 35X my initial investment, since Golem tokens currently trade at round 35 cents apiece.

ICOs

ICO stands for "Initial Coin Offering" which is a fundraising mechanism for cryptocurrencies that has exploded in popularity this year - the majority of them are held on the Ethereum network. Similar to a kickstarter campaign, they allow entrepreneurs to raise money for projects by giving investors an early opportunity to purchase the cryptocurrency before the final product has been built. If the project is successful, the value of the cryptocurrency will rise in value and early investors can sell it on the open market for a profit.

ICOs have stirred up a lot of controversy because they represent a risky proposition with zero investor protection. Let's say I wanted to build a casino and, to finance it, I gave investors the opportunity to buy chips that could be used at my roulette tables once the casino opened. If you bought $100K in roulette chips from me and I decide that I no longer want to build the casino, you're stuck holding worthless chips. If investors don't form their due diligence, they may end up buying tokens for a project whose creators never intended to build it in the first place - the creators walk away with the money and the investors have no way of recouping their funds.

On the other hand, early investors in projects that go on to be successful have the opportunity to make enormous returns. For example, people who invested $1,000 in the Golem ICO would be sitting on $35,000 at it's current price of $0.35 - if it ever goes to $10, they will be millionaires. Another positive aspect of ICOs is that they let anyone, rich or poor, get involved in early stage investing. To invest in a company like Twitter or Facebook pre-IPO (initial public offering), you need to be an accredited investor - this basically means you're already a person of means. With ICOs, all you need is an internet connection and a little bit of money and you have the potential to become wealthy by investing in the right projects.

Far From Perfect

Ethereum has the potential to change the way humans transact with one another, but it is still a very young technology and it hasn't been without its problems. While the blockchain architecture underlying the Ethereum network is secure, not all of the applications built on top of it are. Faulty code can and has made applications vulnerable to hacking and malfunctions. Here are two prime examples:

DAO Hack - DAO was a dApp built on Ethereum that enabled crowd based venture capital. DAO token holders were given the right to vote on projects they wanted to support - if projects went on to be successful, DAO token holders would receive financial rewards. The DAO ICO received $168 million in funding. The DAO software was hosted on the Ethereum blockchain and was publicly visible by all. A hacker spotted a flaw in the DAO's code that enabled him to route $55M in ether held by the DAO into an account that he controlled. The Ethereum team had do do something called a hard fork (something I won't get into now) to reverse the hack and return the stolen funds.

DAO was a dApp built on Ethereum that enabled crowd based venture capital. DAO token holders were given the right to vote on projects they wanted to support - if projects went on to be successful, DAO token holders would receive financial rewards. The DAO ICO received $168 million in funding. The DAO software was hosted on the Ethereum blockchain and was publicly visible by all. A hacker spotted a flaw in the DAO's code that enabled him to route $55M in ether held by the DAO into an account that he controlled. The Ethereum team had do do something called a hard fork (something I won't get into now) to reverse the hack and return the stolen funds. Parity Wallet Freeze - Parity is a wallet where people store Ether. A flaw in Parity's code let a user delete a specific line of code that was necessary for accessing funds in a Parity wallet. This led to $280 million dollars worth of ether being frozen - it hasn't been stolen but it can't be accessed either. Parity Technologies has proposed another hard fork to correct the issue - something that is sure to divide the Ethereum community and rattle user confidence.

Despite the world changing implications that Ethereum dApps and smart contracts have, the trouble is that any programmer can write them - if they aren't written properly, they can behave in unintended ways and be exploited as in the above listed examples. Ethereum is still a very young network and security issues with dApps and smart contracts will have to be sorted out if it's to reach its true aspirations.

Additionally, the network needs be able to handle a higher volume of transactions. Similar to Bitcoin, Ethereum is subject to congestion when transactional volume gets high. Recently a dApp called Cryptokitties, where users trade digital cats, got so popular that it bogged down the entire network. Ethereum does have scaling plans in place, that they'll need to implement.

Leading The Decentralized Revolution