Search projects, hackathons, sponsors and tech

    ← All projects

    Swap

    Unlock under-collateralized DeFi loans using The Graph and ENS for verifiable on-chain reputation.

    Demo

    About

    Passport DeFi: Verifiable On-Chain Reputation for Capital Efficient Lending Currently, decentralized finance suffers from massive capital inefficiency. Because smart contracts have no concept of "trust" or "credit," almost all DeFi lending protocols require users to over-collateralize their loans (often locking up 150% of the value they want to borrow). This severely limits the growth and real-world utility of Web3 finance. Passport DeFi solves this by introducing verifiable, on-chain credit scores that dynamically adjust a user's Loan-to-Value (LTV) ratio. If a user has a proven history of good financial behavior, they can unlock under-collateralized loans. Our architecture achieves this by seamlessly integrating three core technologies: 1. Data Indexing (The Graph) We utilize a Subgraph to index a user's historical DeFi activity, specifically tracking loan repayment history across protocols. This raw data is synthesized into a single, verifiable "Passport Score." 2. Decentralized Identity (ENS on Sepolia) An arbitrary score isn't useful if smart contracts can't reliably read it. We bind this Passport Score directly to the user's decentralized identity using ENS Text Records on the Sepolia network. Every user receives a mathematical subname (e.g., score-0x...getpassport.eth) where their reputation data lives permanently on-chain. 3. Capital Execution (Arc Testnet) The actual financial execution happens on the Arc Testnet. We deployed a custom Lending Pool smart contract (PassportLendingPool.sol) that natively reads the user's verified ENS identity. Standard users are capped at an 80% LTV, but users with a Passport Score of 70 or higher unlock a 150% under-collateralized borrow capacity. 4. Autonomous AI Agents To tie it all together, we built a Node.js AI Agent that acts as an autonomous portfolio manager. The agent independently queries The Graph for the latest scores, cross-references them against ENS on Sepolia to verify identity, and then automatically executes risk-adjusted deposit and borrow strategies on the Arc Testnet on behalf of the user. By combining The Graph's data layer, ENS's identity layer, and Arc Testnet's execution layer, Passport DeFi bridges the gap between traditional credit dynamics and decentralized finance.

    How it's made

    How it's made We built Passport DeFi using a multi-chain architecture that separates data indexing, identity storage, and financial execution across different layers. 1. Smart Contracts & Execution (Arc Testnet & Foundry) The core lending protocol (PassportLendingPool.sol) and our test tokens (MockWETH, MockUSDC) were written in Solidity and compiled/tested using Foundry. We deployed these contracts to the Arc Testnet because of its fast finality and L2 scaling benefits. The lending pool is mathematically hardcoded to check external identity parameters before granting 150% under-collateralized loans. 2. Data & Identity (The Graph & ENS on Sepolia) We used The Graph's GraphQL API to query historical loan repayment data. However, the most interesting technical challenge was getting this data into a format that the Arc Testnet contracts could trust. We chose to use ENS Text Records on Sepolia as our identity layer. The Notable Hack: During development, we realized that the official ENSv2 PublicResolver enforces strict ownership checks, which blocked us from dynamically writing subnames (like score-0x...getpassport.eth) off-tree without setting up a complex CCIP-read gateway. To solve this quickly for the hackathon, we built and deployed a custom MockResolver on Sepolia. This acted as a test-double that bypassed the strict ownership checks, allowing our backend scripts to dynamically mint and update ENS text records for any wallet address on the fly. 3. Frontend (React, Vite, Wagmi) The user interface is a responsive React application bundled with Vite. We utilized Wagmi v2 and viem for wallet interactions. Because our architecture spans multiple chains (Sepolia for Identity, Arc Testnet for Execution), we heavily utilized Wagmi's useSwitchChain hooks to ensure the user is seamlessly routed to the correct network before signing transactions. The UI features a custom "Cyber-DeFi" aesthetic built with vanilla CSS. 4. Autonomous AI Agent (Node.js & Ethers.js) Finally, we built an autonomous agent using Node.js. The agent is a standard script powered by ethers.js and dotenvx for secure environment variable injection. It runs a 3-track loop: querying The Graph's endpoints via fetch, reading the ENS MockResolver on Sepolia via an RPC provider, and mathematically calculating the risk-adjusted strategy before signing and broadcasting the actual borrow transactions to the Arc Testnet using a private key.