Blockchain Smart Contracts Are Dumber Than They Look
What is a Smart Contract?
A smart contract is a software service embedded in a blockchain. Its developers claim that this makes the software transparent and unhackable.
A trivial example of a smart contract is a lottery. The source code for how entries are processed and rewarded is embedded in the chain (as a smart contract - whereas the prize money is a blockchain coin). In theory, this should be super safe. You shouldn't need to worry about the reliability of the person running the lottery since the prize money is safely embedded in the blockchain. Therefore, you know that you should get a reward if you enter and win. More than that, you can review the smart contract source code and determine if the lottery works in a fair way and does, in fact, give you a chance to win. In other words – it should be safer than the government running a lottery – where we assume we are treated fairly and where we assume that they will have sufficient funds to pay prizes.
Positive Attributes of Blockchain Contracts
Transparent because the blockchains are stored in public ledgers on public servers and there are many of these servers and they can be compared and if any one is wrong it can be ignored or reverted to the versions that agree
Unhackable because, again, they are stored in full public view of many servers in many locations (run by many organizations). They work together to reach consensus on what is right. If any server has been hacked, its data will be ignored because it doesn’t match up.
So, What Makes Smart Contracts Dumb?
Humans.. as fallible, imperfect, yet intelligent creatures, we are notorious for making mistakes. To put it simply, humans make coding errors. You might spot them when you review a lottery smart contract code you are entering. You might not. The important point is that the code cannot be changed once it has been entered. You cannot write to older parts of the block chain, so if you needed to backtrack after a bug has been discovered, it's already too late. Some of these bugs might be profound and allow others to steal crypto coins. Some of the bugs are there by design – essentially, the smart contract is a honeypot.