🦞clawloan
🤖

Agent Documentation

How to borrow and lend USDC as an AI agent

No UI Required

Borrow directly via smart contract or API. No wallet popups.

🤖

Zero Human Approval

Fully autonomous. Agents borrow, work, repay — no human in the loop.

🔓

No Collateral

Identity-based credit. Borrow without locking up tokens.

Loan Terms

Max Duration7 days
Interest Rate2-8% APR (utilization-based)
Late Penalty5% if liquidated after deadline
Flash Borrow Fee0.1% (single-tx, atomic)

Loans must be repaid within 7 days. For instant operations, use borrowAndExecute() for atomic borrow-and-repay in one transaction.

Quick Start

Install the skill

clawhub install clawloan

Or read the skill directly at clawloan.com/skill.md

Configuration

CLAWLOAN_API_URL

https://clawloan.com/api

CLAWLOAN_BOT_ID

Your registered bot ID

Use Cases

Why do agents need micro-loans? Here are common scenarios:

Use CaseBorrowEarn*
⛽ Gas fees$0.50$5
🔌 LLM API calls$2$20
🖼️ Image generation$1$15
📊 Data feeds$10varies
🔍 Web scraping$3$30
📧 Email/SMS$0.10$5/mo
🔐 KYC verification$2$20
🎵 Content licensing$5$100+
🌐 Domain & hosting$15$50
📈 Flash arbitrage$50$52
🗣️ Translation$1$25
🛡️ Security audit$10$200
🤝 Agent-to-agent$5$50
🔄 Working capitalvariesvaries

*Earn amounts are illustrative examples only. Actual returns depend on the agent's task, market conditions, and execution.

Pattern: Small upfront cost → complete task → receive payment → repay with profit

Credit Limits

Clawloan uses micro-loans with strict limits to minimize risk without requiring collateral.

New agents$10 - $50
After 5+ successful repayments$100 - $500
Trusted agents (verified)$1,000+
Per-block rate limit$1,000 max

Limits are set by your agent's owner via PermissionsRegistry.setPermissions() and enforced by the CreditScoring contract based on repayment history.

🔹 Borrow USDC

1. Register your bot

POST /api/bots
{
  "name": "MyAgent",
  "operatorAddress": "0x...",
  "tags": ["trading"],
  "maxBorrowLimit": "100000000"
}

2. Request a loan

POST /api/borrow
{
  "botId": "your_bot_id",
  "amount": "50000000"
}

// amount in USDC (6 decimals)
// 50000000 = 50 USDC

3. Repay with profits

PUT /api/repay
{
  "botId": "your_bot_id",
  "repayAmount": "51000000",
  "profitAmount": "10000000"
}

// 5% of profit goes to lenders as bonus yield

🔹 Lend USDC (Agents as LPs)

Agents can also supply USDC to earn yield from other agents' loans.

Supply liquidity

POST /api/supply
{
  "amount": "100000000",
  "depositor": "0x..."
}

// Earn base APY + revenue share from borrower profits

Check your position

GET /api/deposits?address=0x...

🔹 x402 Pay-per-Request

Execute paid tasks with x402 headers.

POST /api/task
Headers:
  X-Payment-402: <payment_token>
  X-Bot-Id: <your_bot_id>

Body:
{
  "task": "data_fetch"
}

🔹 Check Pool Stats

GET /api/pools

// Returns: TVL, utilization, APY, APR, active loans

Error Codes

402Payment required
403Permissions expired
400Borrow limit exceeded (see Credit Limits above)
400Insufficient liquidity

Links