Applied design of distributed ledgers for real estate and ...

45
IN DEGREE PROJECT COMPUTER SCIENCE AND ENGINEERING, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2018 Applied design of distributed ledgers for real estate and land registration RICCARDO SIBANI KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

Transcript of Applied design of distributed ledgers for real estate and ...

Page 1: Applied design of distributed ledgers for real estate and ...

IN DEGREE PROJECT COMPUTER SCIENCE AND ENGINEERING,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2018

Applied design of distributed ledgers for real estate and land registration

RICCARDO SIBANI

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

Page 2: Applied design of distributed ledgers for real estate and ...

Abstract

The recent emergence of a distributed technology named blockchain,clearly created a new point of view in the data storing and data distri-bution fields. If on one hand blockchain is mainly known for Bitcoin (anauto-regulated decentralized digital currency), on the other hand it hasthe potential to set up an auto regulated economy.

In this thesis, the blockchain technology will be analyzed and describedstarting from P2P architecture and its origin in 2009 Satoshi Nakamoto’swhitepaper, and leading to the most up to date blockchains. The advan-tages and disadvantages of such architecture will be pointed out keepingin mind the security, speed and cost of such infrastructure.

While Real Estate companies have often anticipated the technologicalinnovations, land registries, instead, derive and keep a working mannerwhich is extremely old and out of date: made of unclear procedures andwet signatures. The market needs and legislation will be researched mainlyreferring to other works and integrated with a technical point of view withparticular focus on the decentralization of such systems.

After analyzing the flow, problems and flaws of the current system, anew proposal will be researched, in particular trying to minimize the deadtime in between the different steps of the mortgage, increase transparency,as well as reducing dependence on the central authorities, leading to moreconvenient interactions among the properties’ stakeholders. An attractivelow capitalization decentralized financial product will also be proposedand implemented able to lower the interest rate and create a profitableinvestment with low risk, low interest and durable in time.

Secure and ad-hoc algorithms will be presented and, in a later section,analyzed in combination with different blockchain technologies. Scalabil-ity and performance will also be evaluated, taking into account all thecurrent technology limitations and the near future opportunities.

Keywords— Blockchain, DLT, Land registry, Real estate

1

Page 3: Applied design of distributed ledgers for real estate and ...

Contents1 Introduction 4

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4 Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.4.1 Benefits, Ethics and Sustainability . . . . . . . . . . . . . 71.5 Delimitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Literature review 92.1 Peer To Peer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 Structured network . . . . . . . . . . . . . . . . . . . . . . 92.1.2 Unstructured Network . . . . . . . . . . . . . . . . . . . . 102.1.3 Example of P2P applications . . . . . . . . . . . . . . . . 10

2.2 The need for decentralization . . . . . . . . . . . . . . . . . . . . 102.2.1 The 3 challenges of P2P . . . . . . . . . . . . . . . . . . . 11

2.3 Real Time Applications . . . . . . . . . . . . . . . . . . . . . . . 112.3.1 CAP Problem . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.4 Blockchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.4.1 Bitcoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.5 Note to the reader . . . . . . . . . . . . . . . . . . . . . . . . . . 152.6 Assets on the Blockchain . . . . . . . . . . . . . . . . . . . . . . . 16

2.6.1 Property management . . . . . . . . . . . . . . . . . . . . 162.7 Property Management . . . . . . . . . . . . . . . . . . . . . . . . 16

2.7.1 Property Management on the blockchain . . . . . . . . . . 17

3 Theoretical Background 183.1 Postchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.2 Flexible tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.3 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.4 Kotlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4 Methods & Analysis 204.1 Design a way to replicate it . . . . . . . . . . . . . . . . . . . . . 204.2 Current Technologies . . . . . . . . . . . . . . . . . . . . . . . . . 204.3 Implementation phase . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Implementation 235.1 Basic workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.2 User creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.2.1 Contract Registration . . . . . . . . . . . . . . . . . . . . 235.2.2 Contract validation . . . . . . . . . . . . . . . . . . . . . . 235.2.3 Property segmentation . . . . . . . . . . . . . . . . . . . . 25

5.3 Burn shares . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.3.1 Sell shares . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.3.2 Remove shares on sale . . . . . . . . . . . . . . . . . . . . 275.3.3 Reserve shares . . . . . . . . . . . . . . . . . . . . . . . . 275.3.4 Manage reservation . . . . . . . . . . . . . . . . . . . . . . 28

5.4 Automatic behaviour . . . . . . . . . . . . . . . . . . . . . . . . . 30

2

Page 4: Applied design of distributed ledgers for real estate and ...

6 Evaluation 316.1 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.2 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.3 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.4 Comparison against traditional centralized systems . . . . . . . . 33

6.4.1 Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.4.2 Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.4.3 Scenario 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

7 Future Works 387.1 Automatic credit score record . . . . . . . . . . . . . . . . . . . . 387.2 Automatic crypto payment . . . . . . . . . . . . . . . . . . . . . 387.3 Integration with land registry and other authorities . . . . . . . . 38

8 Conclusion 38

3

Page 5: Applied design of distributed ledgers for real estate and ...

1 IntroductionReal estate is among the most innovative markets, with research in AI, VRand blockchain. While many efforts are put in providing a better consumerexperience, many little has been done in order to improve the financial productsattached to properties such as mortgages and loans.

Mortgages can be tracked back in time to Romans (Mutuum) and sincethen, the modalities of it have not changed much. The current terminology andregulation in the common law is from the end of the 18th century. While the realestate market had kept changing with different architectures, selling channels,companies and laws: the mortgage did not change, remaining a product sold byrich entities to people in need of liquidity.

The real estate market, solely in Europe, is considered to be worth e25.1billion in 2016 (Deloitte 2018[b]), and it also believed to be one of the mostinnovation driven, mainly in the north and central Europe (Deloitte 2018[b]).

The rise of the blockchain technology, dated 2008 (Nakamoto 2008), createsthe opportunity for a decentralized platform where small actors can fund some-body’s property, enhancing mortgagors to access mortgages at a lower rate and,perhaps, even with a not less than perfect credit record and for small investorsto become mortgagee and accessing an investment product with low risk, forlong time and without big initial capital.

Blockchain can be plugged in place of or along with a traditional infras-tructure, providing the database and back end services and ensuring the samefunctioning.

Such solution is Peer to Peer (P2P) based and, therefore it inherits all thebenefits of a distributed system such as the absence of a single point of fail-ure, and the distribution of information (which translates to resistance towardscensorship).

Blockchain, thus, is designed with cryptography in its bones and the wholesystem can only work if it is encrypted asymmetrically (such encryption mecha-nism allows to verify and certify the signers and the authors of the transaction),increasing the security and still being able to prove the sender of the message,and its consequent update in the database.

This database is periodically updated, that is to say it changes its state atevery new block that is broadcasted in the network. One block can containmultiple transactions in order to optimize the speed of the algorithm (only oneblock needs to be shared instead of all the transactions and is faster to verifybig number of transactions) and, since each block points to the previous one(thanks to an hash of it), it is possible to order chronologically and recreate thesame state at the same block height (meaning at the same block number in thechain).

Given the possibility to host a database locally, there arises the opportunityto access all the information without trusting any party or to simply ignore amisleading behaviour: the majority leads the algorithm.

Creating secure financial products on the blockchain is possible and withoutrequiring the trust and certainty of a central authority (i.e. bank), thanksto a contract that is self administrating. The only operation required by thestakeholders of the mortgage is to run a node: a client-server machine that is incharge to communicate with other peer machines and generate consensus overthe mortgage contract and the blockchain itself in general; the cost of running

4

Page 6: Applied design of distributed ledgers for real estate and ...

such a machine is low: it can be done with a normal laptop or hiring a smallserver in a common PaaS provider (but, more in general, it depends as well onthe blockchain consensus mechanism in use).

What this thesis wants to achieve is to investigate the possibility of a decen-tralized architecture that enables new, and possibly better, financial products.

1.1 BackgroundMany real estate market and land registry services around the world are stillpaper based or supported by outdated IT systems.

The property in many countries is proven simply with a wet signature andcounterfeit contracts are more than common in India, as well as the falsificationof public records held by the governmental institutions. This pushed Indianauthorities in the region of Andhra Pradesh to explore the possibility of theblockchain 1.

Another hazard is in case of a coup d’etat or civil war that erase or losethe ownership records, there are some initiatives that tries to undertake suchproblem with blockchain (Conferences | Abt Associates 2018).

In such cases is difficult to claim the right over a property.In the western world this scenario is far from common. It is instead possible

to use the blockchain as a point of contact between different organizations andto streamline the processes that involve real estate properties as seen in Sweden(CoinTelegraph 2018) where, thanks to a blockchain based process, is possibleto transfer the property within hours (instead of months) and, at the same time,automating part of the process.

Last problem is the segmentation of assets, meaning the possibility to findinvestors only for a fraction of the project. For big projects this is achieved withjoint ventures or consortiums that invest altogether an high amount of moneyto fund an initiative.

While a borrower can only request a loan to the bank, there are plentyof investors (such as pension funds) who want to invest discrete quantities ofmoney in financial products that give them fix and stable returns for a longtime, typically years.

What usually happens is that a central authority (i.e. a bank) acts as ar-bitrator between borrowers and investors asking for higher interest rates to themortgagor and distributing lower returns to the investors.

This process if inefficient from the borrower and investor perspective andcan be optimized removing the bank from the process, guaranteeing higherconvenience to all the other actors of the deed.

It is possible to observe that some strategic areas are interested in a decen-tralized network, although a real complete system is not yet public utilized.

1.2 ProblemThe modality used by people to sell and buy properties, have not changedin the last years. We can affirm that while the indexing processes and theoperations carried out by the single company have been successfully digitalised,

1Tamper-proof degree certificates to be India government’s first blockchain project(https://factordaily.com/degree-certificates-india-blockchain-project

5

Page 7: Applied design of distributed ledgers for real estate and ...

the information and operations between companies (and governments) did notimproves in despite of the effort put.

Loans, transfers of properties and verifications of the correctness of the in-formation are processed in a modality that, in 2018, must still be carried outoffline: checking contracts and using wet signatures. Some companies might usetechnological support like FAX or emailing PDF files but these just mimic the(old) paper process.

With the new emerging technologies such us blockchain, we believe that thispart of the business might be revolutionized creating new opportunities and aneasier and faster workflow.

The last problem this thesis wants to address regards the segmentation of theproperties (assets): this is a hot topic that many companies tried to achieve butalways through internal processes and therefore without possibilities to expandand scale the market.

The principal problem of segmentation is the traceability of the owners, thepolish of each record and, most important, the certainty that the total amountof shares of the mortgage/loan has not been oversold.

As an example: a property of 10 000 000e is split in 10 segments (or parts)of 1 000 000e each.

The buyer must be therefore sure that there are only 10 segments availableand that a potential scammer is not not double selling (i.e. selling 11 segmentswhen only 10 are available).

Summing up these three problems, we can observe that the main issue ofthe Real Estate market is based on the absence of a shared protocol where thefirms can interface and collaborate.

In general the authors also observed that the Real Estate market is usuallyvery propositive and open to innovations but has always found problems inscaling due to the difficulty to communicate among different platforms (or toagree on one shared platform).

1.3 PurposeThe purpose of this thesis is to design an alternative solution to the currentlegacy real estate processes, which brings the current advantages of the central-ized solutions but that is willing to extend the decentralization in favour of theaforementioned benefits (no middle man, higher security, high availability).

To learn in deep knowledge about blockchain and how to apply it to the realestate market adopting adequate methodologies is also a precious purpose forthe writing of this thesis, possibly re-utilizing the learning outcomes receivedduring the master degree. To present and describe an holistic view over thecurrent state of IT applied to real estate environment oriented at the financialinvestment.

To provide an ethical point of view and hopefully introduce new productsoriented at the crowdfunding and micro-lending of properties.

1.4 GoalThe goal of this thesis is to investigate the real estate market, and design a newsolution able to undertake and solve the problems described in 1.2.

Key areas for improvements are:

6

Page 8: Applied design of distributed ledgers for real estate and ...

1. Inter-company communication: Communication among different ac-tors, beyond the single company boundaries such as private investors,banks, governmental entities and / or any other actor mentioned in astandard contracts.

2. Streamline the paperwork: Introduce a structured and well definedworkflow for the most common contracts; ideally embracing the majorityof the situations (multiple or single actors, refuse of the transaction, inter-ruption of the negotiations etc). Lowering the amount of paperwork alsothrough auto-complete and at-most-once (McKinley 2017) writes.

3. Central point of information: Creating a solution used by differentand distinct actors allows to gather the information into a single end-point: eliminating the segmentation of data, the difficulty of querying andthe need and complexity of MLS (multi listing services, meaning portalswhere to look up for properties). When having a single central point,usually some risks and costs arise such as the single point of failure, dataownership, storage, maintenance and server cost.

When about to design such architecture, the standard approach would sug-gest to create a centralized (and perhaps distributed) system owned and ruledby a single authority such as the Land Registry. Such architecture has been sofar the only solution, showing problems in the 1. data asymmetry (the spreadof information that each player of the system has access to: the owner of thesystem can consult the whole database, despite the clients), 2. reliability (thereis the need of trusting and consider authoritative one single source), 3. systemfault tolerant (a bug or down service of one single player would result in a stopfor all the systems that rely on the centralized solution), 4. transparency (thatcan decrease the time needed to fill and sign the contract back and forth and,in general, the service and user experience) and 5. nullify the risk of corruption(since each and every change must be approved by the network). As such, giventhe limitations of the current centralized systems, the research question thatthis thesis intends to answer is:

Can we design a Blockchain based solution for real-estatemanagement that outperforms centralized based approaches in termsof security, scalability, accountability, and access to information?

A blockchain based solution will be developed in this paper and then eval-uated in the evaluation section (6) on its performance, security, transparency,reliability and transparency, comparing it to a standard centralized solution indifferent scenarios (6.4).

1.4.1 Benefits, Ethics and Sustainability

With a particular focus on ethics and sustainability this thesis wants to achieve.

1. Crowdfunding: The possibility to fund and invest in projects of refur-bishing or building of properties, possibly selling the units in advance.

2. Micro-lending: Segmenting the mortgages on the properties in units, itis possible to create an interesting investment opportunity for the middle

7

Page 9: Applied design of distributed ledgers for real estate and ...

class with a low level of risk. At the same time is possible to borrow moneyfor a low crediting score mortgagor.

3. Simplify the mortgage registration: With the help of banks and gov-ernments is possible to digitally stipulate contracts, simplifying among theothers: tax payment for mortgages since the information can be publiclyavailable in one point of truth.

4. Lower the contentious: With a clear workflow is easier to respect dead-lines and avoid pro forma delays, therefore lowering the legal costs.

5. Paper saving: Small achievement, but worth to be mentioned is theamount of paper saved due to the shift to digital platform and consequentlylimitation of the deforestation risk.

1.5 DelimitationsThe solution that will be presented should be secure and at the same time shouldavoid the danger of data manipulation. Ideally it should not be centrally ownedbut rather run by a consortium of stakeholders.

The proposed solution must be cheaper and in any case not more expensivethan the current and standard workflow.

The system does not need to support frequent write operations but shouldbe fast in reading and potentially queryable.

This theis will not take into account any legal aspect and will try to keep asclosely as possible to the current legislation. This work is anyhow intended asa CS master thesis and not as a law text.

8

Page 10: Applied design of distributed ledgers for real estate and ...

2 Literature reviewIn order to expose the main characteristic of the blockchain technology, it mightbe required to take a step back and analyze the decentralized systems such aP2P, which are able to provide similar performance of a centrally controlledcluster, but in a not controlled and censorship resistant manner. Although P2Pnetworks are advanced systems, they still lack security and privacy wise, thatis the main reason why a blockchain system (which is P2P based) is needed inorder to secure information.

2.1 Peer To PeerPeer to peer (P2P) is an architecture of distributed machines that collaboratein a network where each end point is both client and server and they all havesame rights and duties.

P2P (Agre 2003) is usually utilized to share resources among each partici-pant without a centralized system or authority. It is based on self organizingalgorithms where each machine has the dual and symmetrical role of client -server; usually the topologies of this network is not known a priori. It is in factpossible to affirm that there is a P2P network over the internet network whichis called overlay network.

There are two classes of overlay network: structured and unstructured.

2.1.1 Structured network

Structured networks are usually tightly controlled by a central authority or,anyway, by a subset of super nodes with higher privileges (Agre 2003). Thecentral authority decides where to store the contents in a distributed fashionand takes in charge of the indexing of the fields and their location in a key-valuedata structure. In case there is no central authority, the peers implement adistributed hash table (DHT).

When a new content needs to be stored it is first hashed and then assigned toone or more nodes where it will be stored. Essentially each peer has a RoutingTable (RT) with the address of the peers. Based on the level of replication (r)it is divided into bands (b) of length (r). Given n peers we define the numberof bands as:

n = b ⇤ r

s.t. hash(content) % b = peerip

Where the hash function can be extended to any cryptographic hash function(Preneel 1994) in order to split similar files that would be sized in the samebucket. The DHT approach guarantees a lookup of Olog(n) and can be seen asan optimal solution if not considered unsafe (replay attack, local file corruption,etc). There are several security breaches in the DHT mainly in a P2P networkof non-stakeholders nodes.

As an example: the node which host a certain content might return a cor-rupted file or information. In this situation, even with a distributed contentDHT would be difficult, if not impossible, to trace back the correct information;

9

Page 11: Applied design of distributed ledgers for real estate and ...

although the same file delivered by a consistent majority might be consideredsatisfying.

An higher level of security might be implemented such as hashing the file andstoring it locally, create a versioning system to detect out of date informationand files or implementing public - private key system. All this improvementscannot guarantee appreciable results.

For further security consideration is suggested to check the literature (Sitand Morris 2002).

2.1.2 Unstructured Network

Unstructured P2P networks are loosely ruled networks where basically any nodecan join, ideally without restriction (Agre 2003), it has stronger censorshipresistence and does not need the a central authority. Nevertheless the absenceof a central authority makes the network hardly scalable since it is difficult andtime consuming to reach all the nodes (e.g. for look up operations): typicallywith a flooding algorithm.

Some solutions have been suggested, among them, worth to be mention isthe OpenDHT (Rhea et al. 2005): a DHT hosted by some nodes which decide topublish their knowledge in a public repository, using the so called web of trust(PGP: Explanation of the web of trust of PGP 2018). Although not solving theproblem of the central authorities but simply shifting the authority from theowner of the system to some more reputable source which might be in samemodalities an attacker or malicious.

2.1.3 Example of P2P applications

Well known P2P applications are:

1. Napster(Harris 2018): P2P file sharing characterized by a structurednetwork and coordinated by a central search facility, and therefore a singlepoint of failure.

2. Gnutella(Mitchell 2018): born with the same purposes of Napster as afile sharing platform. It is the first example of P2P overlay unstructurednetwork.

2.2 The need for decentralizationAlthough at the end of the 20th century the need of decentralization was real, asconfirm the many alternatives of Napster and Gnutella (BitTorrent (BitTorrentProtocol 2018), eDonkey (eDonkey Protocol 2018) and Gnutella2 (Gnutella22018), just to name a few).

News often pointed at the P2P network as something illegal, blurred or to beobscured. There have been cases of websites shut down due to their behaviouras a repository bucket for P2P contents (Napster (News 2006) and Piratebayobfuscated in the Netherlands (Pirate Bay access blocked by Dutch telecomsafter court ruling 2017), only as western-world examples). P2P contents arefully shareable and difficult for governments and privates to censor, manipulate,regulate and perform any other exercise aimed to centralise the authority (Agre2003).

10

Page 12: Applied design of distributed ledgers for real estate and ...

P2P seems, in fact, to be an out-of-control tool where anything can happen:it can host illegal as well as government censored documents. Information thatgovernments and centralized authorities want to keep secrets for one reason oranother. Rather it is correct or not the application of P2P networks allows tofight and foam the stream of the knowledge either good or bad.

2.2.1 The 3 challenges of P2P

The development of the P2P protocols went straight over the years, trying tosolve the 3 main problems: scalability, synchronicity and security.

• Scalability: Mainly in unstructured network is difficult to scale, somenodes could be switched off, some other might arbitrary delete files orundertake malicious behaviours. To fix this problem is possible to create aledger which tries to maintain the current status of the system. Designingan algortihm to handle the status of the system leads to another problem:synchronicity.

• Synchronicity: Maintaining a consistent state among different peers iscomplicated. The main P2P networks such as OpenDHT uses a particularrouting table construction (Rhea et al. 2005) but it all comes down to thecomplexity of at least On such is round robin or flood algorithms, withsome possible optimization. Avoiding classic gossip algorithms throughtimestamp does not entirely solve the problems because the clocks areextremely hard to synchronize, not counting that malicious nodes couldeasily fake the time. The implementation of timestamp can also lead toreconciliation problems in case of divergence (fork), forcing, in the worstcase, to end up with a classic gossip algorithm in order to ensure a syn-chronised solutions such as (Lamport et al. 2001).

• Security: One solution to increase scalability is lowering the level ofsecurity, creating the opportunity for double spending or replay attacks.Since P2P networks use to host sensitive contents, security has alwaysbeen strongly taken into account: creating slow but reliable decentralizednetworks. In case of fork, thus, it will be difficult to determine the correctbranch and without further implementations, it would be easy to create ahigh number of nodes (50% of the network peers) and arbitrary proposenew values (rewrite attack). Such attack is extremely easy because peerscould just be virtual machines.

It is easy to fall into game theory and even easier to find in this triad (scala-bility, synchronicity and security) analogies with the well known CAP theorem(which will be analyzed in 2.3.1).

2.3 Real Time ApplicationsThe P2P networks faced problem in scalability (Leao, Menasche, Towsley, et al.2014) and intrisical synchronicity is a notorious and well known design problem.It can therefore been improved according to the CAP Theorem.

11

Page 13: Applied design of distributed ledgers for real estate and ...

2.3.1 CAP Problem

The CAP theorem asserts that any network which shares data can have at most2 of the following characteristics: 1. Consistency (C) 2. High Availability (A)3. Tolerance to partitioning (P). With the due optimization is possible to findacceptable compromises of the 3 but always with some sort of trade of.

CA Having a consistent system can be the number one priority. In case ofa centralized system, where no partitioning takes place, is not too difficult todesign. One server always running can update its information in one uniqueACID operation on the database.

In case of partitioning, a conciliation strategy can be intended as temporarysuspension of the availability of all the n partitions (at least for sensitive oper-ations) or as at least momentary inconsistency of the m sources of information.

AP Having a system which is always available and partitioned leads to incon-sistency of the data. As an example, one number can be written in the system.User A writes the number 1 on partition 1, nearly at the same time, User Bwrites number 2 on partition 2. At this moment the two partitions are notconsistent. To solve this problem, availability of the write operation must besuspended when one of the two partitions receives the write request (perhapsacquiring a lock). In real application availability can be often be confused withlatency, for further information is possible to refer to (Brewer 2012).

CP Having a consistent and partitioned system implies to sacrifice the avail-ability of it. When one partition wants to perform a write operation, it mustnotify the other peers and wait for the authorization to commit the change inorder to preserve the consistency. The system will then be momentarily un-available.

As highlighted in (Brewer 2012), forcing to select two properties out of threeis misleading. Is in fact possible to create granularity among partitions orslightly decrease (or optimize) the availability time or sacrifice a bit of con-sistency in order to guarantee high performances.

In the next section will be presented the blockchain technology, not as a so-lution to the CAP theorem since it would hinder the definition of theorem itself,but rather as an optimization of the three factors: consistency, high availabilityand tolerance to partitioning.

2.4 BlockchainIn 2008 a paper signed by Satoshi Nakamoto (Nakamoto 2008) flipped the tableproposing new ideas. The paper undertakes the time uniformity, synchroniza-tion, scalability and security problems in a different fashion which, at the timeof writing is getting a vaste consensus.

Although the paper proposes a new electronic cash system, the real innova-tion in it is the blockchain concept, which is a method to gather transactionsinto blocks that are easy to sort.

12

Page 14: Applied design of distributed ledgers for real estate and ...

2.4.1 Bitcoin

Bitcoin cash system has been designed addressing 3 main problems:

• No central authority: As the P2P network, Bitcoin must function with-out any central authority ruling it. If there are no inspectors, than nobodyis allowed to change the data and balances at will. The authority is there-fore given to the algorithm itself and to/by the amount of people who runa node in such configuration.

• No mediation cost: the mediation cost shouldn’t be high. Each trans-action should be cheaper in compare with the central authority that canset an arbitrary price. In a P2P fashion, the node willing to mine at thelower price wins. Although in the recent period this goal seemed to bevanished (Resende 2017).

• No possibility for casual transactions: transactions should maintain alogical order and each transaction processed by the peer should be reliable.

In fact, as of the time of writing the paper a system that was able to processpayments over a communication channel without a trusted party did not exist.

On one hand the legacy programs such a ATM (Magee et al. 2004), wereable to provide near instantaneous transactions but with the help of a centralauthority. On the other hand online payment systems and digital currenciesdeveloped: debit cards, credit cards, Mondex (How smart was that? SwindonAdvertiser 2018) (in Spanish), Mobipay (Bancos y operadores crean Mobipay,plataforma de pago por movil 2001), Apple Pay (Apple Pay 2018), Google Pay(Google Pay - A better way to pay 2018) and, Swish (Brunet 2017) just to namea few, couldn’t be synchronized and consistent in a distributed manner.

The solution must ensure:

• Secure transaction: The transaction should be computationally imprac-tical to reverse. Once the sender of a certain amount of money broadcastsher transaction, other users or malicious actor must not be able to changeit.

• Safety from frauds: frauds should be prevented. In particular the doublespending attack (Ferguson 1993) which is a common flaw among cryptocurrencies and digital cash systems which consists in spending the sameasset more than once duplicating or deviating its original course.

• Distributed and synchronized: The timestamp is decided by the peerservers and is used in order to both validate the transaction and to generatethe computational proof.

Transactions The owner of some tokens digitally signs a transaction whereshe specify the next owner public key and the hash of the previous transaction.The signature allows to certify that the owner (or whoever is in control of theowner’s private key) of the token is actually performing the transaction, the nextowner’s public key allows the system to transfer the tokens while the hash of theprevious transaction is useful to retrieve the history of the tokens themselves:thus it assure that the tokens are not created out of nothing.

13

Page 15: Applied design of distributed ledgers for real estate and ...

It might be that several transactions refer to the same previous transaction.In this situation, the first transaction mined - which means the first transactionable to unlock the unspent amount - gets the money and is recognized as validby the P2P system which implies to receive the proof of acknowledgement bythe majority of nodes. This workflow is implemented through the block chainmechanism.

Timestamp Timestamp is used as a variable in order to create different blockhashes. The timestamp assures that the block has been mined in that time as itis validated by other servers, servers accept the timestamp only if it is includedbetween to the median of the timestamp of the last 11 blocks +2 hours (Blocktimestamp - Bitcoin Wiki 2018) and the last block timestamp + 1 millisecond.

Hashing a timestamp also means to reinforce the previous timestamp, rein-forcing the older transactions.

Proof of work Proof of work is a mechanism that tries to guarantee theone CPU one vote ideology. The proof of work consists in hashing a block oftransactions seeking for a small value. Since the hash is nothing but a numberthat cannot be known a priori, it is randomly possible that this number is lowerthan a certain value. The hash can be generated using SHA-256. Since thenumber is computed in binary form, targeting a lower number is nothing butthe leading zeros in the binary number representation into the memory. Sincethe possibility of finding a hash with many leading zeros increase as the leadingzeros increases, this property is used in order to increase the difficulty, andtherefore the time, needed to mine one block. This idea has one very interestingand game changing application:

Since finding a solution to the block in a fixed time is a matter of chances,in case one malicious user wants to change one of the transactions mined by oneblock, she needs to find another solution (time consuming) in order to mine asecond time the block. Of course one user (or a subset of users) will need moretime to find the solution, at least guaranteeing that the number of user do nothave the majority of the computational power! Even once the solution to minethe block had been found, the blockchain (that mine blocks at a fixed time) willhave progressed with an higher number of block. Since each block contains atits inside the hash of the previous block, it means that the block created by themalicious user is not recorded into the chain of blocks itself. The only way forthe attacker to convince the others to use her chain is to start mining anotherblock until she has a longer chain than the one on the network.

This possibility is very unlikely and the chances of success of such attackdecrease as the time passes because it requires more and more computationalpower. A very interesting attack that can take place with less then the 50% ofthe computational power (ideally down to the 25% of the network) is describedhere (Eyal and Sirer 2014).

Network The P2P network is the core that allows Bitcoin to survive and tospread itself. When a new transaction is created, this is broadcast across all thenodes that might want to start mining a block with this particular transactionin it.

14

Page 16: Applied design of distributed ledgers for real estate and ...

The signers of the transaction might prefer to have their own transactionmined as fast as possible and therefore create incentives for the miners thatwill mine their transaction: this incentive is called mining fee. When a nodereceives a transaction, it puts the transaction into the block (where there areother transactions) and start mining it: meaning trying to find a hash with alow number of leading zeros. The first node that finds the solution broadcastsit to all the network. The nodes that receives the solution to one block shouldaccept it only if the transactions contained in the block are genuine and correct(no double spent and there is sufficient balance) and then start mining a newblock with the hash of the latest block accepted, creating the chain of blocks.The nodes have interests in accepting the block because is the longest chain theone that wins. Mining from a fresh block, thus, does not inficiate the complexityor difficulty of the block resolution.

In case of one node receives a block which point to a previous block whichunknown by the node, it can simply broadcast a request for the missing blockor blocks until it has the full blockchain.

Incentive The first transaction of the Bitcoin is particular. it allocates tokenswithout any premises to the creator of the block. In order to have their owntransaction mined (or mined faster) the signers might leave an amount of tokensunspent and without receiver.

The miner can assign the unassigned tokens to herself plus, at every newblock, a certain amount of tokens can be created until the limit of 21 Million ofBitcoin is created (What Happens to Bitcoin After All 21 Million are Mined? |Investopedia 2018).

In the situation an attacker has the majority of the computation power shecan decide either to use it in order to compromise the network or either to mineand get the rewards reserved to the nodes which find the block solution.

With this system is possible to use the selfish behaviour of the users andconvey it to the good of the community.

Disk space Storing the blocks and the transactions takes a linear amount ofmemory that, in the long term, can become difficult to handle and expensiveto maintain. In order to save main memory space, all the transactions arecondensed in a Merkle-tree (Merkle 1987). Merkle tree consists in putting inthe leafs of the tree all the transactions and hash them in pair. This procedureis done recursively until there is only one unique hash the network has to agreeon. With the Merkle tree is possible to verify the correctness of one transaction,therefore ceasing the possibility to submit a non existent transaction. Thus itallows to verify the existance of one transaction in logarithmic time and space(Szydlo 2004).

2.5 Note to the readerThere are different type of blockchains: public and permissioned. While thefirst one are usually open to anyone, everybody has the same role and thetransactions are processed with a fee, the premissioned blockchains are usuallyrole based and only some people have access to it. This is an example for aconsortium that wants some participants to have access to it, but not allow anyinformation out to the external world.

15

Page 17: Applied design of distributed ledgers for real estate and ...

In this thesis, when not specified differently, permissioned blockchain will beintended when referring to blockchain.

2.6 Assets on the BlockchainOne of the biggest problems that characterized the gap between real and digitalworld was the possibility to duplicate files (content, or objects) at will. Thearising 3D printers are one example of such a gap.

With blockchain, instead, is possible to define rules that are difficult, if notimpossible, to change: allowing a determined number of object to be createdand not only fixing that limit, but even controlling it. Bitcoin is one exampleof it. There is a known quantity that increases under certain rules defined bythe algorithm itself. The value of the coin is also given by the acceptance of thepeople towards those rules.

2.6.1 Property management

In a blockchain environment, the property over an asset is expressed via thepublic / private key possession. Each asset is signed and has a public keyassociated with it. This means that everybody can see its content but only theuser whose is able to unlock it with her private key can claim the ownership.

This plus the distributed and tamper proof characteristics of the blockchaincreates a game changer scenario since the storage becomes bulletproof secure.

2.7 Property ManagementReal estate agencies are, among the market, one of the eager innovators. InEurope, the market is considered to be worth e86.8 billion only in the Q4 2016:for a total of e251.1 billion in the whole 2016 (Deloitte 2018[b]).

It is also a dynamic market whose is searching for new opportunities andideas in IT field. Among the others:

Public sales data Creating a unified and friendly endpoint where to buy andsell houses and properties. These centralized applications can also function as aplatform where rent out properties or calculate / sell mortgages (as an example(Inc 2018)).

Integration with VR/AR It is possible to digitalize properties and uploadthe pictures or 3D spaces online so that interested clients can have the look andfeel of the properties they are interested in without visiting them.

It is possible to use satellite technologies to show property boundaries, ex-terior and interior infrastructure, as well as with google indoor maps (About -Google Maps 2018) (Views For Business - Google Maps | Business View - Home2018).

In addition is possible to render spaces with Virtual Reality (VR) or Aug-mented Reality (AR) (BBVA 2017).

16

Page 18: Applied design of distributed ledgers for real estate and ...

Improved automated validation Software able to estimate the correct priceof the property given detailed information such as location, dimension, age andcondition of real estate.

Zestimate claims it can estimate the value of a real estate within the 7% for50% of the inquires made (Zillow n.d.).

IoT to show properties Thanks to IoT is possible to open locks and showproperties from remote. This feature is particularly handy for remote places orto create a rent estate platform.

Online conveyance Buy and sell properties online gives the opportunity tospeed up the conveyance process. It also allows to buy and sell when the two(or more) contractors are far away from each others: creating the opportunityfor a property brokerage and arbitrage.

Example of fast conveyance are the private easyConveyance (easyConveyance2018) or the governmental controller Swedish Land Registry (CoinTelegraph2018)

2.7.1 Property Management on the blockchain

According to Deloitte (Deloitte 2018[a]), 10% of the global GDP will be storedin the blockchain by 2025.

The main reasons why the companies are interested in blockchain technolo-gies are:

• Nearly real time operations: Transactions can be pushed to the Bit-coin blockchain in fairly fast time: usually within 10 minutes. A recordcan be considered acknowledged by the network after 1 hour (Why 6 con-firmations? 2018). The contracts can therefore be signed online and thedeal starts in hours and not days.

• Trustless environment: Since its decentralized nature, is possible torun the nodes and transfer assets without a central authority, thence com-panies do not have to rely on banks and other, potentially, corrupted ormalicious entities.

• Distributed ledger: The grainy structure of the network, in combina-tion with the fact that the whole blockchain is store by every and eachnode, makes possible to have history and proof of all the transactions everhappened.

• Irreversibility: The only way to delete or change a transaction is witha higher computational power than the network (and a sufficient amountof time).

• Censorship resistant: Thanks to the Irreversibility and Trustless envi-ronment properties, it is obvious to assume that there is no way to censorany record stored in the blockchain if not the majority of the networkagrees on that.

17

Page 19: Applied design of distributed ledgers for real estate and ...

3 Theoretical BackgroundThe design of a platform of buy and sell properties might seem trivial, the mainproblem resides in the standards that must be accepted by all the actors, peoplemight think.

It is actually far more complex. First of all is difficult to accept a standardwhen there are so many entities in conflict. Some agencies prefer XML, someothers JSON or SOAP.

Having solved these political problems, the main issue is now: who owns thedata?

In a classic client server system, there must be one company that holds thedata and is in charge of keeping the software up and running: one server ondemand is not enough, somebody has to administrate it and this is often doneby third party expensive firms such as IBM.

Another problem is the quantity of queries that can be performed: if onefirm is running data intensive queries while the others are making few queriesper day, why should all pay the same fee?

Of course there are several fixes to such an other situations but it might bepreferable to merge the natural benefits of the blockchain and create a decen-tralized system where companies can have a clear and optimized APIs and, atthe same time, assuring an higher degree of security.

More in general if signature features and causal order and fast transactionrendering is required, the most efficient solution is blockchain.

3.1 PostchainPostchain is a blockchain based on a SQL server. What it does is creatingfunctions in a sort of contract (that is technically called module). Functionscan be of two types:

• Operations: Operations are recorded into a block. One operation is defacto a transaction that changes the state of the system: that is the reasonwhy it needs to be recorded and ordered into a block. When one clientcreates a transaction she can call one or more operations. The P2P server(blockchain) will execute those operations in order: changing the state ofthe blockchain in a deterministic way. For rigour, one transaction can hostmultiple operations, that will appear as if happened simultaneously.

• Queries: Queries are calls to the blockchain node and not to the blockchaindirectly. Since the node is basically a REST (REST - Semantic Web Stan-dards 2018) server that process the logic and writes / reads the updatesinto an SQL database, it is possible to query information without writ-ing into the blocks but simply querying the database as a normal RESTserver.

Postchain is a private blockchain, which means that only the nodes who areentitled to enter the network and are accepted can participate into the consensusalgorithm (which is a variation of the PBFT algorithm).

18

Page 20: Applied design of distributed ledgers for real estate and ...

3.2 Flexible tokensFlexible token is a module built on top of Postchain and it can be easily importedinto other modules in order to transfer any kind of asset with ease.

The module allows to transfer tokens of different assets in an atomic andsecure way.

It is used in this project thanks to the abstraction that every property is anasset and every shares of the property is one unit of such asset (ChromaWay2018).

3.3 PostgreSQLPostchain can ideally be plugged into any database (even noSQL) thanks toits modularity. The most common database management system used so farin combination with Postchain is PostgreSQL (PostgreSQL: The world’s mostadvanced open source database 2018).

SQL languages are preferred because they allow custom and complex queriesto be created by developers with no specific blockchain knowledge. It is in factestimate to be more than 3mln of SQL developers while only 2000 distributedledgers experts (MIT Venture Capital & Innovation 2018).

The reason why this project will use PostgreSQL is because it provides betterdata integrity, allows to create customs and complex stored procedures (whichare at the core of Postchain) and is particularly well suited for complex databasedesign (SQLite vs MySQL vs PostgreSQL 2018).

3.4 KotlinPostchain is based on Kotlin (Kotlin Programming Language 2018): a Javabased framework which can compile in several languages, among them: Javaand nodeJs.

This is particularly handful to create diversity and granularity among thenodes. It is in fact known that different nodes should implements a variety ofalgorithm, software, languages and operating systems in order to avoid attacks(Buntinx 2015).

Modules can be implemented in any language supported by Kotlin, in thisproject the standard Kotlin will be used.

Kotlin is also statically typed, this facilitates the reading of the code andavoids errors and at the same time keeps the code concise. Kotlin is as wella safe language and avoids common compilations errors by nature such as nullpointer exceptions thanks to specific wrappers (Null Safety - Kotlin Program-ming Language 2018). Kotlin has been developed in collaboration with JetBrain(What is Kotlin? The Java alternative explained | InfoWorld 2018) team andtherefore it is provided with useful tools and a well integrated IDE which isIntelliJ IDEA.

19

Page 21: Applied design of distributed ledgers for real estate and ...

4 Methods & Analysis

4.1 Design a way to replicate itMany Land Registry around the world are paper based. The properties aretransferred only via wet signatures and streamline the process is more that anoptimisation.

In these situations difficulties can arise in recognizing the real source of truthin case of discordant data or it easy to manipulate or counterfeit the informa-tion (Tamper-proof degree certificates to be India government’s first blockchainproject 2018) (Sinha 2018).

Especially in non western world countries can be difficult to sell proper-ties simply because is not possible, or difficult, to express the property over aparticular land or building.

In some more developed countries the cadastre is digitalised and adminis-trated by governmental officers that are entitled to process transactions.

These platforms are closed and normal citizens are prevented from checkingor changing information in those databases even if the operation they want toaccomplish is legally correct: by intent and pro forma.

Even though the latter approach avoids debates among parties, it is knownto be slow: with transactions that can last up to months.

In a blockchain environment, such operations can be performed within hours:respecting the security and legal bounds that are required in order to preventany kind of fraud.

Switching to a platform blockchain based implies to design a smart contract(comments 2018), a digital and automatic algorithm on the blockchain, thatstrictly follows the delicate procedures of a property conveyance and, even moreimportant requires governments to accept and recognise the blockchain as asource of truth.

Any operation performed by real estate companies, private users or govern-mental officers must be done on the platform and in case of inconsistencies thedigital record will be used as correct. It is in fact not possible to arbitrarilychange one record (if not specifically allowed by the smart contract) thus, thechange is a transaction, therefore will be recorded into one block and all theusers can see the manipulation.

4.2 Current TechnologiesThe intent of this project is to write a contract that can integrate the interestsof the real estate companies, that at the same, time can both satisfies thegovernmental requirements in matter of security and increase the level of theservice provided to the citizens.

In such a described context, blockchain seems to be an optimal solution.Postchain has been preferred because of its integration with standard SQLdatabase system which encourages to run complex queries without the needof over specialized blockchain engineers and because of its flexibility and in-expensiveness of use (since it is private, transactions can be uploaded to thenetwork at no cost).

20

Page 22: Applied design of distributed ledgers for real estate and ...

4.3 Implementation phaseThe requirements of the system:

Roles:

• Governmental Officer: Some governmental employee that needs to ver-ify the correctness of the property and certify the data contained in theregistration transaction. In particular, she has to be able to check if thedata correspond to the one recorded in the current land registry.

• Lawyer: The lawyer is in charge to register new properties on the blockchain,she is responsible for the data written on the the system at the momentof the creation of new properties

• Owner: The owner of the property has to validate the data that regardsthe property and that have been validated by the governmental officer. Shecan fractionalize a mortgage and sell it in case she needs funds. Investorscan buy such shares.

• Investor: Investors can buy shares. Each share promises a periodicallypercentage on the investment until discharge of the loan. Investors, afterhaving bought a share, can resell it at arbitrary price.

Operations:

• Property registration: Lawyer, on premise of the owner of the propertyand the governmental officer, registers the property on the blockchain.

• Property validation (owner): The owner of the property explicitly ac-cepts the ownership of the property on the blockchain. From this momenthe is the master of the property’s operations.

• Create shares: The owner of one property can create an arbitraryamount of shares that bake the property itself (maximum number of sharesmust be equals to property’s value). She can set an interest on the sharesthat will be paid at a predefined and customizable period.

• Sell shares: The owner of the shares (created by the owner or previouslybought by an investor) can sell to the investors on the market.

• Buy shares: Investors can buy shares, expecting a return defined by theinterest set by the seller.

Escrow Payment: All the payment on the blockchain must be verified. Sincethere is no crypto currency involved in this project, the procedure is the follow-ing.

The seller puts the shares on the market, and expresses the intention ofreceiving money in front guaranteeing with her property.

The investor accepts to buy the shares and to get back her money, in orderto accept this risk, an interest is paid back monthly. In order to express herwill, the investor reserves a certain amount of shares that are on sale.

21

Page 23: Applied design of distributed ledgers for real estate and ...

At this point the seller contacts the buyer asking for the payment of theshares. The payment of the shares takes place off chain and therefore cannotbe recorded. A recommendable procedure is via bank transfer.

When the payment takes place, the seller acknowledge the receipt of themoney and transfer the shares to the investor that can potentially sell themagain to other investors.

This is the most sensible part of the process since many of its steps happenoff chain. A bank transfer facilitates in case of disputes because is traceable, isrecognised as a muniment and it has an evidential matter in front of the court.

The blockchain can certify and record all the steps of the process in anordered and time specific timeline and can be used as muniments itself in aprocess.

In a developed country this process must be preferred over a crypto currencytransaction where the value of the currency exchange can be highly volatile andtherefore increasing out of proportion the risk for the investors.

22

Page 24: Applied design of distributed ledgers for real estate and ...

5 ImplementationPostchain smart contracts are coded directly into the blockchain itself. Whathappens is that a module is created and added to the nodes that participate inthe network.

In this implementation the design requires two modules: 1. Flexible token(FT) (ChromaWay 2018) 2. shares (implemented).

5.1 Basic workflow• Claim property on one asset.

• The blockchain (the system) acknowledges and accepts it.

• Once the owner has the right on the property on the blockchain, she cansell it (or fractionalise the property and sell the fractions - units).

• Users can offer to buy some of the units.

• The payment can be processed both offline or on the Blockchain.

• if carried out on the blockchain the transfer of the units happens immedi-ately and automatically.

• otherwise, the seller accepts the payment from the buyer and transfers theasset (units).

• the buyer has now the ownership on the units and can resell them.

5.2 User creation5.2.1 Contract Registration

The lawyer is the entity designed to upload someone’s property on the blockchain.The owner of the property must prove the ownership of the property itself viaany kind of documentation. Once the documentation is revised and approved,through the governmental officer, the lawyer can fill the information that iden-tifies the asset along with the owner’s public key.

One important step of such operation is to verify that the owner possessesthe keypair, as an alternative is possible to generate the keypair at the momentof the contract registration in case the owner does not have one yet.

Starting from this transaction, the owner can be considered liable for theproperty, even though she cannot operate any transaction yet (she needs toprove to have the control over the public key), but the land registry can use thisinformation for tax purposes and title search.

5.2.2 Contract validation

The owner of the property with her keypair can send one transaction where shevalidates the property details on the blockchain. From that moment she can sellor create shares placing the property as an asset (securing the mortgage withthe property).

23

Page 25: Applied design of distributed ledgers for real estate and ...

Figure 1: Blockchain operations’ workflow diagram

24

Page 26: Applied design of distributed ledgers for real estate and ...

5.2.3 Property segmentation

The owner, from the moment she is looking for funds, can divide her propertyvalue into shares and put them on sale at a given price and with some interestattached.

For the investors that will decide to buy such shares, they can expect arepayment with given interest on a regular base (which by default can be set tomonthly, fortnight, yearly). If the payment does not take place in the time framespecified in the contract, the investors can suit the owner and prove throughthe blockchain that they didn’t receive the payment if so, the property can beseized.

Algorithm 1: createSharesData: txId*, ownerPubKey*, contractId, interestRate, unitsResult: sharesExistingbegin

if !isInvestor(ownerPubKey) or!isAllowedToSell(ownerPubKey, contractId) or units 0 then

exit1 contract � getContract(contractId);2 sharesCreated � amountOfShares(contractId);

if !sharesCreated thensharesCreated � 0;

if sharesCreated+ units > contract.value) thenexit

3 assetId � registerAsset(contractId, interestRate) ;ftUpdate(txId, ownerPubKey, assetId, units);return sharesCreated + units

Algorithm The createShares function (Algorithm 1) receives as parametersthe txId (derived by the blockchain core), the ownerPubKey (derived from thetransaction signature), the contractId, interestRate and units specified withinthe transaction.

The contractId is the unique identifier of one property, the interestRate isthe interest paid for the lend and units is the amount of shares that is going tobe created.

The algorithm first checks if the signer is an investor, if the signer is theowner of the property and is authorized to sell, and a generic check to ensurethat the number of shares is positive.

Then it infers the contract information from the contractId (1) and checkshow many shares have been created with any interest rate (keeping in mind thatthe number of mnotes cannot be higher than the value of the contract) (2).

After having checked that there are enough shares available, it calls the reg-isterAsset function which returns the assetId (an unique identifier for contractIdand interestRate).

The shares total is then updated through the creation of new tokens and theflexible token module.

25

Page 27: Applied design of distributed ledgers for real estate and ...

5.3 Burn sharesThe owner, and only the owner, of one contract can burn (destroy) shares, thisoperation can be done in case shares offered on the market are not bought byinterested users or in case the owner is able to buy-in the shares: which de factocorresponds to the discharge of the loan.

Algorithm 2: burnSharesData: txId, ownerPubKey*, contractId, interestRate, unitsResult: sharesOwnedBySignerbegin

if !isInvestor(ownerPubKey) or !isAllowedToSell(ownerPubKey)or units 0 then

exit1 assetId � convertAsset(contractId, interestRate) ;

if !assetId thenexit

2 sharesOwned � amountOfShares(ownerPubKey, assetId);3 sharesOnSale � sharesOnSale(ownerPubKey, assetId);4 sharesReserved � sharesSuspended(ownerPubKey, assetId);5 if sharesOwned� sharesOnSale� sharesReserved < units then

exitftUpdate(txId, ownerPubKey, assetId, units ⇤ �1);return sharesOwned� units

Algorithm The burnShares function (Algorithm 2): if the signer is an in-vestor, is allowed to sell, the units are greater than 0 and if the assetId exists.

Then the algorithm verifies if there are enought shares available to be burnt.In order to burn a share it must be owned by the owner of the contract and noron sale nor reserved (Annotation5).

(Annotation 1) convertAsset converts contractId and interestRate to assetId.(Annotation 2) amountOfShares returns the total amount of shares owned bythe given public key. (Annotation 3) sharesOnSale returns the number of shareson sale by the given public key. (Annotation 4) sharesSuspended shares ownedby the given public key of a certain asset that have been reserved by one ormultiple investors.

5.3.1 Sell shares

Once the shares have been created, they can be put on the market and sold.At this stage the blockchain needs to make computation: while in the previoussteps it was just about signing transactions and slightly changing the state ofthe blockchain, now proper checks must be made (Algorithm 3 ).

Shares can be offered on sale several times (or even removed from sale) aslong as there are enough shares available for the operation and they are notexpired.

Algorithm The offerShares function (Algorithm 3) performs some checks:isInvestor, isAllowedToSell, the unitPrice is positive, the units to be put on sale

26

Page 28: Applied design of distributed ledgers for real estate and ...

Algorithm 3: offerSharesData: sellerPubKey*, contractId, interestRate, unitPrice, unitsResult: signerSharesOnSalebegin

assetId � convertAsset(contractId, interestRate) ;if !isInvestor(sellerPubKey) or !isAllowedToSell(sellerPubKey)or unitPrice 0 or units 0 or !assetId then exit;sharesOwned � amountOfShares(sellerPubKey, assetId);sharesOnSale � sharesOnSale(sellerPubKey, assetId);sharesReserved � sharesSuspended(sellerPubKey, assetId);if sharesOwner � sharesOnSale� sharesReserved < units thenexit;

1 sharesOnSaleAtPrice �sharesOnSaleAtPrice(sellerPubKey, assetId, unitPrice);

if !sharesOnSaleAtPrice thensharesOnSaleAtPrice � 0;

1 insertOrUpdateOffer(sellerPubKey, assetId, unitPrice,

sharesOnSaleAtPrice+ units);return sharesOnSaleAtPrice + units

are positive and the assetId exits.The algorithm then verifies that there are enough shares available to be put

on sale and then retrieves the number of existing shares on sale at given price,assetId and public key. If the record does not exist it returns nil and thereforeit must be set to 0.

The insertOrUpdate function updates the record of items on sale with thenew amount.

5.3.2 Remove shares on sale

Whenever the seller wants to withdraw some shares for any reason (e.g. shedoesn’t need the loan anymore, no one is interested in buying, etc) can simplyremove the shares from the listing.

Algorthm The removeOfferedShares function (Algorithm 4) performs the fol-lowing checks: the seller is an investor, can sell shares, the units to be removedand if the assetId exists.

Then the total of shares on sale at the give price is retrieved and, if theamount of units to remove is lower or equal the number of shares on sale, ispossible to either remove the record of shares on sale or either to update therecord with the new number of shares on sale.

5.3.3 Reserve shares

Investors can access the marketplace which is hosted within the blockchain, andreserve shares at will. They express their will to buy shares signing a transaction

27

Page 29: Applied design of distributed ledgers for real estate and ...

Algorithm 4: removeOfferedSharesData: sellerPubKey*, contractId, interestRate, unitPrice, unitsResult: signerSharesOnSalebegin

assetId � convertAsset(contractId, interestRate) ;if !isInvestor(sellerPubKey) or !isAllowedToSell(sellerPubKey)or units 0 or !assetId then exit;/* Get the shares offered at unitPrice */

sharesOnSaleAtPrice �getSharesOnSaleAtPrice(sellerPubKey, assetId, unitPrice);if !sharesOnSaleAtPrice or units > sharesOnSaleAtPrice then

exitelse if units = sharesOnSaleAtPrice then

/* No sahres on sale at price, is possible to remove

the whole record */

deleteOffer(sellerPubKey, assetId, unitPrice);else

/* update the new amount on sale */

insertOrUpdateOffer(sellerPubKey, assetId, unitPrice,

sharesOnSaleAtPrice� units);endreturn sharesOnSaleAtPrice - units

that automatically reserve the desired amount from the market and notifies toowner.

Through an escrow payment procedure (described in 4.3) is possible to settledown the deal.

Algorithm The reserveShares function (Algorithm 5) allows inverstors to re-serve shares that are offered on the market.

In order to perform such an operation, is needed to check that the buyer isan authorized investor, the unitPrice and units are positive and that the assetIdexists.

Then the amount of shares on sale at the requested price is retrieved and,if the units requested by the investor are lower or equal the shares on sale, ispossible to reserve the shares.

The reservation is performed adding one record into a table. Each reservationis one row, while the other entities were deleted when not needed anymore, thereservation must be persistent and possible to track in case of disputes on court.

(Annotation 1) the creationTime is derived by the time the block has beenmined, which is defined by the consensus of the nodes.

5.3.4 Manage reservation

When an investor makes a reservation, the owner of the shares gets notified.Now the two parties can settle down the payment off chain.

28

Page 30: Applied design of distributed ledgers for real estate and ...

Algorithm 5: reserveSharesData: buyerPubKey*, sellerPubKey, contractId, interestRate, unitPrice,

units, creationTime*Result: sharesOnSalebegin

assetId � convertAsset(contractId, interestRate) ;if !isInvestor(buyerPubKey) or unitPrice 0 orunits 0 or!assetId then exit;/* Get the shares listed at unitPrice */

sharesOnSaleAtPrice �getSharesOnSaleAtPrice(sellerPubKey, assetId, unitPrice);if sharesOnSaleAtPrice < units then

exitelse

removeOfferedShares(sellerPubKey, contractId, interestRate,

unitPrice, units);1 insertReservation(sellerPubKey, buyerPubKey, contractId,

interestRate, unitPrice, units, creationT ime, 0);return sharesOnSaleAtPrice - units

In case the payment is successful, the owner transfer the property of theshares to the investor: completing the process. Instead, if the payment is notrecognized as valid or it does not happen, she can simply refuse the reservationand then put the shares back on sale.

At the moment there is no blacklisting for investors. Since all the entitiesare verified and approved before allowing them the access to the system, it issafe to assume that they will behave in a neutral manner.

In the eventuality that some misleading behaviour takes place, it is possibleto pursue the deceitful user both off chain (with a fine or legal process) both onchain (banning the user from the system or redistributing her shares).

Algorithm The manageReservation function (Algorithm 6) allows the ownerand seller of the shares to accept or refuse one reservation. It makes the usualchecks and then gets the older reservation that satisfies the given parameters(Annotation 1). It is decided to automatically return the oldest reservation inorder to avoid malicious behaviours where the owner accepts the most recentreservation that satisfies the parameters: potentially highliting a misleadingbehaviour from the buyers that will have some old shares still suspended andto be paid. Ideally is better to show that the pending payments are the mostrecent ones, and (without this implementation) the buyer would have no optionto express the will to pay the oldest pending order.

If the off chain payment has been performed, the seller accepts the reserva-tion and the reservation record is updated with the decision wheter to validateor not the payment and the date and time the transaction occurred.

In case of conflicts both seller and buyer can use the blockchain as a proofin court.

29

Page 31: Applied design of distributed ledgers for real estate and ...

Algorithm 6: manageReservationData: txId, sellerPubKey*, buyerPubKey, contractId, interestRate,

unitPrice, units, accept, decisionTime*Result: acceptedbegin

assetId � convertAsset(contractId, interestRate) ;if !isInvestor(buyerPubKey) or !isInvestor(sellerPubKey) or!isAllowedToSell(sellerPubKey) or !assetId then exit;/* Get the oldest reservation with that parameters */

1 reservation �getOldestReservation(sellerPubKey, buyerPubKey, contractId,

interestRate, unitPrice, units);if !reservation then

exit

if accept thenaccepted � 1;ftUpdate(txId, sellerPubKey, assetId, units ⇤ �1);ftUpdate(txId, buyerPubKey, assetId, units);

elseaccepted � �1;

2 updateReservation(reservation.id, accepted, decisionT ime);return accepted

5.4 Automatic behaviourAt the time of writing, Postchain (as many other blockchain) is following theRPC (Remote Procedure Call) paradigm (ConsenSys 2015), therefore usersmust call a transaction in order to complete an operation.

30

Page 32: Applied design of distributed ledgers for real estate and ...

6 EvaluationAlthough the research question addresses the realization of a decentralizedblockchain based solution for the management of the real estate market, pro-viding the required security, reliability, fault tolerance and data symmetry incompare with the standard centralized solutions; it seems appropriate to firstfocus on the performance, scalability and security aspects of the blockchain so-lution itself before pointing the attention to the comparison of the two solutions(centralized and decentralized) in three different scenarios. Eventually in thissection, a discussion will be carried.

6.1 PerformanceSince this thesis is evaluating the approach to undertake and the advantagesand / or disadvantages of the blockchain solution, the speed of the system isnot measured.

This is because the number of tps (transaction per second) can be highly vari-able given the different blockchain and, accordingly to some specific blockchains(e.g. Ethereum) the budget available to run the transaction. It is possible tostate that in Corda there is a limit of around 170tps (Ward 2018), up to 50000tpson EOS (Year 2017), postchain 190-500tps (internal source) and between 10-30tps on Ethereum (What’s the transaction-throughput on Ethereum (how fast thenodes can replicate transactions, not transactions per second) 2018). The logicalimplementation, instead, remains the same.

Of course some operations described in this work are not available in someblockchains or can be harder to code as, for example, the key-value store inEthereum which has a non-trivial implementation even for experienced devel-opers and requires the implementation of other blockchains as a support. Al-ternatively, it is possible to fallback to centralized solutions that might notcompromise the security but can potentially lose track of the data (e.g. (Ora-clize - blockchain oracle service, enabling data-rich smart contracts 2018)). Asan example, storing the reference of an object on a centrally owned databasecan lead to the loss of the reference but, in case of misleading response from thedatabase, it is still possible to verify the correctness of the information: leadingto a situation where the contract is de facto useless. Thus, since the blockchaincannot query an external source, this must be inserted before the creation ofthe transaction, creating another layer of complexity.

Having a benchmark on mortgage registration between the standard cen-tralized solution and a decentralized blockchain solution would therefore be notcorrect given the fact that at the moment there isn’t a standardized and avail-able software procedure but rather a human based procedure. Automatizingthe process provides flexibility and decreases the time needed in order to issue amortgage but not its absolute speed, meaning the performance, which is givenby the underlying blockchain technology used in a specific configuration.

The software described works in virtually any Turing complete blockchain (oreven not, ideally) therefore the workflow is not bound to any specific product.For completeness it has been implemented on Postchain where it is able toreach nearly 180tps. Such tps is not even a real concern since the marketsdo not usually process those many transactions: in the USA as a whole in2014 (The Home Mortgage Disclosure Act 2018) there have been roughly 5

31

Page 33: Applied design of distributed ledgers for real estate and ...

million mortgage registrations, given 100 transactions per each mortgage (whichsounds reasonably a lot), all the mortgages could be registered, processed anddischarged in about a month: less then the current time needed to issue a singlemortgage.

6.2 ScalabilityThe system is then very easy to scale in functionality, integration with tax au-thorities, juridic authorities or simple real estate companies. As an example,anyone can simply host a node and run the queries they prefer as well as ana-lyze the data they fancy without compromising the system, slowing it down orrequiring additional hardware.

The blockchain allows to scale horizontally without any issue and, at thesame time, it enforces its security as more nodes join.

Example of implementable functions:

• Automatic payment system: which can be integrated with any FIATcurrency via an escrow payment process with the blockchain as a certifieror either fully automatized crypto payment (e.g. Bitcoin). Such paymentprocess is not described in this work because out of the premises of italthough it has been implemented by the authors.

• Automatic tax declaration: having a system where is possible to re-trieve the properties (without having to register documents into a database)allows to have always the most up to date records and avoids transcriptionand procedural errors.

• Mortgage offer: with the integration of other blockchain systems itwould be possible to automatically check the credit record of a potentialborrower and offer him the best rate. With a standardized interface as theblockchain is, the market can grow since the entry barriers are lower (e.g.the bank lending the money can operate in another country and does notneed a physical headquarter in the country where is issuing the mortgage).

6.3 SecurityHaving a strict and hard coded procedure helps in preventing errors and frauds.It prevents errors as misspelling of names since, in the proposed contract, allthe information is written at most once and is not possible to perform anyoperation without having all the correct parameters (i.e. cannot sell a propertyif the signer don’t have one, frauds become harder).

Blockchain also increases the level of security against any other IT solutionthanks to its intrinsic asymmetric encryption keys that assure the identity of theentity that perform an action. Since each transaction must be signed off by theauthor (and the author is recognized only by the signature of the transaction)it becomes technically impossible to impersonate somebody else. Given thischaracteristic, only 2 type of impersonation attacks are possible:

• Steal credential: namely the private and public key. In order to doso, the attacker should have the control of the device where the privatekey is stored. To prevent such theft a multi factor authentication (MFA)

32

Page 34: Applied design of distributed ledgers for real estate and ...

can be implemented. This can be done in collaboration with a 3rd partyauthority as happened in Sweden with Telia 2.

• Social engineering: The attacker might convince the signer to signtransactions towards an incorrect address. While this cannot be stoppedfrom a technical perspective (since there is no way to detect or checkthe will of the signer) it might be required the figure of a controller (i.e.a notary) as it is required as of today in the majority of the Europeancountries. It is worth to be mentioned that such attack is still possible witha non blockchain old system as happened in Victoria, Australia (Johanson2018).

Another sensible attack against the blockchain systems is the double spend-ing attack. While this is a problem related to the distributed technology used(blockchain), rather than a weak point of the specific solution here reported,the authors find useful to note that, since the act of getting a mortgage is longand not time sensitive, it would be wise to wait for a high number of blockconfirmations.

6.4 Comparison against traditional centralized systemsLand registry and real estate services are pretty different from one to another.When is about implementing a new system with many actors as stakeholders itis important to take into account all the possible needs. Of course a need fora coordinator might arise, such position can be assigned to the land registry,which indeed is the organization designed by the government to supervise andauthorize property transactions in a particular area. Having the land registryas supervisor and guarantor of the compliance of the solution, also helps inavoiding issues in the future, since it is reasonable to believe they have a deepand broad knowledge of the legislation and standard procedures. Each legis-lation has different requirements and each land registry sets its own goals andrules. As an example, one land registry might chase transparency, creating apublic repository where look up the information, although not required by thelegislation.

Here below, three scenarios will be described, each one of them is replicatingsituations and needs of different land registries and governaments around theworld. While the centralized solution is developed ad hoc per each scenario, thedecentralized blockchain solution remains and is always the same: meaning thearchitecture described in this work.

6.4.1 Scenario 1

The totality of the land registry system around the world are based on central-ized systems: either online or offline. In case of corruption of one or more landregistry’s employees there is no easy way to recover or recognize that an illicitoperation took place.

As an example, one malicious actor can bribe a governmental employee andask her to change the ownership of one property to the identity of the malicious

2Skatteverkets ID-kort : https://www.telia.se/privat/bredband/tjanster/produkt/skatteverkets-id-kort

33

Page 35: Applied design of distributed ledgers for real estate and ...

ScenarioScenariodescrip-tion

Problem Standard cen-tralized solu-tion

Proposed decentral-ized blockchain solu-tion

Advantages / Disad-vantages

Scenario1

3rd worldcountry

Bribed em-ployees inthe localland registrychange theownership ofthe property

Only solution is tosue the land reg-istry. A judge canask to a forensicexpert to revisethe land registry’slogs, assumingthey haven’t beendeleted

Transfer of the propertyrequires the approval ofthe owner. Thus, is pos-sible to suit the landregistry for having tried(unsuccessfully) to stealthe property. Suchevidences are easy tofind, simply attachingthe signed transaction

Producing forensicproofs is costly, block-hash and transactionis, instead, trivial fora user with a minimalunderstanding of IT.Somebody else thanland registry must runa concurrent node.

Scenario2

Transparentfirst worldcountry

Slow prop-erty transfer

In a transparentand secure fo-cused system isimportant to ver-ify and approveall the documentsand permissions.Transfer of prop-erty can take, anaverage, as longas 1.5 months

Blockchain solutionguarantees the authen-ticity of the signatureonline. Transparency isprovided by design andis always up to date

With transparencycomes lower integrationcost and improved andfaster user experience.Information is just athand.

Scenario3

Tax eva-sion fight,1st worldcountry

The rightof buying aproperty isregistered.The rightthough canbe sold overthe time fora profit. Theprofit is notrecorded andtherefore nottaxed

The only way toknow about thetransaction is relyon the bona fide ofthe actors. Thereis not, at the mo-ment of writing,a system designedto trace the right’sownership

At the moment of cre-ation of a new prop-erty or financial prod-uct (e.g. mortgage), in-vestors can buy it. Theproperty for the productbought can be traced.When the property hasbeen constructed, theownership will go to theowner of the right: asit is recorded in theblockchain system, andtaxes are paid accord-ingly

More complex to de-velop an MVP, close-to-seamless integrationwith RE IT systems andTax authorities systems.Thus it provided thebenefits of scenario 1.

34

Page 36: Applied design of distributed ledgers for real estate and ...

actor. The victim (and original owner) can then be suited for illegally occupyingsomebody else’s property and being evicted. In case of disagreement, it wouldbe difficult, expensive or technically not possible to check the logs, hunting forthe transfer of property. Thus, such log might not contain the author of thetransaction (it could contain the id of the device, structure or neither of them)and, ironically, it creates once more an opportunity for corruption of the forensicexpert.

In a blockchain based approach, each transaction must be signed, minedinto a block providing mathematical security with regard to the author, actionand permission, it is then retrievable and easily verifiable, de facto acting as anadvanced log system. Thus, it could be extended (as seen and implemented inthis work), requiring the authorization of the owner before actually transfer theproperty. Consumers associations might as well implement services to notify theowners that a transfer of their property is taking place, easily creating an hazardto recognize frauds. The blockchain creates higher security constraints than anormal centralized solution and allows 3rd parties to interact and extend theservices for free (on the side of whom implemented the decentralized system),without requiring any effort or development cost for the central land registry.All the necessary is the blockchain node code that can be placed into a publicrepository at the moment of creation. Such additional services (for exampleaimed at higher security and consumers rights) can be implemented by charityorganizations or open source communities, relieving the poor governments fromthis cost.

6.4.2 Scenario 2

There could be an advanced centralized solution, which is backed up by a secureand approved legislation and far from flaws and corruption. Although provenagainst corruption, the system is far from perfect. The land registry has thenecessity of lowering down the average transfer time that, although it keeps therecord in a digital data structure and IT system, is still mainly processed offlinedue to the high security standards that couldn’t be matched by the traditionalcentralized solution. A blockchain architecture can satisfy all the requirementsuch as asymmetric signature, unforgeability, tamper proof and automatic at-tack detection which is intrinsic of the blockchain. The developed prototype isassuring all these constraints and a similar system has been developed with theSwedish land registry (Lantmäteriet), with an execution time of 2 hours 1. Theprototype is now soon to be approved for a live environment, only waiting fora new legislation in matter of property transfer (which at the moment is notallowed for security reason).

6.4.3 Scenario 3

Assuming speed of the process is not a concern, there can be a situation where,the property has been assigned to construction (strata), the builder decides tosell a right of buying a property for y of a value of x (e.g. sell the right tobuy an apartment of e 500.000, after a payment of e 50.000). This allows thebuilder to start the construction knowing that he will make a profit (e 550.000,

1https://www.coindesk.com/sweden-demos-live-land-registry-transaction-on-a-blockchain/

35

Page 37: Applied design of distributed ledgers for real estate and ...

in this example), protecting himself from the oscillations of the market: thatcould be positive as well as negative. What happens in the background is thatthe owner of the right will try to sell it for a higher price (e.g. will sell the rightfor e 60.000). Eventually, the building will be ready and sold for the price y

(e 500.000) while the value of the right x can be as high as the market wouldpay for the property’s value appreciation (happened to be worth as much as theproperty’s initial price y itself). The tax payed at the moment of the lodgingwill be y + initialx leaving as hidden the price spent several times to buy andsell the right x.

A feasible solution for the land registry would be to implement a centralizedsoftware where each builder sells the right of the property and the broker (orwhoever buys it) resells it. The platform would also require a market or APIsdeveloped to aid the design of one or more external market platforms, as well asmaintaining the security constraints. When the construction of the building hasterminated, it should be automatically conveyed and the tax payed. Although ispossible to implement such a system in a centralized manner, this could requirelong time to be developed and even longer to come to an agreement with regardto APIs among the parties. One solution would be to delegate to an externalcompany the burden of such system. Another solution is to hire (if not yetexisting, and this is the typical case in land registries across the world) an ITteam to design and implement the tracing system.

What the reality is, is that within a month, or less, a simple intern wouldeasily be able to create this solution on blockchain. This because before adeveloper is able to start coding its solution, he has to implement a secure loginsystem with several roles, a strategy for decentralization, scaling system, APIdesign and agreement. What a blockchain software as Postchain does, is tohandle all these requirements and necessities once, and making them availableto everybody. In this paper the whole system and the requirements have beenaccomplished in 1.5 months of which: 3 weeks of requirements and feasibilityevaluation (now it is demonstrated that is feasible, and this time could be saved),and 3 weeks of development, code review and small changes required by thecustomer (the land registry); a sensible lower time that indeed gathered theattention of the land registries around the world.

6.5 DiscussionAs showed, blockchain provides clear advantages in matter of security, trans-parency and decentralization (intended as the power to commit changes in adistributed fashion, in this case, role dependent). A centralized solution couldbe developed in order to guarantee an higher control to the land registry, whichmight avoid to explain every arbitrary change they want to apply to their infor-mation. This is exactly what the blockchain wants to avoid. In case of wronginformation, the role elected can change anything in the system, but all thesechanges will be recorded and questioned in case they were not allowed by thestakeholders of the system, which have a direct snippet on the undergoing pro-cesses. Nevertheless is possible to run a blockchain as a completely centralizedsoftware: meaning that one entity is in control of all the nodes. This would bean architecture pretty similar to the current ones. Although feasible and fasterto develop, the authors find little or no sense in keeping data and operations thatshould be publicly available, private. Mainly when being part of a multi-actor

36

Page 38: Applied design of distributed ledgers for real estate and ...

contracts where each role has different needs on the data, requirements and APIavailability. In short, it seems that data asymmetry is more the consequence ofa poor technology rather than a business choice.

Even in this eventuality, a public roll out later on in the future would needlittle or no technical knowledge, being circumscribed to the initialization of anew node.

37

Page 39: Applied design of distributed ledgers for real estate and ...

7 Future WorksThis work is just a proposal of a real estate blockchain contract but its guidelinescan be used to implement other contracts and, even, integrate them.

7.1 Automatic credit score recordThis implementation of the real estate market is production ready and can beeasily plugged with other blockchains with a process known as side-chaining(What are Sidechains? - Hacker Noon 2018). It is therefore possible to extendthe model with banks that can automatically create and accept mortgages aswell as verify if the requester of a loan has some properties to back up.

7.2 Automatic crypto paymentAn other interesting exploration of this platform is the automatic payment viacrypto currency. While the market might be reluctant at first due to the highvolatility of the cryptocurrencies, this is proposal can be implemented withouttoo much overhead. A fraction of the crypto-community is researching aroundthe possibility of a stable coin: a coin pegged to fiat currencies or algorithmicallyprogrammed to compensate in case of raises or falls in value (Stable CoinsAnalysis: Is There A Viable Solution For The Future? 2018). If such as ascenario might be accomplished, then it would be possible to create financialproducts that are more stable and therefore take less risks for all the contractors

7.3 Integration with land registry and other authoritiesThe information regarding mortgages could be evaluated against governmentaldata: either having them on blockchain or in a centralized database. It ispossible to allow the authorities and give them the needed privileges, aiming atcreating a collaborative and virtual environment where to exchange information.

8 ConclusionIn this document has been proposed a new approach to manage land registries,real estate properties and market proving the possibility to:

• Create an unique endpoint where information about properties and mort-gages can be verified

• Bring the offline process of conveyance on the blockchain, sensibly loweringdown the time needed to perform such transaction, decreasing the proforma risks and increasing the security

• Create an added value segmenting the mortgages into pieces and create alow cost secure investment opportunity and at the same time giving thepossibility to raise money in case of negative credit score

The author believes this work has increased the quality of the current modeland has extended it, creating better opportunities for those roles of the realestate contracts that are often not proportionally represented. At the same

38

Page 40: Applied design of distributed ledgers for real estate and ...

time he believes this thesis can be of any help for future improvements and forthe creations of better algorithms.

As showed in the evaluation section, the time and knowledge needed todevelop a blockchain solution is considerably lower, the only suggestion is notbeing afraid to learn a new technology and push a bit out of the comfort zone.A similar system to the one presented has been developed and is soon to bereleased, accomplishing all the security and business standards required.

39

Page 41: Applied design of distributed ledgers for real estate and ...

ReferencesMerkle, Ralph C (1987). “A digital signature based on a conventional encryption

function”. In: Conference on the Theory and Application of CryptographicTechniques. Springer, pp. 369–378.

Ferguson, Niels (1993). “Single term off-line coins”. In: Workshop on the Theoryand Application of of Cryptographic Techniques. Springer, pp. 318–328.

Preneel, Bart (1994). “Cryptographic hash functions”. In: Transactions on Emerg-ing Telecommunications Technologies 5.4, pp. 431–448.

Bancos y operadores crean Mobipay, plataforma de pago por movil (2001). Com-puterWorld. url: http://www.computerworld.es/economia-digital/bancos-y-operadores-crean-mobipay-plataforma-de-pago-por-movil

(visited on 04/17/2018).Lamport, Leslie et al. (2001). “Paxos made simple”. In: ACM Sigact News 32.4,

pp. 18–25.Sit, Emil and Robert Morris (2002). “Security considerations for peer-to-peer

distributed hash tables”. In: International Workshop on Peer-to-Peer Sys-tems. Springer, pp. 261–269.

Agre, Philip E (2003). “P2p and the promise of internet equality”. In: Commu-nications of the ACM 46.2, pp. 39–42.

Magee, Paul D et al. (2004). Automated teller machine. US Patent App. 29/187,158.Szydlo, Michael (2004). “Merkle tree traversal in log space and time”. In: Inter-

national Conference on the Theory and Applications of Cryptographic Tech-niques. Springer, pp. 541–554.

Rhea, Sean et al. (2005). “OpenDHT: a public DHT service and its uses”.In: ACM SIGCOMM Computer Communication Review. Vol. 35. 4. ACM,pp. 73–84.

News, A. B. C. (2006). Napster Shut Down. ABC News. url: https://abcnews.go.com/Technology/story?id=119632&page=1 (visited on 04/05/2018).

Nakamoto, Satoshi (2008). “Bitcoin: A peer-to-peer electronic cash system”. In:Brewer, Eric (2012). “CAP twelve years later: How the" rules" have changed”.

In: Computer 45.2, pp. 23–29.Eyal, Ittay and Emin Gün Sirer (2014). “Majority is not enough: Bitcoin mining

is vulnerable”. In: International conference on financial cryptography anddata security. Springer, pp. 436–454.

Leao, Rosa M, Daniel S Menasche, Don Towsley, et al. (2014). “Scalability Issuesin P2P Systems”. In: arXiv preprint arXiv:1405.6228.

Buntinx, Jean-Pierre (2015). Why Coding Diversity Can be Beneficial to Bit-coin Development. Bitcoin News. url: https : / / news . bitcoin . com /

why-coding-diversity-beneficial-bitcoin-development/ (visited on05/04/2018).

ConsenSys (2015). Blockchain Underpinnings. ConsenSys. url: https://medium.com/@ConsenSys/blockchain-underpinnings-2c43ba03ecc9 (visited on05/08/2018).

BBVA (2017). Proptech: digitization shakes up the real estate business | BBVA.NEWS BBVA. url: https://www.bbva.com/en/proptech-digitization-shakes-real-estate-business/ (visited on 04/26/2018).

Brunet, Etienne (2017). Swish, the secret Swedish FinTech payment companycreated by Nordic banks and used by 50% of Swedesâ. Medium. url: https:/ / medium . com / @etiennebr / swish - the - secret - swedish - fintech -

40

Page 42: Applied design of distributed ledgers for real estate and ...

payment-company-created-by-nordic-banks-and-used-by-50-of-

swedes-cfcf06f59d6f (visited on 04/17/2018).McKinley, Dan (2017). âœAt Most Onceâfffd vs. âœAt Least Onceâfffd. Dan

McKinley. url: https://medium.com/@mcfunley/at-most-once-vs-at-least-once-f215dafd27e2 (visited on 05/15/2018).

Pirate Bay access blocked by Dutch telecoms after court ruling (2017). NL Times.url: https://nltimes.nl/2017/10/05/pirate-bay-access-blocked-dutch-telecoms-court-ruling (visited on 04/05/2018).

Resende, Eduardo (2017). Why are Bitcoin transaction fees so high? EduardoResende. url: https://medium.com/@ed_resende/why-are-bitcoin-transaction-fees-so-high-f6dea69e7db7 (visited on 04/17/2018).

Year, Danthemanin Eos â Last (2017). Web Assembly on EOS - 50,000 Trans-fers Per Second. Steemit. url: https://steemit.com/eos/@dantheman/web - assembly - on - eos - 50 - 000 - transfers - per - second (visited on07/19/2018).

CoinTelegraph (2018). Swedish Government Land Registry Soon To ConductFirst Blockchain Property Transaction. Cointelegraph. url: https://cointelegraph.com/news/swedish- government- land- registry- soon- to- conduct-

first-blockchain-property-transaction (visited on 04/26/2018).Johanson, Simon (2018). MasterChef finalist conveyancer hack prompts PEXA

backlash. The Sydney Morning Herald. url: https : / / www . smh . com .

au/business/companies/masterchef- finalist- conveyancer- hack-

prompts-pexa-backlash-20180626-p4znv3.html (visited on 07/29/2018).Sinha, Smita (2018). How Andhra Pradesh Is Emerging As IndiaâTMs Blockchain

Hub. Analytics India Magazine. url: https://analyticsindiamag.com/how-andhra-pradesh-is-emerging-as-indias-blockchain-hub/ (vis-ited on 05/07/2018).

Tamper-proof degree certificates to be India government’s first blockchain project(2018). FactorDaily. url: https://factordaily.com/degree-certificates-india-blockchain-project/ (visited on 05/07/2018).

Ward, Mike (2018). Transactions Per Second (TPS). Corda. url: https://medium.com/corda/transactions-per-second-tps-de3fb55d60e3 (vis-ited on 07/19/2018).

About - Google Maps (2018). url: https://www.google.com/maps/about/partners/indoormaps/ (visited on 04/26/2018).

Apple Pay (2018). Apple. url: https://www.apple.com/apple-pay/ (visitedon 04/17/2018).

BitTorrent Protocol (2018). url: http://www.bittorrent.org/beps/bep_0003.html (visited on 04/05/2018).

Block timestamp - Bitcoin Wiki (2018). url: https://en.bitcoin.it/wiki/Block_timestamp (visited on 04/18/2018).

ChromaWay (2018). url: https://chromaway.com/platform/ (visited on05/03/2018).

comments, 11 Dec 2017 Mike BursellFeed 56up 3 (2018). What is a blockchainsmart contract? Opensource.com. url: https://opensource.com/article/17/12/whats-blockchain-smart-contract (visited on 05/07/2018).

Conferences | Abt Associates (2018). url: http : / / abtassociates . com /

Conferences/2018/Event- 1- 29- 2- 1- UN- Women- Blockchain- Live-

Test- and- S.aspx?utm_content=buffer1d18b&utm_medium=social&

41

Page 43: Applied design of distributed ledgers for real estate and ...

utm _ source = twitter & utm _ campaign = Got + Land + Rights+ (visited on06/12/2018).

Deloitte (2018[a]). Blockchain in commercial real estate. url: https://www2.deloitte . com / content / dam / Deloitte / us / Documents / financial -

services/us-fsi-rec-blockchain-in-commercial-real-estate.pdf

(visited on 04/17/2018).— (2018[b]). The future of commercial real estate in Europe. url: https :

//www2.deloitte.com/content/dam/Deloitte/nl/Documents/real-

estate/deloitte-nl-real-estate-the-future-of-commercial-real-

estate-in-europe.pdf (visited on 04/17/2018).easyConveyance (2018). easy Conveyance - Compare conveyancing quotes on-

line. Easy Conveyance. url: https://www.easyconveyance.com/ (visitedon 04/26/2018).

eDonkey Protocol (2018). url: http://www.jmule.org/files/eDonkey-

protocol-0.6.2.html (visited on 04/05/2018).Gnutella2 (2018). url: http://g2.doxu.org/index.php/Main_Page (visited

on 04/05/2018).Google Pay - A better way to pay (2018). url: https://pay.google.com/

about/ (visited on 04/17/2018).Harris, Mark (2018). The History of Napster. Lifewire. url: https://www.

lifewire.com/history-of-napster-2438592 (visited on 04/05/2018).How smart was that? Swindon Advertiser (2018). url: http://www.swindonadvertiser.

co.uk/news/11225462.How_smart_was_that_/ (visited on 04/17/2018).Inc, Zillow (2018). Zillow: Real Estate, Apartments, Mortgages & Home Values.

Zillow. url: http://www.zillow.com (visited on 04/26/2018).Kotlin Programming Language (2018). Kotlin. url: https://kotlinlang.org/

(visited on 05/04/2018).MIT Venture Capital & Innovation (2018). Blockchain solutions for mortgages

in Sweden by ChromaWay. url: https://www.youtube.com/watch?v=DNGIfDedd60 (visited on 05/03/2018).

Mitchell, Bradley (2018). Gnutella P2P Free File Sharing and Download Net-work. Lifewire. url: https : / / www . lifewire . com / definition - of -

gnutella-818024 (visited on 04/05/2018).Null Safety - Kotlin Programming Language (2018). Kotlin. url: https://

kotlinlang.org/docs/reference/null-safety.html (visited on 05/04/2018).Oraclize - blockchain oracle service, enabling data-rich smart contracts (2018).

url: http://www.oraclize.it/ (visited on 07/29/2018).PGP: Explanation of the web of trust of PGP (2018). url: https://www.

rubin.ch/pgp/weboftrust.en.html (visited on 04/05/2018).PostgreSQL: The world’s most advanced open source database (2018). url:

https://www.postgresql.org/ (visited on 05/03/2018).REST - Semantic Web Standards (2018). url: https://www.w3.org/2001/

sw/wiki/REST (visited on 05/03/2018).SQLite vs MySQL vs PostgreSQL (2018). SQLite vs MySQL vs PostgreSQL:

A Comparison Of Relational Database Management Systems. DigitalOcean.url: https://www.digitalocean.com/community/tutorials/sqlite-vs-mysql-vs-postgresql-a-comparison-of-relational-database-

management-systems (visited on 05/03/2018).

42

Page 44: Applied design of distributed ledgers for real estate and ...

Stable Coins Analysis: Is There A Viable Solution For The Future? (2018). url:https://cointelegraph.com/news/stable-coins-analysis-is-there-

a-viable-solution-for-the-future (visited on 05/15/2018).The Home Mortgage Disclosure Act (2018). url: https://www.consumerfinance.

gov/data-research/hmda/explore#filters (visited on 07/29/2018).Views For Business - Google Maps | Business View - Home (2018). url: http:

//views4business.com/ (visited on 04/26/2018).What are Sidechains? - Hacker Noon (2018). url: https://hackernoon.com/

what-are-sidechains-1c45ea2daf3 (visited on 05/15/2018).What Happens to Bitcoin After All 21 Million are Mined? | Investopedia (2018).

url: https://www.investopedia.com/news/what-happens-bitcoin-after-all-21-million-are-mined/ (visited on 04/19/2018).

What is Kotlin? The Java alternative explained | InfoWorld (2018). url: https://www.infoworld.com/article/3224868/java/what-is-kotlin-the-

java-alternative-explained.html (visited on 05/04/2018).What’s the transaction-throughput on Ethereum (how fast the nodes can replicate

transactions, not transactions per second) (2018). Ethereum Stack Exchange.url: https://ethereum.stackexchange.com/questions/28666/whats-the- transaction- throughput- on- ethereum- how- fast- the- nodes-

can-replicate (visited on 07/19/2018).Why 6 confirmations? (2018). Why 6 confirmations? â r/Bitcoin. reddit. url:

https : / / www . reddit . com / r / Bitcoin / comments / 1cqyb1 / why _ 6 _

confirmations/ (visited on 04/28/2018).Zillow (n.d.). What is a Zestimate Zillows Zestimate Accuracy. url: https:

//www.zillow.com:443/zestimate/.

43

Page 45: Applied design of distributed ledgers for real estate and ...

TRITA TRITA-EECS-EX-2018:657

www.kth.se