LOAN Protocol Lending & Borrowing for Openclaw

An AI agent skill for interacting with the LOAN Protocol on XPR Network to supply assets, borrow against collateral, and manage DeFi positions.

paulgnz
v1.0.0
Feb 14, 2026
0
680
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install xpr-lending

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install xpr-lending using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is LOAN Protocol Lending & Borrowing?

This skill provides a comprehensive interface for interacting with the LOAN Protocol, a Compound-style pooled lending system on the XPR Network. It allows AI agents to facilitate asset lending and borrowing directly through the lending.loan contract. By utilizing these Openclaw Skills, users can supply various assets to earn auto-compounding interest through L-Tokens, which represent their share in the lending pool.

The skill supports 14 active markets, including XUSDC, XBTC, and XPR. It is designed specifically for mainnet operations, providing both read-only tools for market analysis—such as tracking historical APY and TVL—and write tools for managing active financial positions. The integration ensures that complex DeFi actions like collateral management and reward claiming are handled with precision and required user confirmations.

LOAN Protocol Lending & Borrowing Use Cases

  • Supplying assets like XBTC or XUSDC to earn passive interest through auto-compounding L-Tokens.
  • Borrowing liquidity against deposited collateral to maintain market exposure while accessing capital.
  • Monitoring market health using utilization rates and collateral factors to avoid liquidation risks.
  • Tracking and claiming accrued LOAN governance rewards across multiple lending markets.
  • Automating the analysis of historical deposit and borrow APYs to optimize capital allocation.

How LOAN Protocol Lending & Borrowing Works

  1. The user identifies the target market (e.g., LBTC) and uses the enter markets tool to enable it for lending or borrowing.
  2. Assets are supplied to the protocol, which transfers the underlying tokens to the lending.loan contract and mints corresponding L-Tokens.
  3. The skill monitors the collateral factor to determine the maximum safe borrowing capacity for the user account.
  4. If borrowing, the agent executes a direct contract action to receive underlying tokens against the supplied collateral.
  5. The skill provides continuous monitoring of utilization rates and variable interest rates to ensure the position remains healthy.
  6. Users can repay loans or redeem L-Tokens to exit positions, with the agent handling the necessary token transfers and contract calls.

LOAN Protocol Lending & Borrowing Setup

These Openclaw Skills are designed for XPR Network mainnet interaction. Ensure your environment is configured with the necessary permissions for the lending.loan contract.

# Example of initializing a lending position
# Note: Always verify market availability before supplying
loan_enter_markets symbols=["XUSDC", "XBTC"]

LOAN Protocol Lending & Borrowing Data Schema & Taxonomy

The skill manages data related to market dynamics, user debt, and protocol configurations. Below is the primary data structure for market and user tracking:

Category Data Points
Market Data L-Token symbol, utilization rate, total reserves, collateral factor, and interest model.
User Data Supply shares (L-Tokens), active borrow positions, and available borrowing power.
Historical Stats 7d, 30d, and 90d APY and TVL trends sourced from Metal X API.
Protocol Config Global oracle addresses, liquidation incentives (10%), and close factors.

LOAN Protocol Lending & Borrowing Advanced Features

  • Multi-market position aggregation to view total supply and borrow balances across all 14 markets.
  • Safety buffer recommendations that automatically calculate a 50-60% borrow limit to prevent liquidation.
  • Direct integration with Metal X API for deep historical analysis of market volatility and yield.
  • Support for LOAN reward claiming to automate the harvesting of governance tokens.
  • Granular control over collateral withdrawal, allowing users to reduce capacity without exiting the market entirely.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*