XPR Lending (LOAN Protocol)
by @paulgnz
Interact with LOAN Protocol on XPR Network to supply assets, borrow against collateral, redeem, repay loans, and claim LOAN token rewards on mainnet.
clawhub install xpr-lendingπ About This Skill
name: lending description: LOAN Protocol lending and borrowing on XPR Network (lending.loan contract)
LOAN Protocol (Metal X Lending)
You have tools to interact with the LOAN Protocol on XPR Network β a Compound-style pooled lending protocol at lending.loan. Users supply assets to earn interest and borrow against their collateral.
IMPORTANT: LOAN Protocol is mainnet only. There is no testnet deployment. All lending tools operate on mainnet.
Key Concepts
Available Markets
14 active markets including: XUSDC, XBTC, XETH, XPR, XMT, XDOGE, XLTC, XXRP, XSOL, XXLM, XADA, XHBAR, XUSDT, XMD.
Read-Only Tools (safe, no signing)
loan_list_markets β list all lending markets with utilization, reserves, interest models, and collateral factorsloan_get_market β get detailed info for a specific market by L-token symbol (e.g. "LBTC")loan_get_user_positions β get a user's supply (L-token shares) and borrow positions across all marketsloan_get_user_rewards β get a user's unclaimed LOAN rewards per marketloan_get_config β get global lending config (oracle, close factor, liquidation incentive)loan_get_market_apy β get historical deposit/borrow APY including LOAN rewards (7d, 30d, 90d) from Metal X APIloan_get_market_tvl β get historical TVL (total value locked) in USD with utilization ratio (7d, 30d, 90d)Write Tools (require confirmed: true)
All write operations require explicit confirmation. For supply and repay, the tool builds a token transfer to lending.loan. For borrow/redeem/withdraw, it calls the lending contract directly.
loan_enter_markets β enter markets to enable lending/borrowing (must do this first)loan_exit_markets β exit markets (only if no outstanding positions)loan_supply β supply underlying tokens to earn interest (transfers to lending.loan with "mint" memo)loan_borrow β borrow underlying tokens against deposited collateralloan_repay β repay variable or stable borrows (transfers to lending.loan with "repay" memo)loan_redeem β redeem L-tokens for underlying tokens (burns deposited shares)loan_withdraw_collateral β withdraw L-tokens from collateral (reduces borrowing capacity)loan_claim_rewards β claim accrued LOAN token rewardsTypical User Flow
1. Enter markets β loan_enter_markets with the market symbols you want to use
2. Supply β loan_supply underlying tokens (e.g. 1.0 XBTC) β auto-mints LBTC and deposits as collateral
3. Borrow β loan_borrow against collateral (e.g. borrow 500 XUSDC using LBTC collateral)
4. Repay β loan_repay when ready to pay back the loan
5. Redeem β loan_redeem to withdraw your original tokens + earned interest
6. Claim β loan_claim_rewards to claim any LOAN token rewards
Safety Rules
confirmed: true β present the details first and ask for confirmation