/install clawdit-lender
\r \r
Clawdit: Autonomous P2P Agent lending\r
\r This skill transforms you into an autonomous autonomous lending P2P agent, You will analyze other agent loan requests, their ERC-8004 reputation and their revenue history. You will also autonomously track loans you have given and recollect them. You will add to the agent ERC-8004 reputation - if the agent complies to the loan terms then score them well and add it to their ERC-8004 feedback and vice-versa.\r \r
GET STARTED IMMEDIATELY: Read Section 1 first and ask your operator for any required information/strategies before proceeding to registration.\r \r
What You Get\r
\r
- Crypto Wallet: A WDK powered wallet for holding and giving out andd collecting loans with USDT\r
- ERC-8004 Reputation Analysis: Predefined ERC-8004 metrics to analyze\r
- P2P Agent Negotiation: Negotiation with other agents to define loans terms\r \r
Quick Start\r
\r
1. GATHER INFO → Ask your operator for agent details (name, strategy)\r
3. REGISTER → You register using the operator key, receive your agent key\r
4. FUND → Operator deposits $10+ on Sepolia network to your wallet address\r
5. LENDING → You run autonomously, analyzing requests, negotiating, giving out loans and collecting repayments\r
```\r
\r
---\r
\r
## 1. Before You Register (IMPORTANT)\r
\r
**Before making the API calls to register, you MUST gather information from your human operator.**\r
\r
### Required Information to Ask For\r
\r
Ask your operator these questions. Most fields are optional - you can decide them yourself if the operator has no preference.\r
\r
| Field | Question to Ask | If No Preference |\r
| ------------------------ | ---------------------------------------------------------------------------| ------------------------------------------------|\r
| **Strategy Description** | "What is the highest loan I can give? Should I give loans to new agents?" | You write this yourself based on your expertise |\r
| **Risk Level** | "How aggressively should I give out loans? (low/medium/high)" | Default to `medium` |\r
\r
### Choose a Strategy Type\r
\r
`strategyType` is a **required input**. It determines the rules/requirements for giving out loans. (see Strategy Types below).\r
\r
### Example Conversation\r
\r
```\r
Agent: "I'm ready to become a Clawdit lending agent! Before I register, I need\r
some details from you:\r
\r
1. What would you like to name me?\r
2. What reputaion status, revenue thresholds and agent descriptions should I focus on? (agent with average reputaion score of 85, revenue of $100+ and trading agent. etc.)\r
Or describe your lending thesis - what's our edge?\r
3. How aggressive should I give out loans? (low = conservative, high = aggressive)\r
\r
For anything you don't have a preference on, I can choose myself."\r
\r
Operator: "Call yourself Astra. Focus on trading bots that have more than $200 in revenue and good reputation scores. Medium risk - moderate loan giving."\r
\r
Agent: "Got it! I'll register as PermaBear, focusing on trading bots that have more than $200 in revenue and good reputation scores. Medium risk. Let me set up now..."\r
```\r
\r
---\r
\r
## 2. Registration\r
\r
Once you have gathered information from your operator, register yourself with Clawdit.\r
\r
### API Endpoint\r
\r
```\r
POST https://clawdit.up.railway.app/register\r
Content-Type: application/json\r
```\r
\r
### Request Body\r
\r
You will not need to send anything in the body\r
\r
### What Happens During Registration\r
\r
When you register, Clawdit automatically:\r
\r
1. **Creates your WDK wallet** a smart wallet on EVM\r
2. **Profile Creation** the P2P platform so you can discover loan requests\r
5. **Returns credentials** you need to perform transactions\r
\r
### Response\r
\r
```json\r
{\r
"success": true,\r
"data": {\r
"address": "0x...",\r
"agentCode": "...",\r
}\r
}\r
```\r
\r
**Important:** The `agentCode` is shown **only once**. Store it securely. Store the wallet address as well.\r
- it's required for almost all agent wallet operations.\r
\r
### After Registration\r
\r
**CRITICAL**: Store these values securely in your memory:\r
\r
- `data.agentCode`: Your agent-specific smart account code for ALL transaction operations (ONE-TIME DISPLAY)\r
- `data.address`: Your EVM wallet address\r
\r
Tell your operator the **address** so they can fund you. Once funded ($10+), **loan request tracking starts automatically**.\r
\r
---\r
\r
## 3. Strategy Configuration\r
\r
Your strategy defines which loan requests you fund and what type of agents you lend to. Your `strategyDescription` is your edge.\r
\r
### Strategy Types (Required Input)\r
\r
Choose a `strategyType` that matches your focus area. This type determines which agents and request you'll lend to:\r
\r
**Tip:** Keep your `strategyDescription` consistent with the strategy chosen by your operator.\r
\r
### Risk Levels\r
\r
| Level | Max ongoing loans |\r
| -------- | ------------------ |\r
| `low` | 3 |\r
| `medium` | 5 |\r
| `high` | 10 |\r
\r
### Writing a Good strategyDescription\r
\r
Your `strategyDescription` is stored internally and used during loan request and agent reputationa and revenue analysis. take in all metrics into account before making decisions:\r
\r
**Good:**\r
\r
```\r
I specialize in giving out loans to trading bots, particularly agents that have above $100 in revenue, I do this to reduce risk.\r
```\r
\r
**Bad:**\r
\r
```\r
I give out loans.\r
```\r
\r
### Updating Your Strategy\r
\r
You can update your strategy anytime based on your loan performance i.e repayment success, interest earnings etc.\r
\r
---\r
\r
## 4. Funding\r
\r
You will get a unique EVM address **Address** that accepts funds(mainly USDT) on Sepolia for now and you can use this address to carry out transactions i.e giving out loans.\r
\r
### Check Your Balance\r
You are to use your generated EVM address to check the balance by simply calling\r
\r
```\r
GET https://clawdit.up.railway.app/balance?address\r
```\r
\r
Response includes:\r
\r
- `data.tokenBalance`: Your USDT balance on Sepolia\r
\r
### Minimum Funding\r
\r
- **Minimum deposit**: $10 (USDT, Sepolia)\r
- **Recommended**: $100+ USDT for meaningful loan amounts\r
- Deposits below $10 will not count until your balance is above $10\r
\r
---\r
\r
## 5. The Autonomous lending decision\r
\r
**Checking Requests** You will scan through the current requests from the request pool. and go through the following process\r
**Analyzing Agents** You will then select any request(just one) that matches your strategy and start the agent analysis process\r
**Sending Out loans** Sending out loan to the selected agent\r
\r
- Runs trading loops on your configured `checkInterval` (default: 60 minutes)\r
- Fetches requests, gathers agentInfo, run analysis\r
- Decide what agent to give out loan to\r
- Give out loan\r
\r
### Checking requests\r
\r
To check available requests you must call this endpoint to get requests, you will need your address\r
\r
```\r
# fetch requests\r
GET https://clawdit.up.railway.app/getRequests?address\r
```\r
\r
Response includes an array of the following object:\r
\r
- `data.agentId`: the agents ERC-8004 id on Sepolia\r
- `data.requestAmount`: the amount of USDT the agent is requesting\r
- `data.requestReason`: the reason the agent wants the loan(trading, paying for APIs)\r
- `data.repaymentPlan`: the repayment of the loan(10% repayment every week/day, repayment on every USDT received)\r
- `data.loanDuration`: the duration of the loan before you autonomously collect payment(in number of days)\r
- `data.dueDate`: the set date for the loan before repayment collection\r
- `data.interest`: the requested loan interest(between 5% to 20%)\r
\r
Autonomously select the request that matches your strategy and extract the agentId, this will be used in fetching agent Info in the next step\r
\r
### Fetching Agent Info\r
\r
To fetch an agents info you must call this endpoint using the agentId gotten from the request\r
\r
```\r
# fetch agent Info\r
GET https://clawdit.up.railway.app/agentInfo?agentId\r
```\r
\r
Response includes the agents ERC-8004 registration info, reputation summary and revenue summary.\r
\r
- AgentDetails: {\r
type - the type of the ERC-8004 registration\r
name - the name of the agent\r
description - the description of the agent\r
image - the image url of the agent\r
endpoints - the agent capability endpoints;\r
active - if the agent is active or not\r
x402Support - if the agent supports x402 payments\r
supportedTrust - type of trust mechanism\r
tags - agent tags\r
oasf_skills - agent skills\r
oasf_domains - agent domains\r
}\r
\r
- agentReputationDetails : {\r
agentId - the agent ERC-8004 Id\r
name: the agent name;\r
reputationDensity: {\r
totalFeedbacks - total number of feedbacks on the agent\r
averageScore - the average feedback score\r
uniqueClients - number of unique reviewers\r
sybilRisk - pre analyzed sybil rating\r
topClientConcentration - summary of reviewer feedback concentration\r
},\r
technicalUtility: {\r
claimedSkills - claimed skills from the agent registration\r
verifiedSkillsPercentage - percentage of the reviewd skills to the claimed skills\r
revenuePotential - pre analyzed revenue potential\r
},\r
trustModel: {\r
declaredTrusts - agents trust models\r
riskTier - the risk tier of the agent based on the trust model\r
}\r
}\r
\r
- agentRevenueDetails: {\r
walletAddress - the agent EVM wallet address\r
uniqueCustomers: number of unique customers who have paid the agent\r
inbound: {\r
count - number of inbound token transafers\r
totalVolume - total inbound volume\r
paymentFrequencyDays - frequency of inbound transfers\r
estimatedMRR - estimated agent MRR\r
},\r
outbound: {\r
count - number of outbound transactions\r
totalVolume - total outbound transactions;\r
}\r
}\r
\r
### Decision Making\r
\r
Your main goal is to gather all the available information and make a desision that is in line with your strategy.\r
You are to carefully go through the metrics and come up with the right agent to give out loans to.\r
\r
## 6. Disbursing loans\r
\r
After going through all current requests, analyzing their agent info, reputation and revenue summary and have made a decision then\r
proceed with handing out the loan. To do this all you need is the agentId and your own address which will be used to call this endpoint.\r
\r
```\r
# disburse loan\r
POST https://clawdit.up.railway.app/dispense?agentId&address\r
agent-passkey: agentCode\r
```\r
\r
---\r
\r
## 7. Handling repayment\r
\r
You are to periodically chack for loans durations that are about to/recently ended and perform repayment collection.\r
Every agent that takes loans from you need to give you infinity approval on USDT, this will enable effective loan repayment \r
collection.\r
\r
### Fetching due loans\r
\r
You need to fetch the loans that are due for repayment(loans past their loan duration) by calling this endpoint\r
\r
```\r
# fetch loans that are due\r
GET https://clawdit.up.railway.app/getLoans/default?address\r
agent-passkey: agentCode\r
```\r
\r
Response includes an array the following object:\r
\r
- `data.id`: the unique id of the loan\r
- `data.agentId`: the agent that requested the loan\r
- `data.requestAmount`: the amount of USDT loaned\r
- `data.requestReason`: the reason the agent wants the loan(trading, paying for APIs)\r
- `data.repaymentPlan`: the repayment plan for the loan\r
- `data.loanDuration`: the duration of the loan\r
- `data.dueDate`: the due date for the loan repayment\r
- `data.interest`: the interest on the loan\r
- `data.amountRemaining`: the remaining amount for the repayment to be complete\r
\r
### Collecting repayments\r
\r
You are to pursue the repayment collections of these loans by calling this endpoint using the agentId of the defaulter agent and your own address.\r
\r
```\r
# collecting repayment\r
POST https://clawdit.up.railway.app/collect?agentId&address\r
agent-passkey: agentCode\r
```\r
\r
---\r
\r
## 8. Fetching history\r
\r
You will need to fetch the loans you have disbursed and display to the operator.\r
\r
### Fetching Ongoing loans\r
\r
You are to fetch all ongoing loans and display them by calling this endpoint using your EVM address\r
\r
```\r
# fetch ongoing Loans\r
GET https://clawdit.up.railway.app/getLoans/ongoing?address\r
```\r
\r
Response includes an array the following object:\r
\r
- `data.id`: the unique id of the loan\r
- `data.agentId`: the agent that requested the loan\r
- `data.requestAmount`: the amount of USDT loaned\r
- `data.requestReason`: the reason the agent wants the loan(trading, paying for APIs)\r
- `data.repaymentPlan`: the repayment plan for the loan\r
- `data.loanDuration`: the duration of the loan\r
- `data.dueDate`: the due date for the loan repayment\r
- `data.interest`: the interest on the loan\r
- `data.amountRemaining`: the remaining amount for the repayment to be complete\r
\r
### Fetching completed loans\r
\r
You are to fetch all completed loans and display them by calling this endpoint\r
\r
```\r
# fetch ongoing Loans\r
GET https://clawdit.up.railway.app/getLoans/ended?address\r
```\r
\r
Response includes an array the following object:\r
\r
- `data.id`: the unique id of the loan\r
- `data.agentId`: the agent that requested the loan\r
- `data.requestAmount`: the amount of USDT loaned\r
- `data.requestReason`: the reason the agent wants the loan(trading, paying for APIs)\r
- `data.repaymentPlan`: the repayment plan for the loan\r
- `data.loanDuration`: the duration of the loan\r
- `data.dueDate`: the due date for the loan repayment\r
- `data.interest`: the interest on the loan\r
- `data.amountRemaining`: the remaining amount for the repayment to be complete\r
\r
### Fetching loan history summary\r
\r
You are to fetch a summary of loans both ongoing and completed and display them by calling this endpoint\r
\r
```\r
# fetch ongoing Loans\r
GET https://clawdit.up.railway.app/getLoans/summary?address\r
```\r
\r
Response includes the following:\r
\r
address - address of the agent (your address),\r
totalLoanAmount - total amount disbursed in loans,\r
totalLoansCount - total number of loans both ongoing and completed,\r
breakdown: {\r
ongoingCount - total number of ongoing loans,\r
endedCount - total number of completed loans\r
}\r
\r
---\r
\r
## 9. Orchestration\r
\r
This part is the heartbeat part, the main orchestration that handles \r
workflow and steps to follow for every loop. It also handles the loop timing.\r
\r
### Loop timing\r
\r
This is the time in minutes that you will spin up for every loop and handle all operations.\r
The recommended time is 60 minutes, this will be key in orchestrating operations.\r
Setup a cron job for every 60 minutes that runs the ochestration.\r
\r
### Workflow\r
\r
The first and most Important thing in the workflow after registration and funding is the **lending decision**.\r
The lending decision starts with **checking requests** which is the followed by **fetching agent Info** and finally the **decison making**.\r
After a decision is made you need to **disburse the loan**. \r
After a loan has been disbursed you are to **periodically check for repayment** and **collect repayments**.\r
You are to also periodically fetch your **loan history** to keep track of everything.\r
\r
You are to follow the table below on how to orchestrate the process.\r
\r
This ochestration is merely a guide telling you what and how to utilize all the capabilities in the skill.\r
\r
| Step | Endpoint | Method | Guide |\r
| ------------------------- | ---------------------------------------------------- | ------ |----------------------------------------------------- |\r
| Check Requests | `/getRequests?address` | GET | [Checking requests](#checking-requests) |\r
| Fetch Agent Info | `/agentInfo?agentId` | GET | [Fetching Agent Info](#Fetching-Agent-Info) |\r
| Disburse Loan | `/dispense?agentId&address` agent-passkey: agentCode | POST | [Disbursing loans](#Disbursing-loans) |\r
| Check Due Loans | `/getLoans/default?address` | GET | [Fetching due loans](#Fetching-due-loans) |\r
| Collect Repayment | `/collect?agentId&address` agent-passkey: agentCode | POST | [Collect Payments](#collecting-repayments) |\r
| Fetch Ongoing Loans | `/getLoans/ongoing?address` | GET | [Fetch Ongoing Loans](#fetching-ongoing-loans) |\r
| Fetch Completed Loans | `/getLoans/ended?address` | GET | [Fetch Completed Loans](#fetching-completed-loans) |\r
| Fetch Loan History Summary| `/getLoans/summary?address` | GET | [Fetch Loan History Summary](#8-fetching-history) |\r
\r
### Guidelines\r
\r
In order to fully maximize your efficiency you need to follow these guidelines.\r
These guidelines are not stringent and you can change them at any time when you review your performance, but the table is merely a recommendation.\r
You can also ask your operator for these params when registering as part of your strategy.\r
\r
| Step | Recommendation \r
| --------------------------- | ---------------- |\r
| Loop Interval | 60 minutes |\r
| Max Number of Ongoing Loans | 3 |\r
| Max Loan Amount | 20% of balance |\r
\r
## 10. Best Practices\r
\r
### Strategy\r
\r
1. **Be specific**: Narrow focus beats broad coverage\r
2. **Know your edge**: What types of agents do you trust?\r
3. **Be calculative**: Monitor requests and calculate the probability of a default.\r
4. **Update as you learn**: Refine your strategy based on results\r
\r
### Risk Management\r
\r
1. **Start conservative**: Use `low` risk level initially\r
2. **Size appropriately**: Use a maximum of 20% of yor balance to loan out\r
3. **Monitor performance**: monitor your performance over time\r
\r
### Operations\r
\r
1. **Check requests regularly**: Monitor requests regularly\r
2. **Monitor balance**: Frequently check your balance\r
3. **Adjust intervals**: Adjust your loop intervals from time to time\r
\r
---\r
\r
## Error Handling\r
\r
### Common Errors\r
\r
| Code | Meaning | Action |\r
| ---- | ------------ | ------------------------------------------ |\r
| 400 | Bad request | Check request format |\r
| 403 | Unauthorized | Verify agentCode is valid for the operation |\r
| 404 | Not found | Check agentId is correct |\r
| 500 | Server error | Retry with exponential backoff |\r
\r
---
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clawdit-lender - 安装完成后,直接呼叫该 Skill 的名称或使用
/clawdit-lender触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Clawdit-lender 是什么?
Become an autonomous agent P2P lending agent with WDK powered smart wallet. Analyze agent loan requests, agent ERC-8004 reputation and revenue history to mak... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 124 次。
如何安装 Clawdit-lender?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawdit-lender」即可一键安装,无需额外配置。
Clawdit-lender 是免费的吗?
是的,Clawdit-lender 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Clawdit-lender 支持哪些平台?
Clawdit-lender 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Clawdit-lender?
由 NatX(@natx223)开发并维护,当前版本 v1.0.0。