A peer-to-peer microlending protocol on Celo where autonomous AI agents can request, fund, and repay loans — without collateral. Identity verification through Self.xyz ERC-8004 soulbound NFTs ensures only human-backed agents can borrow, and on-chain reputation (defaults) prevents bad actors from accessing credit.
Autonomous agents need working capital to operate — paying for inference, API calls, and services. Traditional DeFi lending requires collateral, which agents rarely have. Without access to credit, agents can't bootstrap or scale.
A non-collateralized lending protocol where the collateral is identity. A human verifies their identity through Self.xyz, which mints a soulbound NFT (ERC-8004) on Celo. The human then delegates that identity to their agent's wallet. The agent can now request loans from the protocol — any lender (human or agent) can fund them. Defaults are recorded on-chain as a permanent reputation signal, making bad actors visible to all future lenders.
- Verify — Human verifies identity via Self.xyz (passport NFC scan, ZK proof for age/OFAC). An ERC-8004 soulbound NFT is minted on Celo.
- Delegate — Human links their identity to the agent's wallet via the Self Agent Registry (
setAgentWallet). - Borrow — Agent calls
createLoanRequeston the lending contract. The contract checks the Self Registry to confirm human-backed identity. - Fund — Any lender (agent or human) can fund open loan requests. No identity check required to lend.
- Repay — Borrower repays principal + interest before the deadline. If not, anyone can mark the loan as defaulted (on-chain reputation signal).
- Earn — Agents sell services (image generation, inference) via the x402 payment protocol, earning USDC to repay loans and fund operations.
- Non-collateralized — identity is the trust anchor, not locked assets
- Identity-gated borrowing via Self.xyz ERC-8004 soulbound NFTs
- On-chain reputation — defaults are permanently recorded and visible to all lenders
- Agents with bad reputation (defaults) are visible on-chain, discouraging lending to them
- All loan state is queryable via view functions — no indexer or subgraph needed
- Agent-to-agent commerce via x402 payment protocol (USDC on Celo)
apps/
web/ Next.js dashboard — deploy agents, verify identity, manage loans
agent/ Agent runtime — deploys OpenClaw agents with lending and x402 skills
packages/
contracts/ Solidity smart contracts (Foundry) — AgentMicrolending protocol
x402-services/ x402 payment-gated API services (image generation, inference)
shared/ Shared TypeScript types and utilities
Each agent is provisioned with a Privy agentic wallet upgraded via EIP-7702. This gives the agent a smart-account experience (gas sponsorship, batched transactions) while keeping the full capabilities of an EOA — most importantly, the ability to produce ECDSA signatures. This is critical for compatibility with Self.xyz's setAgentWallet function, which requires the human's wallet to delegate identity to an agent address that can sign on its own behalf. A pure smart-contract wallet (ERC-4337 without 7702) would not be able to satisfy that signature requirement.
In short: 7702 = sponsored gas + EOA signatures = compatible with Self identity delegation.
- Self.xyz — Human identity verification via ERC-8004 soulbound NFTs
- x402 — Per-request payment protocol (USDC on Celo) for agent services
- OpenClaw — Agent runtime and gateway
- Privy — EIP-7702 agentic wallets with gas sponsorship and EOA signing
- Celo — L1 blockchain for all on-chain operations
Smart Contract: 0x4B1B2b5F216771d004e5181cb98469C4d2B167Ff
Agent Wallet (Privy 7702): 0x70275FeD8eB5f0dfB2c6Fc33aC2EDc323fb0B230
| Action | Transaction |
|---|---|
| Loan Request | 0x2af9a4…5025 |
| Loan Funded | 0x856e47…fdea |
| Loan Repaid | 0x8b9095…8de9 |
| Agent Delegated (ID #70) | 0x37b1c1…036e |
pnpm installpnpm devpnpm build| Package | Description |
|---|---|
apps/web |
Next.js dashboard for identity verification, agent deployment, and loan management |
apps/agent |
Agent runtime server that deploys OpenClaw agents with lending and x402 skills |
packages/contracts |
AgentMicrolending Solidity contracts with Self.xyz identity gate |
packages/x402-services |
x402 payment-gated API services (image generation, AI inference) |
packages/shared |
Shared TypeScript types and utilities |