Design of The Blockchain Smart Contract: A Use Case For Real Estate
Design of The Blockchain Smart Contract: A Use Case For Real Estate
Design of The Blockchain Smart Contract: A Use Case For Real Estate
http://www.scirp.org/journal/jis
ISSN Online: 2153-1242
ISSN Print: 2153-1234
The Blockchain is known to be the distributed public ledger for all transac-
tions, eliminating the need of trust between the users and the central adminis-
trator and the control is distributed among different computers/nodes in the
peer-to-peer (P2P) network. Moreover, the Blockchain resolved the double-spend
problem using P2P technology in combination with public/private key crypto-
graphy.
Zhao et al. [3] defined the Blockchain as “a distributed database comprising
records of transactions that are shared among participating parties”. According
to Deloitte [2] [4], Blockchain is “just another type of database for recording
transactions—one that is copied to all computers in a participating network”.
Blockchain by definition is a chain of blocks of information that registers
transactions with some characteristics. Each transaction conducted with Block-
chain technology is registered, time-stamped, and consecutively widely pub-
lished with a unique symbol. Transactions are inserted in the chain of blocks,
and each block is composed by a unique hash function (alphanumeric string re-
sulting from coding data with cryptographic private and public keys), a nonce (a
unique number to the block) and by a hash function from the previous block.
The first block is called genesis block. Therefore, an attempt to forge a block in-
volves the need to forge preceding blocks. This makes the mechanism safe and
secure from attempts to change a transaction.
Many people and researchers believe that blockchain applications in different
vertical industries could lead to three generations of the Blockchain, namely
Blockchain 1.0, Blockchain 2.0 and Blockchain 3.0. The Blockchain 1.0 is the
decentralization of money and payments and is used for digital currency. Fur-
ther, Blockchain 2.0 is used for smart contracts, assets, and properties. It is con-
sidered as the decentralization of finance. Moreover, Blockchain 3.0 is the de-
centralization of the digital society and is used for applications that relate to for
example to the Internet of things (IoT), health and government entities.
This paper discussed the benefits of Blockchain technology applied in the
smart contract for the real estate and smart cities domains. The paper is orga-
nized as follows. In Section 2, the key contribution of the work is presented and
the general introduction of blockchain technology and related work is presented
in Section 3. Blockchain layered approach is presented in Section 4. Section 5 has
discussed the development phases of Blockchain applications. Smart contract
and design methodology were described in Sections 6 and 7. Finally, a used case
for smart cities is examined in Section 8.
work, the smart contract provides a secure, distributed and shared decentralized
ledger of all assets and transactions between landlord and tenants.
For the public Blockchain, the block validation/mining includes reward me-
chanisms to incentivize miners to verify and validate transactions. To date, the
reward amount is about 0.25 BTC for each transaction. On the other hand, for
the private group Blockchain implementations are more focus on permissioning
mechanisms that allow for granting participation rights to accountable and
identifiable participants while denying them access to others rather incentivize
mining mechanisms.
Private
Public Blockchain Blocks validation
Blockchain
Blockchain Layer
A “51%” attack is still possible for an attacker that controls less than half of
the network hash rate. But in this case, the probability of success depends on
what percentage of the hash rate the attacker controls and the number of blocks.
Only when the attacker controls > 50% of the network hash rate is possible of
success 100% [13]. This node then can dominate all other nodes modify the
records in the blockchain.
Yli-Humuto et al. [16] and Lim et al. [17] performed a security analysis that found
many security breaches have occurred including DDOS and private account hack-
ing. Atzori [1] found that privacy and confidentiality are still open problems with
Blockchain because all the Blockchain nodes are shared with access to all data.
In the analysis phase, we collect and analyze the requirements of the block-
chain application to be developed. Identify the entities/parties involved, their
roles and relationships. The entities can be physical (assets or users) or virtual
(such as concepts).
In the design phase, we model the entity attributes as state variables and inte-
ractions between them as functions. In addition, we captured the constraints and
dependencies.
In the implementation phase, we implement the smart contract for the block-
chain applications. The main components of the smart contract are state va-
riables, functions, modifiers, and events in a high-level programming language
such as Solidity. In the next sections, we described the smart contract in details.
If a user interface friendly is required then the DApp implementation is manda-
tory as we described in the next section.
Dapp
Front-end
BLOCKCHAIN BLOCKCHAIN
USERS Web Browser USERS
Back-end
HTML/CSS/JS
Web3.js
kind of transactions. The contract code is executed on each node member in the
Blockchain network as a part of their verification of new blocks.
Smart contracts deployed on a Blockchain network can send messages to oth-
er contracts. The message is composed by the address of the sender, the address
of recipient, value of transfer, and a data field which contains the input data to
the recipient contract. There is a difference between message and transaction, in
which transaction is produced by External Owned Account (EOA) while the
message is produced by a smart contract as shown in Figure 4.
Users/Tenants who are responsible for the creation of their Ethereum Wal-
lets in order to have access in the public/private blockchain P2P nodes.
Actors/Roles
Externally Owned Accounts (EOA): The Landlord and Tenants as consi-
dered as external owned accounts. These accounts are controlled by private keys.
This actor can create transactions to transfer value, create smart-contracts or call
contract functions.
Contract Accounts (CA): These accounts are controlled by their own code.
Every time it receives a message, its code executes, allowing it to read and write
to internal storage and send messages to other contracts or create contracts in
return.
Miners: They validate the transactions and blocks. The transactions are
wrapped into a block and a proof-of-work will be provided for this block. After
validating the transaction into the block, an amount is provided to miners as a
reward. For the specific use case, we have selected private Blockchain then the
mining is not required since the parties are already known and trusted.
Functions-Rent Collection: The smart contract collects rent from the tenants
and sends it to the landlord. This is a powerful feature of this contract to makes
it “SMART”.
Functions-Terminated: When the Landlord terminates the contract, the state
set to “TERMINATED” and all balance deposit is sent to the tenant after check-
ing the status of the property.
Tenants
Real Estate Owner
Rental Contract
Agreement between
parties
Tenants
Landlord
.......
Tenants
$$ $$
$$ .......
$$
Tenants
FM Contractors
$$ Tenants
Real Estate Owner
$$
$$ Security deposit
Termination of
Landlord
Rental contract Tenants
.......
$$
Tenants
References
[1] Nakamoto, S. (2018) Bitcoin: A Peer-to-Peer Electronic Cash System.
https://bitcoin.org/bitcoin.pdf
[2] Deloitte. (2016) What Is Blockchain?
https://www2.deloitte.com/content/dam/Deloitte/uk/Documents/Innovation/deloitt
e-uk-what-is-blockchain-2016.pdf
[3] Zhao, J.L., Fan, S. and Yan, J. (2016) Overview of Business Innovations and Re-
search Opportunities in Blockchain and Introduction to the Special Issue. Financial