Implementing property transfer automation with smart contracts
Real estate transactions involve multiple parties, extensive paperwork, lengthy processes, and high costs for intermediaries.
See how funds move to escrow, signatures are collected, then title transfers from Seller to Buyer on completion.
contract PropertyTransfer {
struct Property {
uint256 id;
string location;
uint256 value;
address owner;
bool isForSale;
uint256 salePrice;
}
struct Transfer {
uint256 propertyId;
address seller;
address buyer;
uint256 price;
uint256 escrowAmount;
bool sellerSigned;
bool buyerSigned;
bool fundsDeposited;
bool completed;
}
mapping(uint256 => Property) public properties;
mapping(bytes32 => Transfer) public transfers;
mapping(address => uint256[]) public ownerProperties;
event PropertyListed(uint256 propertyId, uint256 price);
event TransferInitiated(bytes32 transferId, uint256 propertyId);
event TransferCompleted(bytes32 transferId, address newOwner);
function listProperty(uint256 _propertyId, uint256 _price) public {
require(properties[_propertyId].owner == msg.sender, "Not owner");
properties[_propertyId].isForSale = true;
properties[_propertyId].salePrice = _price;
emit PropertyListed(_propertyId, _price);
}
function initiateTransfer(uint256 _propertyId) public payable {
Property memory property = properties[_propertyId];
require(property.isForSale, "Property not for sale");
require(msg.value >= property.salePrice, "Insufficient payment");
bytes32 transferId = keccak256(abi.encodePacked(
_propertyId, property.owner, msg.sender, block.timestamp
));
transfers[transferId] = Transfer({
propertyId: _propertyId,
seller: property.owner,
buyer: msg.sender,
price: property.salePrice,
escrowAmount: msg.value,
sellerSigned: false,
buyerSigned: true,
fundsDeposited: true,
completed: false
});
emit TransferInitiated(transferId, _propertyId);
}
function signTransfer(bytes32 _transferId) public {
Transfer storage transfer = transfers[_transferId];
require(!transfer.completed, "Transfer already completed");
if (msg.sender == transfer.seller) {
transfer.sellerSigned = true;
} else if (msg.sender == transfer.buyer) {
transfer.buyerSigned = true;
} else {
revert("Not authorized");
}
// Complete transfer if both parties signed
if (transfer.sellerSigned && transfer.buyerSigned && transfer.fundsDeposited) {
completeTransfer(_transferId);
}
}
function completeTransfer(bytes32 _transferId) internal {
Transfer storage transfer = transfers[_transferId];
Property storage property = properties[transfer.propertyId];
// Transfer ownership
property.owner = transfer.buyer;
property.isForSale = false;
property.salePrice = 0;
// Update owner mappings
removeFromOwnerProperties(transfer.seller, transfer.propertyId);
ownerProperties[transfer.buyer].push(transfer.propertyId);
// Transfer funds to seller
payable(transfer.seller).transfer(transfer.price);
// Return excess funds to buyer
if (transfer.escrowAmount > transfer.price) {
payable(transfer.buyer).transfer(transfer.escrowAmount - transfer.price);
}
transfer.completed = true;
emit TransferCompleted(_transferId, transfer.buyer);
}
}
Delaware became the first US state to legally recognize blockchain records for corporate shares and property transfers.
Dubai implemented blockchain for property transactions, reducing processing time from weeks to minutes.
Estonia's digital identity system includes blockchain-based property registration and transfer capabilities.
This high-level architecture shows a property transfer system on Ethereum using title NFTs (ERC-721), escrowed funds, compliance roles, and off-chain document storage via IPFS. The system integrates oracles for real-world data and supports atomic settlement where funds and title transfer together upon notary/registry approval.
| Step | Healthcare Workflow 🏥 | Property Transfer Workflow 🏠 |
|---|---|---|
| Identity Mgmt | Patient DID + consent | Buyer/seller DID + KYC |
| Asset Representation | Records (hashed) | Property as NFT (ERC-721) |
| Verification | Access control, audit trail | Ownership history verification |
| Smart Contracts | Consent mgmt, insurance claims | Escrow, compliance, settlement |
| Supply Chain | Pharma tracking (anti-counterfeit) | Property registry + notarization |
| Final Outcome | Secure data sharing, faster claims | Fraud-proof, transparent property transfers |
Next, we'll explore Ethereum Jargon and terminology.