← Back to home

Dework

Web3 escrow for rental deposits—earn yield, ensure fairness and protect tenants with smart contracts

Problem Statement

DeWork is a Web3 escrow platform that revolutionizes how rental security deposits are managed, especially in commercial leases. Traditionally, tenants are required to pay 2–3 months of rent upfront as a deposit, which is held by the landlord and remains idle, non-transparent, and prone to disputes.DeWork replaces this outdated system with a smart contract-based escrow mechanism that locks the deposit in a decentralized and trustless way. Instead of sitting idle, the deposit (in USDC) is deployed into DeFi yield protocols (such as Aave) to generate passive interest during the lease term.Once the lease begins, the platform mints an ERC-4907 NFT that represents the rental agreement and grants time-bound usage rights to the tenant. This NFT is non-transferable and acts as on-chain proof of tenancy. Throughout the rental period, neither party can unilaterally withdraw the deposit, and everything is managed by smart contracts and automated logic.At lease expiry, the platform automatically checks for disputes. If no issues are reported, the deposit is returned to the tenant and the earned interest is split between landlord (60%), platform (30%), and tenant (10%). If disputes arise—such as property damage—the landlord can submit evidence (e.g. photos, lease violations), and the platform facilitates a fair arbitration process to determine how the deposit is redistributed.The system also integrates identity verification and trust layers:World ID ensures that users are real and unique (anti-Sybil protection).ENS assigns human-readable names to rental NFTs (e.g. alice-office.eth).Self Protocol enables on-chain credit scoring based on rental history, which can be used in the future to adjust deposit amounts or interest share.HashKey Chain anchors tenant/landlord IDs on-chain to enhance transparency and accountability.DeWork is built using Solidity, Hardhat, React, and supports integration with Nodit for scheduled smart contract automation (e.g., lease expiry checks). It can be deployed on Arbitrum or HashKey Chain for scalability and low fees.In short, DeWork makes rental deposits productive, transparent, and fair—unlocking yield for all parties while ensuring funds are secure and disputes are handled with trustless logic.

Solution

🛠️ How It's MadeDeWorkwas built from the ground up as a full-stack Web3 escrow platform that integrates NFTs, DeFi, and identity layers to manage rental deposits in a trustless and yield-generating way. Here’s how we built it, piece by piece:🧠 Smart Contracts (Solidity + Hardhat)We wrote three main contracts in Solidity:RentalDeposit.sol: Handles the escrow logic, fund deposits, lease terms, and final distributions.RentalNFT.sol: Implements anERC-4907NFT that grants time-limited usage rights to tenants. We modified the standard to make the NFTnon-transferable, locking downtransferFromandapprove.InterestManager.sol: Interfaces with DeFi protocols (Aave-compatible) to deposit and withdraw funds, simulate APYs, and track accrued interest.We usedHardhatfor local development, deployment scripting, and unit tests. All contracts are modular and follow interface segregation (e.g.,IWorldID.sol,ICircle.sol,ISelfProtocol.sol).⚙️ Front-End (React + Ethers.js)The frontend is a lightweight React app usingEthers.jsto connect to wallets and interact with contracts. It includes:Lease listing and selection interface for tenantsWorld ID identity verification flowDeposit and NFT minting interfaceReal-time lease status viewer with ENS displayCustom hooks for polling lease expiry and dispute statesWe integratedENSlookups to assign readable names likecompany.ethto rental NFTs, improving UX for business users.🔁 Automations (Nodit Webhooks)A key automation layer isNodit, a decentralized webhook infra. We used it to:Automatically check lease expiry using timestampsTrigger interest distribution at lease endCall escrow release functions trustlesslyThis removed the need for centralized backend cron jobs.🧩 Identity & Trust LayerWorld ID: Used for Sybil resistance. Each tenant verifies uniqueness through Worldcoin's World ID, ensuring one real human per lease.HashKey Chain: Anchors tenant/landlord public keys for off-chain identity linkage and accountability.Self Protocol: While not fully integrated yet, we scaffolded future support for rental-based credit scores, enabling risk-based fees and perks.💸 USDC & Circle IntegrationDeposits are made inUSDC.We simulate USDC flows usingCircle’s API, setting up future support for fiat on/off-ramps and stablecoin-backed security.🧪 Testing & SimulationsAll contracts are tested withHardhat: from lease creation → deposit → NFT mint → interest accrual → withdrawal → dispute.We mocked Aave yield to simulate passive income.Frontend includes a calculator that lets tenants preview potential yield based on lease terms.🔍 Hacky HighlightsImplemented asoft dispute systemfor MVP: landlords submit off-chain evidence (images, descriptions), and platform admins manually arbitrate.Made ERC-4907 NFTsnon-transferableby overriding functions—preserving tenancy immutability while keeping ERC compatibility.ENS resolution happens dynamically in the frontend usingethers.providers, giving each rental a domain-like identity (e.g.,alice-office.eth).💡 SummaryBy combining DeFi, NFTs, identity, and automation,DeWorkis a fully composable and future-proof rental deposit system.Our modular architecture—with interfaces, role-based access, and plug-and-play yield strategies—enables scaling to residential leases, DAO rentals, or even hardware leasing.Every integration—World ID,ENS,Circle,Nodit—adds value and trust minimization.It’sDeFi with a real-world mission. And it’s just getting started. 🚀

Hackathon

ETHGlobal Taipei

2025

Contributors