So most people are familiar with “the blockchain” by now. But fewer people are familiar with smart contracts. Bitcoin was the first blockchain based cryptoasset. But the types of transactions that Bitcoin’s system could perform were very limited. Ethereum expanded on this limitation, by allowing full scale programs to be run by the system, with some limitations. There’re many places to learn about the full nature of what smart contracts can and cannot do. But what the addition allowed is for very complicated transactions to be conducted in a distributed and decentralized fashion.
Blockchain technology and smart contracts are in their infancy. So far, they’re mainly being used to create digital tokens that are traded for speculation, or for the funding of business operations via ICOs. But over time, we’ll start to see more technology that can be controlled through smart contracts. And as that happens, smart contracts will become an increasing part of our every day lives.
The DAO Debacle
DAOs or “distributed autonomous organizations” are an interesting use of blockchain and smart contracts. But the basic proof of concept DAO, literally just called The DAO, happened to be a total failure. What happened?
The smart contract that defined the DAO had a bug. Basically, when a transaction was made, the order that the balance was updated was backwards, so before the new balance was updated, a person could ask for the money back, and could do so multiple times. This allowed the attacker to siphon off a lot of money, and that spelled the end of The DAO, and unfortunately, the emergence of a fear of this technology.
Contract Failures
But not only is such failure possible with any program, and in fact there was a recent example of a person in China siphoning off a lot of money from ATMs (The Verge), but actual contracts often have loopholes, especially with poorly written ones. Carl Vitullo, in The Future of Bitcoin and Ethereum, suggests that smart contracts aren’t reliable, and with the whole DAO mess, it’s easy to see why. But are actual contracts reliable? If two average people wrote up a contract, odds are any good lawyer would be able to poke a hole in it. Just look at Judge Judy.
The job of a lawyer is to ensure that there are no significant loopholes, or at least do everything possible to limit them. And so, in the future, a lawyer will need to be able to evaluate smart contracts. For this reason, a lawyer is going to be as much programmer as anything else, and while the law will still matter, it will be the proper functioning of the smart contract that will matter the most.
A good smart contract lawyer should have been able to realize that transaction order mattered and that the way in which The DAO was coded would allow for someone to withdraw large sums of money from The DAO. But this also brings up another good point.
“Smart” Smart Contracts
In reply to my discussion on an alternative to Facebook, provisionally called Topix, Mark Stair asked me what I thought was missing from EOS. While EOS seems like an interesting alternative to Ethereum, it doesn’t do what I need for my projects. It can, and so can Ethereum, as both are able to implement almost any time of distributed and decentralized application, but the type of smart contract system that I would like to see developed has as its goal the coordination and maintenance of contracts between humans and institutions, rather than the development of software applications.
This means that human readability should be improved. But it also means that a system of credit worthiness and arbitration needs to be built into the core of the system. In terms of credit worthiness, I would like to see an algorithm which determine an overall metric.
This metric could be combined with a proof of lock system, as I call it. It’s similar to a proof of burn system, where consensus is determined by sending tokens to an unusable address. From Wikipedia:
The idea is that miners should show proof that they burned some coins — that is, sent them to a verifiably unspendable address. This is expensive from their individual point of view, just like proof of work; but it consumes no resources other than the burned underlying asset. To date, all proof of burn cryptocurrencies work by burning proof-of-work-mined cryptocurrencies, so the ultimate source of scarcity remains the proof-of-work-mined “fuel”.
The only main difference between the proof of lock and proof of burn system is that locked tokens could be released in order to repay debts.
But who gets to unlock those tokens? And what happens when there’s a disagreement with the human readable contracts? I think this issue can be solved with a system of trusted nodes, similar to the anchor system in stellar: see cryptocurrency ecosystem. If there is a disagreement about whether a contract was executed correctly, the two parties could ask an arbiter node to make a decision. Once the decision is made, locked tokens could be released to the appropriate party, thus making the locking system a sort of escrow.
It’s possible that tokens could also be generated based on the amount locked, and thus the proof of work system could be bypassed, and making the system a hybrid between proof of burn and proof of stake, or proof of work could still be used in the generation of new tokens.
Going back to EOS, while this system can indeed be implemented on the system, as it could be with Ethereum, I would prefer to see it as an integral part of the system, rather than as an overlay.