Strategic Technology Consultant

Blog

Ideas, Thoughts, Reflections

Blockchain Continues to Evolve with Ethereum and Solidity

Ethereum and Solidity aren’t easy to explain because the topic includes multiple layers of abstraction. Here is the 10,000 foot explanation. (Tech folks, please give me a little slack here.)  

To fully understand Ethereum and Solidity, you need a little background in cryptocurrency and blockchain.

Blockchain is the foundation for all modern crypto-currencies. Blockchain has many abilities, but most importantly it is a decentralized, distributed ledger. If the word ledger doesn’t resonate , you can substitute in database. Unlike most authoritative systems, no central control is required for accurate record keeping. “The community,”--that is, all the people who have machines mining within the network--participate in validating transactions by confirming each one.

Cryptocurrencies, such as bitcoin, are built on blockchain technology. According to coinmarketcap.com, Bitcoin has the largest market cap of the over 1,000 crypto-currencies tracked within the exchange. In second place is Ethereum.

According to the Ethereum network web site, “Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference. These apps run on a custom built blockchain, an enormously powerful shared global infrastructure that can move value around and represent the ownership of property.”

That’s a mouthful, so let’s break it down.

Imagine an app store for applications that specifically leverage blockchain. The term “smart contracts” is just a fancy way of saying “an enforced agreement between two or more systems.” A smart contract is similar to a contract in the real word, except they are preemptive in the sense that they strictly enforce compliance before an action takes place. Although other systems have smart contracts, Ethereum makes them easy.

Blockchain, as previously discussed, is a distributed ledger. It’s a technique that leverages many systems (or computers) that are acting collectively to record transactions that can’t be altered or modified. This is where the anti-censorship claim stems from. There is absolutely no way to modify a transaction once it has occurred. In fact, even if illegal material is written to the chain (which it has been) there is no way to remove it; The ability to edit content would go against the fundamental design of blockchain.

No downtime is granted to Ethereum by leveraging blockchain technology. Because all nodes in the system have a complete copy of the data, anyone can read the data at any time. Depending on the type of crypto-currency, thousands or possibly millions of machines ensure durability. Imagine making a copy of your favorite photo and distributing it to 100,000 people. Now imagine the photo was made out of material that couldn’t be torn, burned or shredded. Uptime was designed into the system from the very beginning, which is why blockchain systems make so many copies of the data and confirms accuracy of the data.

The programming language for Ethereum is Solidity. Solidity is as if C and Javascript hooked up and had a baby. This is interesting, but a cute baby is frequently supervised by its uncle Python. If you know any of the parents C and Javascript (or Solidity’s uncle Python), you should adapt quickly to maneuvering Solidity programming styles and nuances. No doubt Solidity is still a baby so it will misbehave from time to time, but you can tell this program is going to grow up and do something special.

Consider this sample taken directly from the Solidity web site, modified for demonstration purposes. Notice the simple syntax. Remember Solidity code is focused on receiving a request, saving data and transferring money and ownership.


contract Purchase {
  uint public value;
   address public seller;
   address public buyer;
   enum State { Created, Locked, Inactive }
   State public state;

   function Purchase() payable {
       seller = msg.sender;
       value = msg.value / 2;
       require((2 * value) == msg.value);
   }
   ...  
   event Aborted();
   event PurchaseConfirmed();
   event ItemReceived();

   ...
   function confirmPurchase()
       inState(State.Created)
       condition(msg.value == (2 * value))
       payable
   {
       PurchaseConfirmed();
       buyer = msg.sender;
       state = State.Locked;
   }
 

   function confirmReceived()
       onlyBuyer
       inState(State.Locked)
   {
       ItemReceived();
       state = State.Inactive;

       buyer.transfer(value);
       seller.transfer(this.balance);
   }
}
 

Some interesting features of Ethereum--unlike other open systems--is that it costs money, more specifically “gas” to write data into the blockchain. This self-regulating feature ensures that the users of the system are efficiently utilizing the distributed network. Remember all data is written to all of the nodes (which will change in future designs) so efficiency is key!

What can you do with a blockchain system that can move money and also run code? I find that digital currency often confuses the conversation, so let’s look at an example that doesn’t focus on the money side of the equation.

A 2015 article in The Economist discussed how you could use blockchain technology to ensure property ownership rights--a fundamental aspect of democracies. The example included a scenario of an unstable country where land registries are mismanaged and examined the idea that the technology behind bitcoin has “implications far beyond the cryptocurrency.”

In lieu of a stable government as the authoritative keeper of land rights, a public blockchain could store and transfer property ownership. This would fundamentally improve the lives of millions across the globe.

Some words of encouragement for those who don’t get it: “Remember in 1999 when nobody really understood why anybody would need a website?” Blockchain is in a similar evolution. The current ecosystem that supports crypto-currencies is immature and advancing rapidly. Nobody knows what is going to happen to cryptocurrencies like Bitcoin, but blockchain (the underlying technology) is here to stay as a programming construct.  

A quick call out to Stan James, who is a senior blockchain engineer for being there to answer every crazy Etherium- related question I could think of.