Smart Laws: a smart contract fail-safe

Smart contracts automate the execution of simple agreements, but what happens when mistakes are made and transactions need to be altered or reversed? Apla’s Smart Laws introduce human logic to situations, pairing current legislation with distributed ledger technology so that justice can be done and data returned to their rightful owners.

Distributed ledger technology (DLT) brings many advantages to data transfers: transactions become more secure, introducing immutability and finality, whilst intermediaries are also eliminated. It does this by using cryptographic algorithms and decentralising data storage. When you add smart contract logic to DLT we can automate data transfers, creating an environment with increased trust between counterparties, all without the need for third party intermediaries. However, after hacks in which large amounts of crypto assets were stolen, the paradigm of immutability built on a doctrine of “code is law” came under fire.

What is a smart contract?

  • An agreement between several counterparties
  • The agreement concerns certain facts, conditions and actions that, once fulfilled, lead to the automatic execution of the contract
  • The contract works according to the algorithm inputted as code
  • Once the conditions are agreed upon and entered into the code of the smart contract, they cannot be unilaterally altered by any one of the parties

Is code law?

Autonomy and immutability of distributed ledgers has come to be understood as an unquestionable matter of fact. The technology ensures the completeness of data sets for transactions up to the present moment in time, meaning attempts at tampering with data stored in validated blocks becomes impracticable. Nevertheless, the register can subsequently be altered by completing other transactions. Although, to do this correctly would mean that the procedure for making changes should initially be provided for in accordance with specific network rules or laws.

Problems arise because there are too many parties and contracts that are interlinked within one “ecosystem” so there needs to be an additional consensus between them based on offline legislature.

Contracts offline are based on law, so how can we have contracts in code that do not submit to the law?

By incorporating law into a blockchain network, allowing it to operate above smart contracts, we give people with authority to right wrongs just as in the offline world. For example, in the outside world we have judicial remedies that rely on laws to return property to rightful owners; Smart Laws introduce these laws to the digital world of DLT smart contracts.

Smart Laws in Action

Contracts in the offline world are based on the respective laws of a society. What makes smart contracts any different?

How “smart” is a smart contract?

Adding the word “smart” does not make a contract more intelligent, nor does it place it above the law of the land. First of all, smart contracts are just an algorithm which relies on certain inputs to produce a specified output: just as opening the throttle on a motor allows fuel to flow into the engine and power it to create motion. Smart contracts just fulfil a standard set of operations with a certain set of data, differing in no way from any basic algorithms or computer script.


Writing out an algorithm on a piece of paper and then putting it into code, does not make it smart.

Moreover, the introduction of Smart Laws provides for the regulation of smart contracts to bring them in line with regular contracts.

Human logic to overcome smart contract errors

Just like we have elected parliamentarians who make laws, so we can have elected officials who are given the authority to activate Smart Laws on behalf of the network. The system can be a democratic one in which we use an age old algorithm for solving civil problems that exist in society: legislation.

Benefits of Smart Laws

  • Regulation of contract execution
  • Democratic system
  • No need to turn back the clock to amend transactions
  • Introduction of human logic to overcome coding errors

Questions arise as to whether humans are more prone to errors than algorithms, and so we have to ask ourselves, which is worse: human error or contract coding error? Since it is up to a person to write the code, that straight away leaves contracts open to coding bugs on part of human error. Once such code is implemented and left to its own devices, it has no concept of fairness and will execute as directed, whether or not such an execution was the intention of the contract architect. This could end in disastrous consequences.

At Apla, we believe that smart contracts should yield to a higher law which can come into force where an unforeseen situation takes place. The code of the law should protect the interests of the system and its users, and should be activated on the basis of real intelligence: human logic. Introducing a system of law to code — creating Smart Laws built on top of smart contracts — means a regulated system in which legal recourse can take place and situations remedied.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.