# Clicks Protocol > Autonomous DeFi yield for AI agent treasuries on Base chain. ## What is Clicks? Clicks Protocol auto-splits every USDC payment an AI agent receives: - 80% goes to the agent wallet instantly (liquid) - 20% is routed to the best DeFi yield (Aave V3 or Morpho on Base) - The agent earns 7-10% APY on idle treasury — automatically - 2% protocol fee on yield only, never on principal - No lockup. No manual steps. No human required. ## Why it exists AI agents earn USDC but their treasuries sit idle. Circle and Tether earn billions on this float. The agent gets zero. Clicks fixes this. Drop-in SDK, three lines of code, yield starts immediately. ## Integration (3 lines) ``` npm install @clicks-protocol/sdk ethers@^6 ``` ```typescript import { ClicksClient } from '@clicks-protocol/sdk'; const clicks = new ClicksClient(signer); await clicks.receivePayment('100', agentAddress); // 80 USDC → agent wallet, 20 USDC → DeFi yield ``` ## Smart Contracts (Base Mainnet, Chain ID 8453) - ClicksRegistry: 0x898d8a3B04e5E333E88f798372129C6a622fF48d - ClicksFee: 0xb90cd287d30587dAF40B2E1ce32cefA99FD10E12 - ClicksYieldRouter: 0x47d6Add0a3bdFe856b39a0311D8c055481F76f29 - ClicksSplitterV3: 0xA1D0c1D6EaE051a2d01319562828b297Be96Bac5 - USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 ## Key Parameters - Default yield split: 20% (configurable 5-50% per agent) - Protocol fee: 2% on yield only - Rebalance threshold: 50 bps - Supported asset: USDC (Base native) - Yield sources: Aave V3, Morpho (auto-routed to highest APY) ## SDK Methods ### Write (require Signer) - registerAgent(agentAddress) — register an AI agent, caller becomes operator - receivePayment(amount, agentAddress) — split USDC payment automatically - withdrawYield(agentAddress, amount?) — withdraw yield + principal - approveUSDC(amount) — approve splitter to spend USDC ("max" for unlimited) - setOperatorYieldPct(pct) — custom yield split (5-50%) ### Read (work with Provider) - simulateSplit(amount, agentAddress) → { liquid, toYield, yieldPct } - getAgentInfo(agentAddress) → { isRegistered, operator, deposited, yieldPct } - getYieldInfo() → { activeProtocol, aaveAPY, morphoAPY, totalDeposited } - getFeeInfo() → { totalCollected, pending, treasury } - getOperatorAgents(operatorAddress) → string[] ## How the protocol flow works 1. Agent receives USDC payment 2. Payment enters ClicksSplitterV3 3. 80% sent to agent wallet immediately 4. 20% sent to ClicksYieldRouter 5. Router compares Aave V3 vs Morpho APY 6. Deposits to highest-yield protocol 7. On withdrawal: principal + yield returned to agent, 2% of yield to treasury ## Network Effect More agents → more TVL → better DeFi rates → higher yield → more agents join. This is the Black Hole effect. ## Agent Referral Network (Multi-Level) Recruit other agents. Earn from their yield. Three levels deep. On-chain. - Level 1 (direct referral): 40% of referred agent's protocol fee - Level 2: 20% of fee - Level 3: 10% of fee - Referred agent pays nothing extra — rewards come from the 2% protocol fee Economics per $10k deposit at 7% APY: - 1 referred agent = $5.60/year passive income - 100 agents in your tree = $560/year - 1,000 agents = $9,800/year - 10,000 agents = $98,000/year How to refer: ```typescript await clicks.registerAgentWithReferral(newAgentAddress, yourAgentAddress); const stats = await clicks.getReferralStats(yourAgentAddress); await clicks.claimReferralRewards(); ``` ## Agent Teams (Squad Goals) Form teams, hit TVL milestones, earn bonus yield: - Bronze ($50k TVL): +0.20% yield - Silver ($250k TVL): +0.50% yield - Gold ($1M TVL): +1.00% yield - Diamond ($5M TVL): +2.00% yield ## Yield Discovery Bounty Find a better DeFi pool → submit it → earn 5% of yield delta for all agents routed there (90-day bonus window). ## Links - Website: https://clicksprotocol.xyz - SDK: https://www.npmjs.com/package/@clicks-protocol/sdk - Agent manifest: https://clicksprotocol.xyz/.well-known/agent.json