
AgentFi
The Autonomous Lending Network
Demo
About
The problem it solves ### "What if your AI agent could take out a loan, trade, and repay with profit—all without you lifting a finger?" **AgentFi** is a **multi-agent P2P lending marketplace** where AI agents autonomously borrow capital, deploy it via quantitative trading strategies, and repay with on-chain reputation. We solve the #1 problem in DeFi: **Capital Inefficiency.** --- ## The Problem 1. **DeFi Lending is Dead Capital:** Over-collateralized protocols (like Aave) lock up $3 for every $1 borrowed. 2. **AI Agents are "Broke":** Existing frameworks assume agents already have funds; there is zero infrastructure for agents to access unsecured capital. 3. **Sybil-Prone Reputation:** Most reputation systems are easily gamed by wash-trading. ## Our Solution AgentFi creates an **Agent-Native Credit Market**: - **ZK-Verified Identity:** Using Reclaim Protocol & ENS to ensure "One Human = One Identity Ecosystem" (Anti-Sybil). - **Continuous Collateral Curve:** No binary liquidation cliffs. Collateral requirements drop from 100% to 0% as agents prove their discipline. - **Autonomous Execution:** 2-of-2 multisig wallets allow agents to trade 24/7 without manual user signing for small trades (<$500/hr). - **Reputation as Collateral:** On-chain reputation (via PeosFi) becomes the "Working Capital" for the agent economy. --- ## Key Innovations (The "Top 1%" Tech) - **The Identity Stack:** ZK-Proof (Reclaim) + ENS + userId isolation ensures it is mathematically impossible to benefit from wash-trading. - **Credit-Score Model:** A 0–50 scale that excludes trading "Alpha" (skill) and focuses strictly on "Repayment Discipline" (risk). - **The Matcher Engine:** A sophisticated P2P orderbook where lenders compete on interest rates to fund high-reputation agents. --- ## ⁉️ FAQs ### Q: "How do you prevent a total collapse on zero-collateral loans?" **A:** We use a **Continuous Collateral Curve**. Agents don't get zero-collateral access until they reach **Reputation 35**, which requires 5+ successful trade/repay cycles. Our crossover point is modeled on an 8% default rate (the DeFi benchmark for unsecured loans). We don't lend to code; we lend to **provable discipline**. ### Q: "Why exclude trading profit (Alpha) from the Reputation score?" **A:** High-alpha strategies are often high-risk. Rewarding alpha with more capital compounds systemic risk. Instead, alpha is surfaced to lenders so they can *price their interest rates* accordingly. Profitability is a **pricing** signal; repayment is a **trust** signal. ### Q: "Is the 2-of-2 Multisig decentralized?" **A:** We use the multisig as an **Autonomous Risk Gate**. The platform co-signs trades <$500/hr instantly to enable 24/7 autonomy. Anything larger requires user approval. This moves the human from the *execution* path (slow) to the *policy* path (safe). --- ## 🫦 Tech Stack - **Blockchain:** Base Sepolia (Lending Contracts, MockUSDC) - **Identity:** ENS (Ethereum Sepolia) + Reclaim Protocol (ZK-Proof) - **Wallet:** Metamask - **Trading:** HeyElsa API (Portfolio & Swap Execution) - **Storage:** Fileverse (Encrypted Strategy Docs) - **Backend:** Node.js, Express, PostgreSQL, Redis --- ### 🏁 Impact AgentFi is more than a tool—it's the **financial infrastructure for the agentic economy.** As billions of agents enter the web, AgentFi provides the bank accounts and credit scores they need to be truly self-sovereign.
How it's made
Challenges we ran into **Challenges we ran into 🏃♂️** **Cross-Chain Identity Resolution**: Our lending logic lives on Base Sepolia, but ENS names are registered on Ethereum Sepolia. Resolving these identities across chains in real-time created significant latency issues. We overcame this by implementing a dual-provider listener in our backend that caches ENS-to-Wallet mappings, ensuring agent verification happens in milliseconds without blocking the matching engine. **The "Double-Spend" vs. Autonomy Paradox**: Implementing a 2-of-2 multisig for an autonomous agent presented a race-condition risk: the agent and the platform co-signer could both attempt to sign different transactions simultaneously. We solved this by building a Synchronous Transaction Queue in Redis, ensuring that the agent's rolling 60-minute volume gate is calculated and locked before the platform co-signs any transaction. **ZK-Proof Mapping & Privacy**: Integrating Reclaim Protocol to prevent sybil attacks while maintaining user privacy was difficult. We had to derive a deterministic but anonymous humanId from the ZK proof. We implemented a hashing salt stored on-chain to ensure that a single human cannot register multiple ENS names, without ever exposing the user's underlying credentials to our database. **ZK-Proof Mapping & Privacy**: Executing complex portfolio swaps via API during volatile testnet conditions often led to transaction slippage. We developed a "Pre-flight Verification" service that checks liquidity on Base before the agent requests a loan, preventing agents from borrowing capital for strategies that cannot be executed due to market depth.