As interest in developing blockchain-built businesses ramps up, so does interest in the underlying mechanisms of this technology. One important element is the smart contract, which are an essential element to any functioning ecosystem based on the blockchain - whether it's cryptocurrencies or decentralised apps (Dapps). 

But what exactly are they, and why are they so useful? Speaking at the recent Blockchain Live event, held in London, Nick Szabo, widely regarded as one of the forefathers of Bitcoin and the creator of 'smart contracts', explained what exactly these are, how they work, and why they're necessary to the functioning of blockchain systems. 

Image: iStock
Image: iStock

He began by discussing monkey brains. Every primate species, he explained, has an area of the brain - the neocortex - which is linked to the average size of the social group of that species. In humans, the projected value is 150. Interestingly, this number crops up again and again through the history of modern humans as the average size of communities. 

But Szabo was not simply highlighting an interesting sociological phenomenon, his point was that in modern, technological societies, this number is vastly inflated. Through social media, we can interact and be 'friends' with thousands of strangers, and in the world of global business millions of transactions take place every day between parties who have never actually met in real life. 

And it's for this reason Szabo argues that blockchain, and therefore smart contracts, are the technologies that modern humanity needs today. This is because of their removal of the need for trust. When transacting in bitcoin, for example, you don't need to trust a central body to carry out the transaction safely for you.

Where instead does the trust lie? It lies simply in the programming - the software that is developed to execute these transactions.

Trust in modern societies can not be solely the function of our limited human capability for forging bonds, Szabo argues. But in our technologically advanced world, he offers an alternative solution. "We have this huge computational surplus that we can use, if we're clever, to take some of the strain off our mental limits," he says. "And that's one of the key things to public block chains."

This minimisation of trust afforded by blockchain technology is also an argument for using smart contracts. "We're dealing with partial strangers. We haven't grown up in an intimate village with these people, so our moral instincts tend to fail us when it comes to business relationships," Szabo tells Techworld. This is why our current legal systems exist. "We want to put our deals down in writing, and make promises to each other, and use the legal system to hold people to them," says Szabo. 

Szabo says these are essential when two parties are looking to make a value transaction. They both want the transaction to benefit themselves, but they don't have implicit trust in the other party. "Doing deals like this requires laying down rules that participants are motivated to follow," says Szabo. 

One of the simplest definitions of smart contracts then, is 'a machine programmed with rules'. "It could've been defined in a contract. But instead, a machine performs or verifies this," Szabo says.

This essentially means that in blockchain, the legal footwork of developing contracts and ensuring they are followed is replaced by programmers, and machines that operate this code. 

"This is an old fashioned Coke vending machine," explains Szabo. "If you put in a dime and a nickel and you get the soda back, that's the machine's performance."

Three elements of this event are typically baked into smart contracts, he says: verifying performance, control of assets, and automated performance. 

This is the kind of simple logic that the likes of bitcoin rely on to function. The smart contracts in this case are simple - pay one individual and remove the value from a different account. But what about more complex procedures? 

Decentralized apps built on top of the Ethereum blockchain, for example, are tasked with much more complicated value exchanges. "The full, smart contract involves user interfaces, involves some other phases of the deal, such as search, and negotiation, and performance monitoring. It will also happen off blockchain," says Szabo.

"For example, if you're doing logistical contracts, you want to know where something is - where a package delivery, for example. Or a delivery of a person is in time and space - that's off blockchain."

But more sophisticated smart contracts are still in the nascent stages of development, something Szabo is currently involved in. "Quite often, right now, they're take it or leave it deals. But a true smart contract can be negotiated." Szabo is now working on smart contracts that can be negotiated and customised to unique business cases. 

"So, why make smart contracts?" asks Szabo. "Very similar to the reasons we would make traditional contracts. We want to make win-win deals, to go with smart contracts over traditional contracts, when dry code has an advantage over wet."

By 'wet code' Szabo refers to traditional contracts, while dry code refers to smart contracts. He says that optimally, in most cases you want to use both. 

There is another boon for smart contracts in this age of globalisation, however. "The software can be globally seamless," says Szabo. "Whereas law is local, you're under a state law in the United States, or UK law in the UK. And if you're trying to do business across border, that can become very costly."

What is Szabo working on for the future? "The low-hanging fruit for smart contracts is financial smart contracts," he says, "it's the easiest to verify the performance of. So we're working on finalised versions of loans, bonds, futures options, swaps, that kind of thing." He says right now, his focus is on making the financial system globally seamless. No small task, but with the man integral to the creation of bitcoin and blockchain, it couldn't be in better hands.