Deep Dive : Karani Tech Blockchain land registry for Kenya

Karani  (swahili for clerk) is a Blockchain Land Registry that uses blockchain technology to secure land transactions.

A lot of words but what do they mean.

Problem:

If you have lived in Kenya, you've probably heard of land grabbing issues, boundary disputes, duplicate title deeds, etcetera. Exacerbated, by the use of paper documents and poor filing systems.

Let's try and build a solution that addresses these issues. The main issues being:

  • We would like a system that does not allow duplication of title deeds
  • The system should accommodate GPS coordinates that have no overlaps
  • A log should be kept of all system and document changes and should be readily available

The first naive solution that comes to mind is to have a digital system, essentially a central server that keeps all these records and performs validation on them.

  • we can have a single source of truth by having only one owner on the title deed, using a conditional check
  • we can check that each land area does not overlap with any other, using GPS coordinates and a simple polygon overlap algorithm
  • we can log all system changes such as SQL queries, and the user who performed them

It should be apparent that at this stage, the integrity of this system relies heavily on who has access to the system. Since values can be changed and logs can be deleted, taking us back to square one. We want a trustless system, with no point of concentrated trust. This is where the trust blockchain comes in

and then blockchain came along and fixed EVERYTHING! - spongebob rainbow | Meme Generator

 

BlockChain

What is it?

blockchain is a growing list of records, called blocks, that are securely linked together using cryptography.[1][2][3][4] Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data (generally represented as a Merkle tree, where data nodes are represented by leafs). The timestamp proves that the transaction data existed when the block was published to get into its hash. As blocks each contain information about the block previous to it, they form a chain, with each additional block reinforcing the ones before it. Therefore, blockchains are resistant to modification of their data because once recorded, the data in any given block cannot be altered retroactively without altering all subsequent blocks.

Source:Wikipedia

Seems complex, but I'm sure if we go step by step you'll get the hang of it.

We want a way to prevent deniability, let's say you told me who you want to be the sole beneficiary of your will. You say that Bob will get everything after you die.Let's call you - 'Alice' (to make thing simple)

  • if you die, we want everyone to respect and honour the will that Bob inherits from Alice.
  • we want a way for people to prove that it's indeed you who wrote the will and not me.

We will use a digital signature, similar to how a signature works, but much more versatile. A digital signature works by having a system of a pair of keys, one public key and one private key. The public key is first shared publicly, in our example you will share this with everyone you know before writing the will, then you will you use your private key so sign your will. This will create a digital signature.

You then share your will and digital signature that is unique to the will and can only have been generated by someone with the private key( in this case you)

So if you die, to verify that the will is legitimate, all one has to do is use the public key you had shared publicly to verify that the digital signature is indeed from you.

 

Now back to Land:

We can use digital signatures, to :

  • Verifying that owners have legitimately obtained ownership from previous owners,by checking the chain of signatures with their respective public keys (solving land grabbing)
  • Verify that the state/ministry has indeed been part of the transfer of ownership at one time of another, since they have appended their state digital signature to your title deed

This solves most of our issues, we are left with the following concerns:

  • How does one ensure that records that contain accountability info, are not changed? These includes names of people, names and identies of officiating staff
  • We need a way to prevent centralisation of our logic, since if acting as malicious official I can change the code that checks for overlapping land parcels and still have the official digital signature of the state. Which will be another can of worms in future.

To solve this we need a peer-to-peer system.

In a blockchain network, how do new nodes know the IP addresses of other nodes to connect to? - Quora

We can set up peers(nodes) that have the same logic, that act as double checkers, ensuring that every transaction/operation performed on the registry adheres to strict validation rules, that cannot be changed.

Let's go over what this means. Let's say we want to add two titles of land to the system. Previously these title deeds only existed in paper form. We have:

  • Title A: forest land belonging to the public
  • Title B: private land belonging to a prominent person, but near the forest(Title A)

If we use a central computer, the prominent person can instruct official to temporarily disable the check (check for overlapping land parcels), and the can basically encroach on the forest.

To prevent this, we use multiple nodes that have the same logic, and can therefore cannot be changed. For this to work, the nodes themselves  need to be trusted by the public and they should not be in position to be influenced by anyone. Our recommendation for  good candidates  would be institutions such as ISPs, private and public universities ,NGOs and law societies. All these nodes also append their digital signatures on each change, indicating they verified that the "change/operation" occurred as per the requirements. What we just described is a smart contract, a computer program or a transaction protocol which is intended to automatically execute, control or document legally relevant events and actions according to the terms of a contract or an agreement.[1][2][3][4] The objectives of smart contracts are the reduction of need in trusted intermediators, arbitrations and enforcement costs, fraud losses, as well as the reduction of malicious and accidental exceptions.[5][2]  Source Wikipedia

And that's block chain..

What about the block in blockchain, well the operations we described above are grouped together in blocks.In our case, each operation such as transfer of ownership, land subdivision is individually placed in a container called a block. This block is hashed and the next block( next operation) has reference to previous block.(As illustrated below)

 

What is Blockchain Technology? | IG EN

 

Here is the system overview of Karani.

It looks complex, but it's not. Let's go through how it all works using an example.

Let's say Bob wants to buy Land from Alice.

  1. First Bob has to confirm with the system if Alice is indeed the owner and not a scammer, we will come back to how Bob does this. Let's assume that Bob has indeed undoubtedly confirmed that Alice is the rightful owner of the piece of land.
  2. Once Bob and Alice agree on the price, Alice has to sign a transfer document using her private key, indicating that she has indeed transfered land to Bob, through a Digital Signature appended to the document.
  3. She then uploads this transfer document to Karani.
  4. The Land Office (government server) does some very basic checks on the uploaded document (Person is logged in and has uploaded a non-corrupt file)
  5. The Land Office then creates what is called a block proposal where the main transaction is a land transfer. It sends this proposal to the "blockchain" for other nodes to verify
  6. The other nodes then proceed with verification. For land transfer. They first check if the Digital Signature is valid. They do this by using Alice's public key that they have on file.
  7. Note that each node has a separate and independent database, ensuring that if someone changed Alice public key in one node,  the other nodes have the correct one. (70% of nodes have to have consensus for the block proposal to get approved)
  8. Once they confirm. Each node signs that they have confirmed the block proposal and forwards the request to an aggregator, whose sole job is to append all the signatures of the nodes to the block proposal and send the result back to the nodes.
  9. Each node then verifies that all the signatures are valid. If there are valid responses from at least 70% of the nodes the block gets added to the blockchain, and all database/state changes are made/committed.
  10. And now Bob is the rightful owner of the Land.

 

But how does Bob know the process is truly complete, or more importantly how does Bob is not a scammer?

To verify ownership Bob can access the blockchain using a tool called Sahihi (Swahili for correct). The sahihi  tool does not connect to the government Land Office servers, but instead connects to a node of Bob's choosing. From there he can look at each block based on its number. The block number can be obtained from the title deed document.

The Sahihi tool also calculates and verifies the digital signatures of the blocks and confirms they are indeed correct. Sahihi tool is open source which means it cannot be tampered with to cheat users, as anyone can easily inspect its code and build/make it from scratch.

Github Link

 

 

 

What's neat about this is that you cannot perform undo, modify or insert operations. What happens on the blockchain stays on the blockchain. Hence, making sure no nefarious actions take place and the integrity of the land registry is observed.

Template | Modern Problems Require Modern Solutions | Know Your Meme

and that's it, we just solved one of the greatest issues plaguing our land registry.

Or have we?

As you can tell the concept of digital signatures/blockchain is fairly complex and is a huge challenge to convince the public of how transformative it can be.

But Hey

Rome Was Not Build In A Day. | Motivation, Quote of the day, Rome

it was probably Block by Block

 

 

 

 

Leave a Comment