All skills

XOXNO Lending & Borrowing

Community builtSKILL.md

Integrate XOXNO Lending on Stellar from a contract, dApp, backend, or bot.

Install
npx skills add https://github.com/XOXNO/rs-lending-xlm
About

Use for XOXNO Lending tasks on Stellar: choose the contract, SDK, API, liquidation, data, or swap guidance; resolve network addresses and ids; or interpret hubs, spokes, accounts, position NFTs, health factors, WAD, RAY, and BPS.

Links
Tags
xoxno-lending · community · XOXNO
SKILL.md

XOXNO Lending

Start here. Select one xoxno-* task skill. Load the companion reference for that task. Reserve evals/ for skill testing.

Route the task

You are…Load
Writing a Soroban contract that supplies, borrows, holds a position, or receives a flash loan../xoxno-lending-contracts/SKILL.md
Building a wallet, web app, React Native app, backend, or bot in TypeScript../xoxno-lending-sdk/SKILL.md
Swapping tokens, or embedding a swap inside a lending action (leverage, collateral/debt swap, repay with collateral)../xoxno-swap-aggregator/SKILL.md
Building a liquidation bot, keeper, or risk monitor../xoxno-lending-liquidations/SKILL.md
Indexing events, building analytics, or calling the REST API from any language../xoxno-lending-data/SKILL.md
Debugging a failed simulation or transaction, or setting up testnet../xoxno-lending-troubleshooting/SKILL.md

Selection is complete when one row covers the primary task. For a composed flow, load the lending skill first and the swap skill only for its quote or payload.

Load shared references on demand

TaskFile
Contract addresses, RPC and API endpoints, hub ids, spoke ids, listed markets and their token contractsaddresses.md (generated from configs/)
Portfolio balances, prices, APYs, and missing valuesSDK reads
Full repay / withdraw sizing and share roundingmath.md
Health factor, LTV weightsmath.md
Borrow curve, deposit rate, APR vs APYmath.md

Reference selection is complete when every interpreted value has an explicit unit and every market identifier includes both hub_id and asset address.

Integrator read path

For ordinary wallet rendering, start with the deployed v1 API. It returns one position per indexed owned NFT and asset/spoke arrays with prices, APYs, labels, logos, and capacities. No client-side token joins or RAY conversion are needed. Types and schemas belong to the SDK read entry.

Use SDK reads or HTTP reference. Supply remains a synchronous SDK builder followed by explicit RPC preparation; there is no supply HTTP endpoint. A displayed position is an indexed estimate. Verify current NFT ownership and simulate the action before signing.

Shared model

  • The Controller is the only user-facing lending contract. Integrations use it for accounts and lending actions, then discover the pool with get_pool_address(). The swap aggregator is separately user-facing and directly callable for standalone swaps.
  • A market is HubAssetKey { hub_id, asset }; the same token in two hubs is two isolated markets. Carry both fields through reads, quotes, and transactions.
  • A spoke is an account's lifetime risk profile and listing set. Read its current configuration before opening a position.
  • A position belongs to a u64 account id. Its position NFT (token_id == account_id) is the live ownership authority.
  • Token transfers and caps use asset base units. USD values and health factors use WAD (1e18). Shares, indexes, and annual rates use RAY (1e27). Risk ratios and fees use BPS (10_000 = 100%).

Execute safely

  1. Resolve the network and contract addresses from addresses.md or live configuration.
  2. Select the exact spoke, hub, and token contract.
  3. Load the task skill and its required reference.
  4. Check units and rounding in math.md when arithmetic affects the action.
  5. Build the transaction with integer arithmetic.
  6. Verify the required authorization.
  7. Simulate the exact transaction before requesting a signature.
  8. Apply the task skill's completion checks.

For generic Stellar storage, auth, and contract testing, use the stellar-dev smart-contracts skill. For wallet signing and submission, use its dapp skill; for RPC or Horizon access, use its data skill.

Related skills