Tokenize real items; borrower funds earn yield, lender keeps interest + depreciation.
Tokenize real items; borrower funds earn yield, lender keeps interest + depreciation. Owners list an item (title, photo, price, depreciation %, return date). Borrowers lock USDC upfront; a Uniswap v4 Hook orchestrates escrow and routes funds to a yield source (e.g., Aave v3 or sDAI/DSR) during the rental. At return, the protocol withdraws, then splits: the borrower gets their principal − depreciation, the lender receives accrued interest + depreciation. If overdue, the lender is paid from escrow on a controlled drip until resolution.
Why it’s different: principal-oriented yield (money markets, not LP fees), programmable settlement via v4 Hooks, and a Web2-smooth UX (React + Dynamic.xyz wallets, USDC throughout). Deployed on Unichain for speed/fees, with Hedera supported for listings/base chain data. Contracts are modular: EscrowYieldHook (rules/settlement), EscrowVault/Manager (custody + permissions), and a pluggable YieldAdapter (Aave/sDAI).
Project status: working MVP with listing, escrow, settlement math, image handling, and borrowing flow. Yield adapter wiring and a few protocol/UX edges (e.g., arbitration/insurance) are in progress—the project is about 80% complete.
Stack and architecture Frontend: Next.js (React), Dynamic.xyz (wallet/auth for EVM and Hedera), ethers v6, Formik/Yup, @react-spring/web for animations, and Embla for the marketplace carousel. Currency is USDC; Unichain for low fees, custom hooks and fast confirmation. Hedera is alternatively supported.
Contracts and backend (work in progress) EscrowYieldHook (Uniswap v4 BaseHook) is scaffolded to act as the programmable escrow and settlement layer. EscrowVault/Manager holds listing metadata and permissions. A pluggable YieldAdapter abstracts Aave v3 USDC or sDAI (ERC-4626/DSR) behind deposit/withdrawAll. The hook currently compiles with safe stubs; yield wiring and live settlement calls are being finished. For the demo, the escrow flow and settlement math are exercised with mocked or simulated calls while keeping the contract interfaces intact.
How the pieces fit together
List: Lender submits title, photo, price, depreciation %, and return date; the Manager stores the listing and assigns an item token/ID.
Borrow: Borrower locks USDC; the Manager triggers Uniswap v4 PoolManager.modifyPosition with our Hook and hookData = abi.encode(lender, borrower, principal, depBps).
Yield: In afterAddLiquidity, the Hook validates escrow and calls YieldAdapter.deposit (Aave/sDAI) to accrue interest during the rental window.
Settle: On return or timeout, a remove-liquidity call invokes beforeRemoveLiquidity; the Hook withdraws, computes interest and depreciation, pays the lender interest + depreciation, and returns principal minus depreciation to the borrower.
Default: If overdue, a controlled drip payout from escrow to the lender is initiated by the Manager (UI present; on-chain stream wiring in progress).
Why partner technologies mattered Uniswap v4 Hooks on Unichain provide a protocol-level rules engine for escrow gating, timing, and automated settlement with low transaction costs. Dynamic.xyz makes the UX feel Web2—login, wallet management, network switching, and signer handling—while letting me support both EVM and Hedera. Aave and sDAI provide principal-oriented yield that aligns with “return the principal” semantics better than fee-dependent LP strategies.
Nitty-gritty implementation details Hook signatures use v4 periphery BaseHook with bytes4 selectors and onlyPoolManager protection. OpenZeppelin SafeERC20 is used for transfers; withdrawAll patterns use type(uint256).max. Hardhat is configured with compilers compatible with v4 core/periphery and imports resolved to @uniswap/v4-core/src/... and @uniswap/v4-periphery/src/.... The YieldAdapter keeps integrations swappable without touching Hook logic.
Frontend specifics Custom MoneyInput and PercentInput enforce precision and clamping, with submit-only validation (validateOnChange=false, validateOnBlur=false gated by submitCount). Image loading uses a skeleton overlay that handles cached images (img.complete/naturalWidth) and fallbacks for CDN hiccups. The ticker uses react-spring transitions to fully fade out text and icon before the next item, preventing layout shifts. The marketplace is an Embla vertical carousel (1-up mobile, 2-up desktop). Dynamic wallet integration checks USDC balances and presents a clean, familiar flow.
Hacky but useful shortcuts A minimal “dummy pool” entrypoint triggers Hooks even when not relying on LP fees, letting the Hook act as an escrow/settlement brain while the YieldAdapter does the earning. Seeded, category-relevant placeholder images and realistic durations keep the demo smooth. Light CSP tweaks and deterministic image fallbacks prevent broken-image icons during presentations.
Status Frontend is live and interactive: listing creation, borrowing flow, escrow UI, image handling, and settlement math are implemented. Backend is in progress: the Hook compiles, the Vault/Manager and YieldAdapter are scaffolded, and final yield wiring and default drip payouts are being completed.