Smart contracts in the peer-to-peer blockchain network

My article in AntyWeb, 7 February 2019.
One of the important features of blockchain is that it eliminates intermediaries by connecting the parties to a transaction directly. In 1994 Nick Szabo, a lawyer and cryptographer, realised that this kind of technology could be used to conclude agreements that would require no intervention or confirmation by either party but would be executed automatically once the conditions of the agreement were met. The idea of smart contracts was born.
Under this idea, agreements can be converted into computer code, where an asset or currency is transferred to a program running on a blockchain. The program runs the code and automatically checks whether the condition written into the agreement has been met, and therefore whether the asset should go to one of the parties as payment or be returned. Meanwhile, a block in the chain stores and replicates the contract, which keeps it secure and immutable. It also automatically updates information such as the fact that assets or currency have been transferred and, for example, that a product or service has been received.
For example, payment for ordered goods is made automatically when the condition of payment is the delivery of the goods to the buyer’s warehouse or the completion of a quality check without remarks. Payment takes place without human intervention after the delivery of even a single item confirmed by the logistics system.
The advantages of smart contracts:
- No central control. A distributed system that verifies whether a contract has been fulfilled means that many parties constantly check, re-check and update the records in blocks, and anything that does not comply with the previously agreed rules is rejected by the other participants.
- Security. The contract logic runs in parallel on all nodes of the blockchain, and the results are compared by all participants. Participants only change their own version of a block if they agree with the terms of the contract. The block is then replicated across the network. In theory, no one can cheat the blockchain.
- Transparency and flexibility. The logic and mechanism of the contract are available to all blockchain users. Anyone can verify and run the same code. Not an individual contract, of course – only its parties can do that, just as the details of a contract may be available only to the parties. If the terms and logic of a contract are acceptable to others then, to simplify a great deal, anyone can copy it for their own needs, modify it and run it again. Privacy on the blockchain is a contentious issue, as I have written many times.
Existing blockchains offer different degrees of support for smart contracts. The most popular and probably the most advanced public blockchain platform is Ethereum. In theory, any logic can be placed in an Ethereum contract. Unfortunately, the technology is still complicated, and the contract language, Solidity, is difficult and demanding.
Waiting for the killer app of smart contracts
For now, I am watching the new technology win over more communities and professional groups. In March, for example, the blockchain-based Active Citizen platform was used in Moscow to organise contact within micro-communities of neighbours. It is meant to enable voting and adopting resolutions, and the city authorities are responsible for its rollout. Europe is also joining the debate: in February this year the European Commission decided to set up a research observatory dedicated to blockchain.
These signs show that we are dealing with a technology that has probably not yet revealed its full potential but is already becoming ready for business applications. To see the full possibilities of smart contracts, however, we will have to wait a few more years. Analysts say their popularity should take off in 2025. We are now in the first phase of development. Perhaps in a year or two the secrets of smart contracts will have to be explained to a broad audience. Would we benefit from a craze like Pokémon, which showed what augmented reality can do?
Taxi drivers on the blockchain and simple logistics
Vitalik Buterin, the creator of the Ethereum ecosystem, summed up in one sentence the benefits blockchain can bring to urban transport: blockchain could make Uber disappear, because it allows drivers and customers to deal with each other directly. Before independent drivers appreciate blockchain, however, industrial transport may take notice. A distributed ledger can be useful wherever shipments need to be tracked in real time – especially where there is a multi-level information architecture requiring multiple confirmations and authorisations, and where trust matters. That is why the Port of Antwerp turned to blockchain. Today it makes life and communication easier for forwarders, drivers, staff and everyone involved in distributing goods. The technology makes it possible to track shipments from the manufacturer to the end customer with a simple mobile app that reads directly from the records in the chain of blocks. Simple, without large and complicated ERP or SCM systems, and therefore without large financial outlays. What is more, with smart contracts written on Ethereum, direct payments and confirmations of dispatch and receipt can happen automatically, without confirmation from the user or customer. Safely and instantly.

Paper documents are history
Every year, tens of millions of passports are forged around the world – traditional paper ones, of course. Some countries are already running advanced projects to digitise this data; Dubai is developing a digital passport. Blockchain could be useful here too. Sooner or later, public administration should embrace the idea of digital records that cannot be forged. All information used to identify citizens, and data about them, could be recorded in one global system based on a chain of blocks – a decentralised peer-to-peer database such as blockchain. Forging a document would require breaking into it and tampering with the chain of blocks, which is practically impossible. What is more, every change to the document, such as visa or transit annotations, is recorded permanently. We can only imagine how much this would increase our security and the transparency of data.
Politicians under watch
Blockchain can also become an important tool for civic oversight of politicians. In the future, its tools may prove indispensable for tracking the entire electoral process, where its ability to work in real time would be very useful. Votes could be tracked and counted with fewer election officials playing a smaller role. Voters could gain a useful audit tool guaranteeing that no votes are removed or added. There is no need to convince anyone how important that is for politics.
An even safer cloud
Blockchain as a technology may therefore win recognition among medium-sized businesses. Applications that split data into parts and allow operations to be authorised collectively will gain in importance. If you run even a small company, you probably keep its data in the cloud, and not at a single address. Blockchain likes exactly such decentralised environments; it is a technology based on distribution. Among other things, this means that files are split into small portions and stored in many places, and each new portion becomes part of the chain of blocks. Information about files being uploaded or downloaded goes to all network users, who can authorise the whole process. Distribution and collective authorisation strengthen users’ sense of security. The usefulness of such solutions for smaller and larger businesses and their growth is indisputable.

Enthusiasts and sceptics
The possibilities of blockchain inspire enthusiasm in the technology industry. Cooler opinions, however, come from marketers and trend researchers. Psychological resistance may arise around smart contracts. To recall: when the relevant conditions are met and confirmed by an algorithm, an agreement can be executed practically automatically. Blockchain enthusiasts treat this as a sign of technological intelligence. They stress that automating agreements is a chance to eliminate bureaucracy, unnecessary intermediaries and “third parties”, to make arrangements truly unambiguous and, as a result, even to relieve the courts. Sceptics, however, point to people’s reluctance to trust algorithms fully in this matter. Not everyone can imagine removing the human factor from making agreements or settling contracts. It is a bit like drivers who say they will never get into an autonomous vehicle and do not want road safety to depend on computer code.
Link to the full article (in Polish)
Related articles:
– Only God can count as fast: the world of quantum computers


