# Defi Lending

> Use this skill when the user wants to lend, borrow, or earn yield on Cardano. Triggers on: "lend ADA", "borrow", "supply liquidity", "earn APY", "lending pools", "what's the best APY", "Surf Finance", "FluidTokens", "collateral", "loan". Use defi-lending-operator to execute transactions.

- Skill: `flux-point-studios/defi-lending` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add flux-point-studios/defi-lending`
- Raw SKILL.md: https://api.skillmd.com/api/skills/flux-point-studios/defi-lending/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: flux-point-studios (https://skillmd.com/u/flux-point-studios)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/flux-point-studios/defi-lending

---


# Cardano DeFi Lending & Borrowing

Supply assets to earn yield or borrow against collateral via Surf Finance.

## Capabilities

- Browse lending pools with APY, APR, LTV, and available liquidity
- Supply assets to earn APY
- Borrow against collateral at known APR
- Compare pools by returns and risk

## Providers

| Provider | Supply | Borrow | API Key Required |
|---|---|---|---|
| **Surf Finance** | Yes (earn APY) | Yes (post collateral) | No |
| **FluidTokens** | No | Yes (NFT collateral) | Yes (`FLUID_PARTNER_KEY`) |

## Scripts

### List Lending Pools

```bash
node scripts/list-pools.js [--sort supplyApy|borrowAprPct|available]
```

### Supply (Deposit)

```bash
node scripts/supply.js --address <bech32> --pool <poolId> --amount <lovelace>
```

### Borrow

```bash
node scripts/borrow.js --address <bech32> --pool <poolId> --amount <lovelace> --collateral <lovelace>
```

## Key Concepts

- **Supply APY**: Annual yield earned by depositing into lending pools
- **Borrow APR**: Annual interest rate paid on borrowed funds
- **Max LTV**: Maximum loan-to-value ratio (e.g. 75% means borrow up to 75% of collateral value)
- **Term Hours**: Some pools have fixed-term loans; `null` = flexible
- Amounts in **smallest units** (lovelace for ADA pools)
- Surf API returns unsigned CBOR directly — sign and submit via operator

## Safety Rules

- Always show pool APY/APR and LTV before committing
- Warn about liquidation risk if LTV is close to max
- Show effective borrow cost (APR + any fees)
- Require explicit confirmation before supply or borrow

