DAO: The Code is the Contract.

But humans write the code…

Catheryne Nicholson
BlockCypher Blog
5 min readJul 22, 2016

--

On the heels of the hard fork, BlockCypher announces Ethereum Contract API

The DAO concluded with many unsettled opinions on what should have been the path to take. What started as an idealized “Decentralize Everything!” and “The Code is the Contract,” ended with a centralized decision to hard fork the Ethereum blockchain and people deciding the “intent” of the contract.

$150 million bug

If you step away from the idealized La-La Land of decentralism and do a reality check, ask these questions: what’s the probability of a V1.0 application with 1400 lines of code being bug-free? Would you bet $150 million on it?

Fundamentally, what caused the DAO catastrophe was a bug in the Slock.it application layer: the 1400 lines of code, not the Ethereum protocol. A hacker took full advantage of this bug and would have whisked away $60 million of DAO investor money had the hard fork not been implemented by the Ethereum Foundation, bailing the DAO investors out. Complicating matters was Slock.it stating multiple times in their terms of service that the “code is the contract.” Technically, the hacker did not violate any contract. He used it.

IMHO:

  • The Ethereum foundation should not have implemented the hard fork.
  • The hacker, while not adhering to the “spirit” of the contract, most definitely followed the “code” of the contract, which is exactly what DAO stipulated.
  • Slock.it was completely irresponsible in letting the crowdfund value run up uncontrolled to $150 million.
  • No rational investor could have missed the “Buyer Beware” flashing in fluorescent orange, billboard-sized lights.
  • The Ethereum blockchain can no longer be called immutable. The precedent has been set: if you Fail Big Enough, your project could still be bailed out against the “immutable will of the code.” (“Chancellor on brink of second bailout for banks” sound familiar?)
  • The Ethereum community suffered the largest loss. The fork created a schism in the community and the DAO caused the ether price to literally crash.

However, the Ethereum Foundation displayed tremendous leadership in a time of crisis, made a decision and executed it seamlessly: the hard fork went off smoothly. This ability to be decisive in a time of crisis is far, far, far superior to what the Bitcoin community seems capable of. Indecision kills and my hat’s off to the Ethereum foundation for their leadership and execution.

BlockCypher’s Contract API

As demonstrated loud and clear by the DAO, it’s a complex problem to write contracts on blockchain: there are many recursive ways to F*** it up.

No downward dog here.

This is where BlockCypher steps in. We simplify the development of blockchain applications. The new release of our Contract API furthers that objective. We take care of running, scaling and securing blockchain infrastructure, which is messy and difficult. As a result, developers can have laser focus on their application without having to worry about blockchain infrastructure details. This greatly reduce costs and the probability of errors.

Since BlockCypher began our Ethereum support in early June, we’ve been hard at work improving functionality and coverage, adding WebHooks and now releasing a Contract API. With this API, you can embed new contracts into the Ethereum blockchain and invoke them with just a few line of codes, no matter your programming language. BlockCypher binds every method exposed by a contract to a simple HTTP request. We create an endpoint for every Ethereum function.

To play around with the API, provide the gas amount and invoke the contract method:

curl -d '{"gas_amount": 100000}' https://api.blockcypher.com/v1/eth/main/contracts/ADDRESS/METHOD?token=YOURTOKEN

This is our small part in helping to simplify the complexity of writing Ethereum contract code with the hopes that it might prevent future DAObacles from happening. We also have many ideas to help make contract development easier and more secure. We accomplished it for Bitcoin transactions. Now we are on a release path to do the same for Ethereum.

The Hard Thing About Hard Forks: Good, Bad, and Ugly

Irrespective of our opinion about the hard fork, the hard thing about hard forks is what Ben Horowitz wrote in his book: “That’s the hard thing about hard things — there is no formula for dealing with them.”

We implemented the hard fork on Wednesday early morning July 20, 2016 and released our Contract API on Thursday July 21st. Coding and testing a drastic hard fork on BlockCypher’s consensus-compatible, custom-built node in the span of a few days was not fun. I thought our CTO was going to pull out all his hair and start looking like the A16Z founders.

Again quoting Ben Horowitz: “if you are going to eat shit, don’t nibble.”

There’s no formula for the ripple effect the hard fork is going to have going forward — some good, some bad, and some ugly. The good part is the community can now move forward, focus on more important things, like scalability, safety, security, and bringing more developers into cryptocurrency. The hard thing about hard forks is how they divide both blockchains and communities. As Andreas M. Antonopoulos so eloquently put it:

The drama the DAO created and the attention it captured could easily appear on an episode of HBO’s Silicon Valley.

The ugly reality is what many in the idealized blockchain space are unwilling to face:

“No matter how decentralized anyone or anything claims to be, code that is supposed to be law is still written by people and people can never be 100% decentralized” Catheryne Nicholson, CEO and Co-founder BlockCypher.

The road ahead is fraught with challenge, but for those enamored with building a future on blockchains, it needn’t diverge. Keep on building, and BlockCypher will too.

www.blockcypher.com
contact@blockcypher.com

Follow us @BlockCypher

--

--

Catheryne Nicholson
BlockCypher Blog

CEO @BlockCypher, Engineer, former US Naval Officer, Mother, STEM advocate for girls