Tackling Corruption in Gotham City with Blockchain
Unless you have been living under a rock you know that Bitcoin and cryptocurrencies are starting to capture the interest of mainstream community.
While I’m not particularly optimistic about the short term uptake of crypto currencies for day-to-day shopping due to it’s volatility as well as just the practicality, I do believe the technology of Distributed Ledger Technologies (DLTs) or blockchain has the potential to form the backbone for smart contracts. This gets particularly interesting when combined with Artificial Intelligence. I believe this is going to disrupt a number of industries and jobs in the next 5–10 years.
So what exactly is a smart contract?
At its core it is a legal agreement between two or more parties. What makes it smart is that it’s encoded as (software) code. This code can execute the contract when the conditions governing the contract are fulfilled. The record of the contract’s execution is stored and protected from any future tampering using a DLT like the Blockchain. The diagram below shows this.
Now let’s pause for a moment. Think about the implications of the above diagram on society. If you could add a layer of tamper-free trust within the current hierarchies such as governments and corporations many contracts could be fulfilled without the need for human intervention. Take real-estate as an example. Two parties could directly conduct a sale of property if the ownership was recorded in a distributed ledger like the Blockchain. For more on historical development ledgers and contracts as well as their societal impact I recommend reading this post. I think Marc Andreessen says it best:
‘…for the first time, a way for one Internet user to transfer a unique piece of digital property to another Internet user, such that the transfer is guaranteed to be safe and secure, everyone knows that the transfer has taken place, and nobody can challenge the legitimacy of the transfer. The consequences of this breakthrough are hard to overstate.’ — Marc Andreessen
Below is a map adapted from a Tufts University study showing a number of countries starting to seriously test blockchain based applications.
Over the next few weeks I’d like to demonstrate how easy it is to create a smart contract applied to a “smart city” application using currently available open source tools.
So where does it start. In my opinion it starts with record keeping. Governments around the world are now starting to experiment with applications of blockchain to add more transparency and accountability to its processes. Let’s look at how to decide what processes qualify for a blockchain solution. Here it’s important to point out that there’s a set of applications where blockchain makes sense. Below is a decision tree showing suitability of blockchain based solution.
Here we can see if the transactions are private then we would need a “Permissioned” Blockchain. Most people know blockchain through bitcoin which is an example of a “Public” Blockchain. So for example we can still access the first transaction ever conducted on the bitcoin blockchain — namely the infamous pizza purchase because it’s public. Some government business needs to be conducted in public, for example voting on legislation while others need to maintain privacy of individuals.
Saving Gotham City
Let say we have been brought into Gotham City Council to come up with a way to reduce corruption. Specifically they want to ensure that a large public infrastructure project which is being funded by taxpayers money isn’t squandard by Rupert Thorne and his cronies. Just a caveat: I am by no means suggesting blockchain is a cure to solving corruption — if you are interested in corruption and potential for tackling corruption I recommend this study this paper. With that out of the way let’s see if it qualifies for a blockchain based architecture.
Does the infrastructure project need a shared common database?
Yes. Below we have a simplified ER diagram of the database for a construction project. We could envision all transactions being on a public blockchain encoding information about the orders. At the same time as tasks are completed schedules could be updated and a projection of project’s expected date could be kept updated via Machine Learning based forecasting.
The fact that the transactions are on a public blockchain would allow transparency and anyone from the member of the public could check up on where the money is going.
Are multiple parties involved?
Indeed as evident from the above diagram.
Do parties involved have conflicting interest and/or not trusted?
Yes definitely — this is Gotham City after all. 🏙 🏦
Rules governing participants are uniform?
Yes. For example we may have a set of rules for evaluating completion of milestones by external contractors or for suppliers of materials. If these are met payment may automatically be released to the suppliers.
Need for an objective immutable log?
Yes definitely — we want to make sure the records can’t be tampered with — or manipulated without detection.
Rules of transactions do not change frequently?
Yes. Most transactions during a construction project are expected to be pre-determined. For example rules around requirements for planning permits from planning authorities. Rules around civic engagement, notice periods and ability to contest building proposals.
Are transactions public?
Some will be public others may not be. To prevent corruption all records about transfer of funds may be in a public blockchain.
Let’s look at the technology for building such a system with focus on the blockchain components. We have the Hyperledger Sawtooth project from the Linux Foundation.
Hyperledger Sawtooth is an enterprise blockchain platform for building distributed ledger applications and networks Sawtooth simplifies blockchain application development by separating the core system from the application domain. Application developers can specify the business rules appropriate for their application, using the language of their choice, without needing to know the underlying design of the core system.
Sawtooth is also highly modular. This modularity enables enterprises and consortia to make policy decisions that they are best equipped to make. Sawtooth’s core design allows applications to choose the transaction rules, permissioning, and consensus algorithms that support their unique business needs.
In my next post I’ll delve more deeply into Sawtooth and we’ll start to encode the business rules for Gotham city.