The capstone will build upon the knowledge you have gained in the course in order to build a decentralized housing product.
This project create a decentralized house listing service.
At present, property titles are often paper-based, creating opportunities for errors and fraud. Title professionals find defects in 25% of all titles during the transaction process, according to the American Land Title Association.
Any identified defect makes it illegal to transfer a property title to a buyer until it is rectified. This means property owners often incur high legal fees to ensure authenticity and accuracy of their property titles.
Moreover, title fraud poses a risk to homeowners worldwide. US losses associated with title fraud reportedly averaged around $103,000 per case in 2015, compelling many property buyers to purchase title insurance.
These title management issues could potentially be mitigated by using blockchain technology to build immutable digital records of land titles and using blockchain for transparent transactions. This approach could simplify property title management, making it more transparent and helping to reduce the risk of title fraud and the need for additional insurance.
Some companies and governments around the globe have already implemented blockchain technology for the title management process.
Ghanaian blockchain company Bitland has been working on a solution for Ghana, where it is estimated that almost 80% of land is unregistered, according to Forbes. Those that possess unregistered land find it more difficult to prove legal ownership, increasing their exposure to the risk of land seizures or property theft.
Bitland is seeking to create secure digital public records of ownership on its blockchain platform, with the aim of protecting land owners from title fraud. Bitland has expanded to operate in 7 African nations, India, and is also working with Native Americans in the US.
In this project you will be minting your own tokens to represent your title to the properties. Before you mint a token, you need to verify you own the property. You will use zk-SNARKs to create a verification system which can prove you have title to the property without revealing that specific information on the property. We covered the basics on zk-SNARKs in Privacy lesson in Course 5
Once the token has been verified you will place it on a blockchain market place (OpenSea) for others to purchase. Let's get started!
-
To install, download or clone the dependecies, run:
npm install
-
In separate window start Ganache in the terminal with 50 account addresses of 100 Ether each.
ganache-cli -m "<Enter the Metamask Seed>" -a 50
-
In the directory eth-contracts/ compile smart contracts with truffle:
truffle compile
This will create the smart contract artifacts in folder build/contracts.
-
Then compile and deploy with truffle on the local/public network.
-
Rinkeby Public network
truffle migrate --network rinkeby
-
localhost network
truffle migrate --network development --reset --compile-all
- Network Ports
- 7545 for ganache-GUI
- 8545 for ganache-cli
- 9545 for truffle-test
- Network Ports
-
To run truffle tests from inside the directory eth-contracts/:
truffle test
Create ZK-Snarks Proof using Zokrates
Succinct Zero-Knowledge proofs (zkSnarks) are proving to be one of the most promising frameworks for enhancing privacy and scalability in the blockchain space.
Projects like Zcash are using zkSnarks to make payments anonymous (rather than pseudonymous). Other projects such as Coda are experimenting with trustless light clients by using recursive zkSnarks to dramatically reduce the number of state verifications blockchain clients have to perform when coming online. Ethereum founder, Vitalik Buterin wrote how zkSnarks can be used to scale transaction speed on Ethereum
Follow the below commands step by step for generating verification.sol and proof.json files which will be needed to verify the contract without exposing the actual information.
- Install Docker
docker run -v /path/to/zokrates/zokrates/code:/home/zokrates/code -ti zokrates/zokrates /bin/bash
cd code/square
~/zokrates compile -i square.code
~/zokrates setup
~/zokrates compute-witness -a 3 9
~/zokrates generate-proof
~/zokrates export-verifier
In a separate terminal window, launch the DApp:
npm run dev
To view dapp
http://localhost:3000
Front end is created in OpenSea marketplace to sell or purchase the tokens https://rinkeby.opensea.io/get-listed/step-two
My market place OpenSea Store Front
contract address(SolnSquareVerifier): 0x8e8d7e2b13dca0728ae99fe0d05a3b98676af2c281a04fc6f760f3136647a593
contract address(SquareVerifier): 0x8cd85d45bef9e69c17c20f26e6cce83c8cdef3354114ff6ae5385b84c222583f
Kingdom Palace Property:
contract address: 0x5206e78b21ce315ce284fb24cf05e0585a93b1d9
Transaction Hash: 0x6037a433fe0982220f648eb110cfdca72ca1163d1dcc6f9f5f5a03448c2c7496
Beverly Hills Property:
contract address: 0x5206e78b21ce315ce284fb24cf05e0585a93b1d9
Transaction Hash: 0x3f6d3f93adc49ce59311db8910222f4a6118aa37856f4c9a3ee7086d5e18c692
The contract ABIs are located in the corresponding .json files under the folder build/contracts