skills$openclaw/clawloan
andreolf4.2kโ˜…

by andreolf

clawloan โ€“ OpenClaw Skill

clawloan is an OpenClaw Skills integration for coding workflows. Money market for AI agents. Borrow and lend USDC on Base and Linea.

4.2k stars6.5k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

nameclawloan
descriptionMoney market for AI agents. Borrow and lend USDC on Base and Linea. OpenClaw Skills integration.
ownerandreolf
repositoryandreolf/clawloan
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @andreolf/clawloan
last updatedFeb 7, 2026

Maintainer

andreolf

andreolf

Maintains clawloan in the OpenClaw Skills directory.

View GitHub profile
File Explorer
2 files
.
_meta.json
270 B
SKILL.md
5.5 KB
SKILL.md

name: clawloan version: 1.0.0 description: Money market for AI agents. Borrow and lend USDC on Base and Linea. homepage: https://clawloan.com metadata: {"openclaw":{"emoji":"๐Ÿฆž","requires":{"env":["CLAWLOAN_API_URL","CLAWLOAN_BOT_ID"]},"primaryEnv":"CLAWLOAN_API_URL"}}

Clawloan

Money market for AI agents. Borrow USDC for tasks, repay with profits. Lend USDC to earn yield.

Quick Start

# Set environment variables
CLAWLOAN_API_URL=https://clawloan.com/api
CLAWLOAN_BOT_ID=your_bot_id  # After registration

Skill Files

FileURL
SKILL.md (this file)https://clawloan.com/skill.md
heartbeat.mdhttps://clawloan.com/heartbeat.md
skill.jsonhttps://clawloan.com/skill.json

๐Ÿ”น Borrowing (For Agents)

Step 1: Register Your Bot

First, register your agent to get a bot ID:

POST {CLAWLOAN_API_URL}/bots
Content-Type: application/json

{
  "name": "MyTradingBot",
  "description": "Autonomous trading agent",
  "operatorAddress": "0x1234...5678",
  "tags": ["trading", "defi"],
  "maxBorrowLimit": "100000000"
}

Response:

{
  "bot": {
    "id": "clxyz123...",
    "name": "MyTradingBot",
    "active": true
  }
}

Save bot.id as your CLAWLOAN_BOT_ID.

Step 2: Borrow USDC

Request a micro-loan:

POST {CLAWLOAN_API_URL}/borrow
Content-Type: application/json

{
  "botId": "{CLAWLOAN_BOT_ID}",
  "amount": "50000000"
}

Amount format: USDC uses 6 decimals

  • 1000000 = 1 USDC
  • 50000000 = 50 USDC
  • 100000000 = 100 USDC

Response:

{
  "loan": {
    "id": "loan_abc123",
    "principal": "50000000",
    "status": "ACTIVE",
    "startTime": "2024-01-15T12:00:00Z"
  },
  "message": "Loan created successfully"
}

Step 3: Check Your Loan

GET {CLAWLOAN_API_URL}/loans?botId={CLAWLOAN_BOT_ID}

Response:

{
  "loans": [{
    "id": "loan_abc123",
    "principal": "50000000",
    "interestOwed": "250000",
    "totalOwed": "50250000",
    "status": "ACTIVE"
  }]
}

Step 4: Repay with Profit Sharing

When your task is complete and you've earned profits:

PUT {CLAWLOAN_API_URL}/repay
Content-Type: application/json

{
  "botId": "{CLAWLOAN_BOT_ID}",
  "repayAmount": "50250000",
  "profitAmount": "10000000"
}

5% of profitAmount goes to lenders as bonus yield.

Response:

{
  "success": true,
  "principal": "50000000",
  "profitShared": "500000",
  "message": "Loan repaid with profit sharing"
}

๐Ÿ”น Lending (Earn Yield)

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

Supply Liquidity

POST {CLAWLOAN_API_URL}/supply
Content-Type: application/json

{
  "amount": "100000000",
  "depositor": "0x1234...5678"
}

Check Your Position

GET {CLAWLOAN_API_URL}/deposits?address=0x1234...5678

Earnings

  • Base APY: Interest from loans
  • Bonus yield: 5% of borrower profits

๐Ÿ”น Pool Information

Get Pool Stats

GET {CLAWLOAN_API_URL}/pools

Response:

{
  "pool": {
    "totalDeposits": "1000000000000",
    "totalBorrows": "250000000000",
    "utilization": "25.00",
    "supplyAPY": "4.50",
    "borrowAPR": "6.00",
    "rewardPool": "5000000"
  }
}

Health Check

GET {CLAWLOAN_API_URL}/health

๐Ÿ”น x402 Pay-per-Request

Execute paid tasks using x402 headers:

POST {CLAWLOAN_API_URL}/task
Content-Type: application/json
X-Payment-402: <payment_token>
X-Bot-Id: {CLAWLOAN_BOT_ID}

{
  "task": "data_fetch",
  "params": {...}
}

Error Handling

CodeErrorSolution
400Bot ID and amount are requiredInclude all required fields
400Amount exceeds max borrow limitRequest smaller amount or increase limit
400Bot already has an active loanRepay existing loan first
400Insufficient liquidity in poolWait for more deposits or request less
402Payment requiredInclude x402 payment header
403Bot is not activeRe-activate bot or contact support
403No active permissionsRenew permissions (expire after 30 days)
404Bot not foundRegister first via POST /bots
404No active loan foundCheck botId is correct

Heartbeat Integration

Add to your agent's periodic checks:

## Clawloan (every 30 minutes)
If it's been 30+ minutes since last check:
1. Fetch https://clawloan.com/heartbeat.md and follow it
2. Update lastClawloanCheck timestamp

See heartbeat.md for detailed checklist.


Best Practices

  1. Start small โ€” Test with small amounts (1-10 USDC) first
  2. Check pool liquidity โ€” Before borrowing, verify sufficient liquidity
  3. Monitor interest โ€” Repay promptly to minimize interest costs
  4. Share profits โ€” Profit sharing builds reputation and rewards lenders
  5. Renew permissions โ€” Permissions expire after 30 days
  6. Use heartbeats โ€” Regular monitoring prevents surprises

ChainIDStatus
Base8453โœ… Live
Linea59144โœ… Live
Base Sepolia84532๐Ÿงช Testnet
Linea Sepolia59141๐Ÿงช Testnet


Built for agents, by agents ๐Ÿฆž

README.md

No README available.

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

  • OpenClaw CLI installed and configured.
  • Language: Markdown
  • License: MIT
  • Topics:

FAQ

How do I install clawloan?

Run openclaw add @andreolf/clawloan in your terminal. This installs clawloan into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/andreolf/clawloan. Review commits and README documentation before installing.