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
| Task | File |
|---|---|
| Contract addresses, RPC and API endpoints, hub ids, spoke ids, listed markets and their token contracts | addresses.md (generated from configs/) |
| Portfolio balances, prices, APYs, and missing values | SDK reads |
| Full repay / withdraw sizing and share rounding | math.md |
| Health factor, LTV weights | math.md |
| Borrow curve, deposit rate, APR vs APY | math.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
u64account 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
- Resolve the network and contract addresses from addresses.md or live configuration.
- Select the exact spoke, hub, and token contract.
- Load the task skill and its required reference.
- Check units and rounding in math.md when arithmetic affects the action.
- Build the transaction with integer arithmetic.
- Verify the required authorization.
- Simulate the exact transaction before requesting a signature.
- 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.