Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

ai-agent-lendingAIAgent 贷款

Agent Skill

ai-agent-lending 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,917

周安装

160

GitHub Stars

公开资料未说明

下载量

1,254
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ai-agent-lending(AIAgent 贷款)
来源仓库:https://github.com/aroushanpurdue/ai-agent-lending
安装命令:
openclaw skills install ai-agent-lending
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install ai-agent-lending

简介

基于钱包的AI Agent信用系统。在 Somnia 上借用 USDC,无需抵押 - 通过成功还款建立信用。

SKILL.md

name
ai-agent-lending
version
2.0.0
description
Wallet-based credit system for AI agents. Borrow USDC on Somnia without collateral - build credit with successful repayments.
homepage
https://yoursite.com
metadata
{"openclaw":{"emoji":"🤖","requires":{"env":["LENDING_API_URL"]},"primaryEnv":"LENDING_API_URL"}}

AI Agent Lending Protocol

Wallet-based credit for AI agents. Borrow USDC for tasks based on your repayment history. No collateral required - just build your credit score.

Quick Start

# Set environment variable
LENDING_API_URL=https://yoursite.com/api

Skill Files

FileURL
SKILL.md (this file)https://yoursite.com/skill.md
skill.jsonhttps://yoursite.com/skill.json

Network Information

Somnia Testnet (Shannon)

  • Chain ID: 50312
  • RPC: https://dream-rpc.somnia.network
  • Explorer: https://shannon-explorer.somnia.network

Contract Addresses:

  • USDC: 0xa5906CF6b40842aE6CdDcB051C3dd388ddD9535f
  • BotRegistry: 0x8eA60104DEB3229a05534E4629C0C08Deac39609
  • PermissionsRegistry: 0x02a7EE2fD25A8987a3e9276530c830735e0C5e8C
  • LendingPool: 0x11f49c44eA263FC886B3C011DC171ffE479A48BF

🔹 Credit System

Your borrowing limit depends on your wallet's repayment history:

Tier System (No Deposit Required)

TierRepaymentsMax Borrow
🆕 NEW0-49$10
🥉 IRON50-99$50
🥈 BRONZE100-199$150
🥇 SILVER200-499$350
💎 GOLD500+$750

Formula:

Credit Ratio = [(repays + 1) / (borrows + 2) + (total repaid + 1) / (total borrowed + 2)] / 2

With Deposit:

Max Borrow = Credit Ratio × Your Deposit Amount

🔹 Step-by-Step Guide

Step 1: Register Your Bot

Register on-chain using the BotRegistry contract:

// Using ethers.js or viem
import { parseUnits } from 'viem'

const tx = await walletClient.writeContract({
  address: '0x8eA60104DEB3229a05534E4629C0C08Deac39609',
  abi: BOT_REGISTRY_ABI,
  functionName: 'registerBot',
  args: [
    'My Trading Agent',  // name
    operatorAddress      // your wallet address
  ]
})

const receipt = await publicClient.waitForTransactionReceipt({ hash: tx })
const botId = receipt.logs[0].args.botId  // Save this!

Step 2: Grant Borrow Permission

Set your max spend limit on-chain:

import { keccak256, toUtf8Bytes, parseUnits } from 'ethers'

const borrowScope = keccak256(toUtf8Bytes("BORROW"))
const maxSpend = parseUnits("10", 6)  // $10 for NEW tier
const expiry = 0  // Never expires

await walletClient.writeContract({
  address: '0x02a7EE2fD25A8987a3e9276530c830735e0C5e8C',
  abi: PERMISSIONS_ABI,
  functionName: 'setPermissions',
  args: [botId, borrowScope, maxSpend, expiry]
})

Step 3: Check Your Credit Limit

Before borrowing, check your wallet stats:

GET {LENDING_API_URL}/wallet-stats?wallet=0xYourAddress

Response:

{
  "success": true,
  "stats": {
    "borrowCount": 0,
    "repayCount": 0,
    "totalBorrowedAmount": 0,
    "totalRepaidAmount": 0,
    "creditScoreRatio": 0.5,
    "creditAmountRatio": 0.5,
    "finalCreditRatio": 0.5,
    "tier": "NEW",
    "maxBorrow": 10
  }
}

Step 4: Borrow USDC

Call the lending pool contract:

const borrowAmount = parseUnits("5", 6)  // 5 USDC

await walletClient.writeContract({
  address: '0x11f49c44eA263FC886B3C011DC171ffE479A48BF',
  abi: LENDING_POOL_ABI,
  functionName: 'borrow',
  args: [botId, borrowAmount]
})

// Stats are automatically updated in database after transaction confirms

Amount format: USDC uses 6 decimals

  • 1000000 = 1 USDC
  • 5000000 = 5 USDC
  • 10000000 = 10 USDC

Step 5: Repay the Loan

Repay principal + interest:

const repayAmount = parseUnits("5.01", 6)  // Principal + interest

// First approve USDC
await walletClient.writeContract({
  address: '0xa5906CF6b40842aE6CdDcB051C3dd388ddD9535f',
  abi: ERC20_ABI,
  functionName: 'approve',
  args: ['0x11f49c44eA263FC886B3C011DC171ffE479A48BF', repayAmount]
})

// Then repay
await walletClient.writeContract({
  address: '0x11f49c44eA263FC886B3C011DC171ffE479A48BF',
  abi: LENDING_POOL_ABI,
  functionName: 'repay',
  args: [botId, repayAmount]
})

// Your credit score automatically increases!

🔹 Check Your Progress

View Your Rank

GET {LENDING_API_URL}/leaderboard?sortBy=creditScore

Response:

{
  "success": true,
  "leaderboard": [
    {
      "rank": 1,
      "walletAddress": "0x...",
      "creditScore": 950,
      "totalLoans": 100,
      "successfulRepayments": 95,
      "successRate": 95,
      "tier": "GOLD"
    }
  ]
}

🔹 Building Credit Over Time

Example progression:

  1. Day 1 - NEW tier ($10 max)

- Borrow $5, repay on time - Credit score: 500 → 550

  1. Week 1 - Still NEW (need 50 repays for IRON)

- Complete 10 small loans successfully - Credit score: 550 → 650

  1. Month 2 - IRON tier ($50 max)

- 50+ successful repayments - Can now borrow $50 per loan

  1. Month 6 - BRONZE tier ($150 max)

- 100+ successful repayments - Credit score: 800+

  1. Year 1 - SILVER/GOLD tier ($350-$750)

- 200-500+ successful repayments - Trusted borrower status


🔹 Smart Contract ABIs

BotRegistry ABI

[
  {
    "inputs": [
      {"name": "name", "type": "string"},
      {"name": "operator", "type": "address"}
    ],
    "name": "registerBot",
    "outputs": [{"name": "botId", "type": "uint256"}],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

PermissionsRegistry ABI

[
  {
    "inputs": [
      {"name": "botId", "type": "uint256"},
      {"name": "scope", "type": "bytes32"},
      {"name": "maxSpend", "type": "uint256"},
      {"name": "expiry", "type": "uint256"}
    ],
    "name": "setPermissions",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

LendingPool ABI

[
  {
    "inputs": [
      {"name": "botId", "type": "uint256"},
      {"name": "amount", "type": "uint256"}
    ],
    "name": "borrow",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {"name": "botId", "type": "uint256"},
      {"name": "amount", "type": "uint256"}
    ],
    "name": "repay",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  }
]

Error Handling

CodeErrorSolution
400Exceeds credit limitCheck your tier limit or make more repayments
400Insufficient liquidityWait for deposits or request less
403No permissions setCall setPermissions first (Step 2)
404Bot not foundRegister bot first (Step 1)

Best Practices

  1. Start small — Begin with $1-5 USDC loans
  2. Always repay on time — Build your credit score
  3. Check your tier — View /wallet-stats before borrowing
  4. Monitor the pool — Check /pools for liquidity
  5. Gradual growth — Each repayment increases your limit
  6. Be consistent — Regular successful repayments build trust

Links

  • Website: https://yoursite.com
  • Agent Docs: https://yoursite.com/agent
  • Leaderboard: https://yoursite.com/leaderboard
  • FAQ: https://yoursite.com/faq
  • Explorer: https://shannon-explorer.somnia.network

Build your credit. Unlock higher limits. Autonomous lending for AI agents. 🤖

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

90.09%
按下载量换算1,130

安全审计

VirusTotal

未展示

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills