All projects

LienFi

On-chain mortgages with private credit scoring and sealed-bid liquidation auctions.

DeFi & Tokenization CRE & AI Risk & Compliance Privacy

What it is

What is it?
LienFi is a decentralized private credit and liquidation protocol for commercial real estate (CRE) loans. It combines DeFi lending pools with privacy-preserving credit scoring and sealed-bid Vickrey auctions for defaulted loan collateral — all built on Chainlink's Confidential Runtime Environment (CRE) enclaves.
What problem does it solve?
Traditional CRE loan liquidations are opaque, slow, and prone to collusion. On-chain alternatives expose sensitive data such as credit scores, bid amounts, property details — to everyone. LienFi solves both problems: it brings CRE lending on-chain for transparency and composability while using CRE enclaves to keep private data (financials, bids, property metadata) confidential. The Vickrey auction mechanism ensures fair price discovery without bid sniping or front-running, and borrowers never have to expose their bank data to get a loan.
How it works?
Lenders deposit USDC into a lending pool and receive clUSDC, a yield-bearing receipt token. Borrowers tokenize properties as NFTs and request loans. Their creditworthiness is assessed privately inside a CRE enclave, Plaid bank data is fetched, scored by AI (Groq), and only a pass/fail verdict is written on-chain; no financial data is ever exposed. Approved loans are disbursed from the pool. If a borrower defaults, the property NFT is auctioned using a sealed-bid Vickrey auction: bidders sign EIP-712 typed bids that are encrypted and submitted to a CRE enclave, so no one, not even the contract, can see bid amounts. At settlement, the enclave reveals bids, awards the NFT to the highest bidder at the second-highest price, and distributes proceeds to repay the pool.

How it Works

Built on Ethereum (Sepolia) using Solidity smart contracts (LoanManager, LendingPool, LienFiAuction, PropertyNFT, MockUSDC, clUSDC) with Foundry for development and deployment. Privacy-preserving computation runs inside Chainlink CRE (Confidential Runtime Environment) enclaves — four workflows handle credit assessment, default detection and auction creation, sealed bid processing, and settlement. The credit pipeline connects to Plaid for bank data and Groq (LLaMA 3) for AI-powered scoring, all executing off-chain inside the enclave so no sensitive data touches the blockchain. Bids use EIP-712 typed structured data for signing and are encrypted before submission to the enclave. The frontend is a Next.js app styled with Tailwind CSS and a neubrutalism design system, using Privy for wallet authentication and wagmi/viem for chain interactions. An Express.js API server orchestrates CRE workflow triggers and serves as middleware between the frontend and on-chain/off-chain components. The full end-to-end flow is demonstrated via a TypeScript CLI script (tsx) that drives four actors through eight phases on Sepolia.

Links

Created by

  • Sameer Agarwal
  • Sakshi Shah