article banner

Fairer and just societies using blockchain

Eliminating trust using smart contracts

Immutable, public programs

Although blockchain technologies are mostly associated with Bitcoin and the current ICO craze going on right now, another less mentioned feature that blockchains enable are the use of smart contracts for computation. Not many people are aware of the possibilities that come from smart contracts and such technology will revolutionize the way the Internet works and perhaps how our societies function.

In short, a smart contract is a computer program which is deployed onto the blockchain. In the Ethereum platform, for example, the code will be placed on the blockchain and associated with a public address just like any other wallet account’s address. Since the code is on the blockchain, it is immutable and is available for everyone to read (and execute).

Anyone can then submit a transaction to the deployed smart contract’s address. A network of miners (which are continuously finding new blocks to append to the blockchain) will execute the code within the smart contract which will determine what happens with the submitted transaction. Since the contract code is public, anyone can verify that the computation was correct including other miners who will penalize any miner (by rejecting their block) which attempts to cheat and not follow the contract’s code.

Centralized chains of trust

If we had to take a look at the way our societies functioned, we will see that there is always a complex chain of trust between the members. These chains will often end up with one central authority figure that wields a lot of power in deciding how everyone else in that society must behave.

For example, at the high end, a central bank which issues currency has complete control over who can own that currency, what the value of that currency is and the amount in circulation. Another smaller example, would be the traditional relationship that exists between an employee and their employer: an employee trusts that the employer will pay their wages on time while the employer trusts that the employee will do their work, as promised.

The employment agreement described above is a very interesting problem to think about because when things go wrong, another authority is brought in to resolve the issue (usually some sort of court case). The reader can surely appreciate how easy it is to corrupt anyone in these chains of trust.

Fairer societies through smart contracts

Avoiding these chains of trust therefore will ensure that no one even has the opportunity to misbehave and that everyone gets their rightful dues. Using smart contracts, two people can agree on what their obligations are to each other, write it in code and put it on the blockchain. The smart contract will ensure that whatever was agreed is enforced and no central authority can intervene (and cheat) to resolve issues.

This opens up a whole new way for our society to do business with each other because rather than hoping that the entities we trust will act correctly, we can instead enforce that everyone’s interests are taken care of using a blockchain.

Let’s take a look at a simple example first: Alice wants to become a paid up member in an association. Members in this particular association will vote on different proposals on what to do with the money collected through sponsors, events and so on. She could hand over the membership fee and hope that she gets a vote for the proposals being put forward. She would also need to trust that the management team is not somehow rigging the votes or making off with the association’s funds.

Instead though, the association wants to be transparent with how they conduct their business. They have a smart contract which defines how votes are taken on proposals (ie. all paid up members are given a vote, etc.). They also have a smart contract which defines how membership fees are collected and more importantly, how the funds are managed. In this case, funds can only be transferred to someone else by approval in a vote.

Now, Alice simply deposits her membership fee into the membership smart contract and she automatically gets a vote in future proposals. She also knows that the management team can’t simply run off with the money because the smart contract does not let them withdraw the money! The only way they can take the money is by approval in a vote amongst the members.

Alice no longer needs to trust anyone because she knows precisely how the smart contract will act and function. Finally, let’s take a look at a smart contract system for the employment agreement mentioned earlier.

Example: an employment smart contract

The parties involved in an employment agreement are:

  • The employee
  • The employer
  • The taxman — we can’t forget about him, can we?

Before the employment agreement takes effect, both the employee and the employer must make a deposit into the smart contract itself. This is a refundable deposit and both parties will get their deposit back if the contract is terminated correctly. If any party misbehaves, their deposit could be awarded to the other party as compensation.

The employee’s salary is agreed and input into the smart contract itself. The employer must always have deposited enough money to cover the employee’s next wage but the employee won’t be able to withdraw their money until after payday. If the money due is not there yet by payday, the employee can terminate the contract and take the employer’s deposit. Furthermore, there is also an agreement about notice periods and probation periods. The employer can’t terminate the contract without also paying for the effective notice period because otherwise they lose their deposit.

The government might want to ensure that it collects the tax due to it to consider the agreement legal. To do this, a separate contract can be deployed that defines an Income Tax Scheme. Smart contracts on the Ethereum platform can actually communicate with each other. Therefore the employment smart contract can declare the employee’s income on the tax scheme contract and even allow the employee to pay the tax due immediately. If the employee takes up a different employment contract in the future, the same tax scheme smart contract is used so their previous tax payments are recorded and the correct tax calculations can be made.

A problem still exists with the above smart contract. It is difficult for the smart contract to determine whether the employee is doing their job well. A solution for this is admittedly hard to find but a possible way to resolve this is to try and achieve consensus between the employee and the employer. If they both agree that the employee is not performing well, then the employee gets, say, half of their deposit back. Otherwise, if they still can’t agree, the case is put to a vote in public. The public (which is not a centralized entity!) will decide who is in the right and who is in the wrong. Whoever wins gets their deposit back. Whoever loses, loses their deposit which gets distributed amongst the voters for their time as a reward.

Looking to the future

The smart contract system described above is only a tiny sneak peak of what is possible using decentralized computation and smart contracts. At the extreme, we can have entire nation-wide elections and governments being run using smart contracts. I invite the reader to think about which chains of trust they’re involved in and encourage people to eliminate these chains using blockchain technologies. Through our efforts and with a little bit of help from technology on the side, we could finally have a society that is fair and just for all.

Content provided by Kyle Pullicino, Kyle is a consultant on blockchain for Grant Thornton Malta, with experience in financial and betting systems. More recently, he has delved into the world of blockchain, specifically the Ethereum platform and smart contracts.