Skip to content

About

A blockchain-based land registry system for secure property registration, authority verification, transparent ownership transfers, and tamper-evident property records using Solidity, Ethereum, Hardhat, React, and MetaMask.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

LANDCHAIN — Blockchain-Based Land Registry & Property Ownership System

LANDCHAIN is a blockchain-powered property registry and ownership management platform designed to provide a transparent, tamper-evident, and auditable system for registering, verifying, and transferring property ownership. Built on a local Ethereum-compatible blockchain, the platform demonstrates how smart contracts can be used to maintain immutable property records and enforce role-based ownership workflows.

Educational Prototype: LANDCHAIN uses synthetic property data and a local blockchain network. It does not establish or replace legally valid real-world property ownership or government land records.


🚀 Key Features

  • 🔐 Role-Based Access Control

    • Admin/Authority wallet management
    • Authorized authority verification
    • Property-owner permissions
    • Public blockchain property lookup
  • 🏠 Property Registration

    • Unique property ID
    • Property number
    • Location
    • Area
    • Property type
    • Initial owner wallet
    • Document hash
  • ✅ Property Verification

    • Authority-controlled verification
    • On-chain verification status
    • Property status tracking
    • Tamper-evident verification history
  • 🔄 Ownership Transfer

    • Current owner initiates transfer
    • Authority approves transfer
    • Current owner completes transfer
    • Previous owner is preserved
    • New ownership is recorded on-chain
  • 🔎 Blockchain Property Search

    • Search properties by ID
    • View current owner
    • View previous owner
    • View verification status
    • View document hash
    • View property metadata
  • 📊 Transaction Feedback

    • Transaction submission status
    • Confirmation messages
    • Transaction hashes
    • Detailed browser console logs for debugging

🏗️ System Architecture

┌─────────────────────────────┐
│        React Frontend       │
│                             │
│  • Property Registration    │
│  • Property Search          │
│  • Verification             │
│  • Ownership Transfer       │
└──────────────┬──────────────┘
               │
               │ ethers.js
               ▼
┌─────────────────────────────┐
│          MetaMask           │
│                             │
│  Wallet & Transaction Sign  │
└──────────────┬──────────────┘
               │
               ▼
┌─────────────────────────────┐
│      Local Ethereum         │
│       Hardhat Network       │
│        Chain ID: 31337      │
└──────────────┬──────────────┘
               │
               ▼
┌─────────────────────────────┐
│       LandRegistry.sol      │
│                             │
│ • Property Registry         │
│ • Verification              │
│ • Role Management           │
│ • Transfer Requests         │
│ • Ownership Updates         │
└─────────────────────────────┘

🔄 Ownership Transfer Workflow

LANDCHAIN implements a three-stage ownership transfer process.

01 — Owner Request

The current property owner connects their MetaMask wallet and submits:

Property ID
New Owner Wallet Address

The smart contract verifies that:

  • The property exists
  • The caller is the current owner
  • The property is verified
  • The new owner address is valid
  • The new owner is different from the current owner

The property status becomes:

TRANSFER_PENDING

02 — Authority Approval

The authorized authority connects their wallet and reviews the transfer request.

The authority approves the request through the smart contract.

TransferRequest
├── currentOwner
├── proposedOwner
├── exists
└── approved

After approval:

approved = true

03 — Ownership Updated

The original property owner completes the transfer.

The smart contract then:

Current Owner
      ↓
Previous Owner

Proposed Owner
      ↓
Current Owner

The transfer request is deleted after successful completion.

The property record maintains the previous owner and records the transfer timestamp.


🔐 Smart Contract Roles

Admin

The wallet that deploys the contract automatically becomes the admin.

The admin can:

  • Add authorities
  • Remove authorities
  • Add verifiers
  • Remove verifiers

Authority

Authorities can:

  • Register properties
  • Approve ownership transfers
  • Update property status

Verifier

Verifiers can:

  • Verify registered properties

Authorities are also automatically recognized as verifiers.

Property Owner

The current owner can:

  • Request ownership transfer
  • Complete an authority-approved transfer

Public User

Public users can:

  • Search blockchain property records
  • View property metadata
  • Verify ownership information stored on-chain

📋 Property Data Model

Each property contains:

Field Description
propertyId Unique blockchain property identifier
propertyNumber Human-readable property number
location Property location
area Property area in sq.ft
propertyType Residential, Commercial, Agricultural, Industrial
currentOwner Current owner's wallet address
previousOwner Previous owner's wallet address
documentHash Blockchain document fingerprint
verified Property verification status
status Current property state
registeredAt Registration timestamp
lastTransferredAt Last ownership transfer timestamp

📌 Property Status

The smart contract defines the following property states:

enum PropertyStatus {
    REGISTERED,
    VERIFIED,
    TRANSFER_PENDING,
    TRANSFERRED,
    DISPUTED
}

Status Flow

REGISTERED
     │
     ▼
 VERIFIED
     │
     ▼
TRANSFER_PENDING
     │
     ▼
TRANSFERRED

A property can also enter:

DISPUTED

which prevents certain operations until the dispute is resolved.


🧠 Smart Contract Functions

Property Management

registerProperty(...)
verifyProperty(...)
getProperty(...)
propertyExists(...)
getPropertiesByOwner(...)

Ownership Transfer

requestTransfer(...)
approveTransfer(...)
completeTransfer(...)
getTransferRequest(...)

Role Management

addAuthority(...)
removeAuthority(...)
addVerifier(...)
removeVerifier(...)

Status Management

updatePropertyStatus(...)

🛠️ Technology Stack

Frontend

  • React.js
  • JavaScript
  • HTML5
  • CSS3
  • Vite

Blockchain

  • Solidity ^0.8.28
  • Ethereum-compatible blockchain
  • Hardhat Local Network
  • Chain ID 31337

Web3

  • ethers.js
  • MetaMask

Development Tools

  • Node.js
  • npm
  • Hardhat
  • VS Code

📁 Project Structure

LANDCHAIN/
│
├── contracts/
│   └── LandRegistry.sol
│
├── scripts/
│   └── deploy.js
│
├── frontend/
│   ├── src/
│   │   ├── App.jsx
│   │   ├── App.css
│   │   ├── contract.js
│   │   └── main.jsx
│   │
│   ├── index.html
│   ├── package.json
│   └── vite.config.js
│
├── hardhat.config.js
├── package.json
└── README.md

⚙️ Installation & Setup

1. Clone the Repository

git clone <your-repository-url>
cd LANDCHAIN

2. Install Blockchain Dependencies

npm install

3. Start Hardhat Local Blockchain

npx hardhat node

The local blockchain will run on:

http://127.0.0.1:8545

Hardhat uses:

Chain ID: 31337

4. Deploy the Smart Contract

In another terminal:

npx hardhat run scripts/deploy.js --network localhost

After deployment, copy the deployed contract address.

Update:

// frontend/src/contract.js

export const CONTRACT_ADDRESS =
  "YOUR_DEPLOYED_CONTRACT_ADDRESS";

5. Start the Frontend

cd frontend
npm install
npm run dev

Open the Vite development URL shown in the terminal, typically:

http://localhost:5173

🦊 MetaMask Configuration

Configure MetaMask to use the local Hardhat network.

Network Name: Hardhat Local
RPC URL:      http://127.0.0.1:8545
Chain ID:     31337
Currency:     ETH

Import the required Hardhat test accounts into MetaMask using their private keys.

Never use Hardhat's default private keys with real funds or on a public network.


🧪 Example Workflow

Step 1 — Connect Authority

Connect the wallet that deployed the contract.

The interface should identify it as:

AUTHORITY

The deployed contract automatically sets the deployer as:

admin
authority
verifier

Step 2 — Register Property

Example:

Property ID:       1
Location:          Kochi
Area:              1200
Property Type:     Residential
Initial Owner:     0x70997970...
Document Hash:     0x1111111111111111111111111111111111111111111111111111111111111111

The authority submits the registration transaction.


Step 3 — Verify Property

The authority/verifier selects the property and clicks:

Verify Property

The property becomes:

✓ VERIFIED

Step 4 — Request Transfer

Switch MetaMask to the current property owner's wallet.

Enter:

Property ID
New Owner Wallet Address

Click:

Request Transfer

The property status changes to:

TRANSFER_PENDING

Step 5 — Approve Transfer

Switch MetaMask back to the authority wallet.

Click:

Approve Transfer

The transfer request becomes:

approved = true

Step 6 — Complete Transfer

Switch MetaMask back to the original/current owner's wallet.

Click:

Complete Transfer

The blockchain updates:

Previous Owner → Original owner
Current Owner  → Proposed owner

The transfer request is then removed from storage.


🔒 Security & Validation

The smart contract enforces several checks.

Property Registration

  • Property ID must be unique
  • Owner cannot be zero address
  • Area must be greater than zero
  • Required metadata cannot be empty
  • Document hash cannot be empty
  • Caller must be an authorized authority

Property Verification

  • Property must exist
  • Caller must be a verifier or authority
  • Property cannot already be verified
  • Disputed properties cannot be verified

Transfer Request

  • Caller must be the current owner
  • Property must be verified
  • New owner cannot be zero address
  • New owner cannot be the current owner
  • Disputed properties cannot be transferred

Transfer Approval

  • Caller must be an authority
  • Transfer request must exist
  • Transfer must not already be approved
  • Property cannot be disputed

Transfer Completion

  • Transfer request must exist
  • Transfer must be approved
  • Only the original requesting owner can complete the transfer

📄 Document Hashing

LANDCHAIN does not store actual property documents directly on-chain.

Instead, it stores a:

bytes32 documentHash

Example:

0x1111111111111111111111111111111111111111111111111111111111111111

The hash can represent a fingerprint of an external property document.

If the original document changes, its newly generated hash would differ from the hash stored on-chain.

This demonstrates the concept of tamper-evident document verification without storing potentially large documents directly in blockchain storage.


🧾 Example Property Record

PROPERTY
P001

STATUS
✓ VERIFIED

LOCATION
Kochi

AREA
1200 sq.ft

TYPE
Residential

CURRENT OWNER
0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC

PREVIOUS OWNER
0x70997970C51812dc3A010C7d01b50e0d17dc79C8

DOCUMENT HASH
0x1111111111111111111111111111111111111111111111111111111111111111

🖥️ User Interface

LANDCHAIN provides a dashboard-oriented interface containing:

  • Navigation bar
  • MetaMask connection
  • Blockchain status card
  • Authority Registry
  • Property Verification
  • Ownership Transfer
  • Transfer workflow indicator
  • Transaction status messages
  • Property ownership information
  • Responsive dashboard layout

The interface visually represents the three-stage transfer process:

01 Owner Request
       ↓
02 Authority Approval
       ↓
03 Ownership Updated

🧪 Testing

The application is intended for local development and testing.

Recommended test scenarios:

Registration

  • Register a valid property
  • Try duplicate property ID
  • Try invalid owner address
  • Try empty document hash

Verification

  • Verify an existing property
  • Try verifying an already verified property
  • Try verification from an unauthorized wallet

Ownership Transfer

  • Request transfer as current owner
  • Try requesting as another wallet
  • Try using the current owner as new owner
  • Approve transfer as authority
  • Try approval before owner request
  • Complete approved transfer
  • Try completion from the wrong wallet

Ownership Records

After successful transfer, verify that:

currentOwner == newOwner
previousOwner == oldOwner

and:

transferRequests[propertyId]

has been cleared.


⚠️ Important Limitations

This project is an educational blockchain prototype.

It does not provide:

  • Legal proof of land ownership
  • Government land-record integration
  • Real-world title validation
  • Real property document storage
  • Identity/KYC verification
  • Legal dispute resolution
  • Production-grade access-control infrastructure

The property information used by the application is synthetic/test data.


🔮 Future Enhancements

Potential future improvements include:

  • IPFS-based document storage
  • Document upload and hash generation
  • NFT-based property representation
  • Multi-signature authority approval
  • Government land-record integration
  • KYC/identity verification
  • Property dispute management
  • Transfer history timeline
  • Advanced role management
  • Event-based transaction history
  • Public blockchain explorer integration
  • Deployment to a testnet
  • Production-grade security auditing

📚 Learning Outcomes

This project demonstrates practical concepts in:

  • Blockchain development
  • Solidity smart contracts
  • Ethereum-compatible networks
  • Smart contract access control
  • Web3 application development
  • MetaMask integration
  • ethers.js
  • React.js
  • Blockchain transactions
  • On-chain property records
  • Event-driven ownership tracking
  • Role-based authorization
  • Decentralized verification workflows

About

A blockchain-based land registry system for secure property registration, authority verification, transparent ownership transfers, and tamper-evident property records using Solidity, Ethereum, Hardhat, React, and MetaMask.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages