> For the complete documentation index, see [llms.txt](https://docs.fuul.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fuul.xyz/core-concepts/trigger-integrations/lending-and-borrowing.md).

# 3️⃣ Lending & Borrowing

Fuul allows projects to incentivize both lenders and borrowers, giving you the flexibility to reward the specific behavior that matters most for your protocol.

### What You Can Incentivize

| Side                 | What's tracked                                  | Example use case                         |
| -------------------- | ----------------------------------------------- | ---------------------------------------- |
| **Lending (supply)** | Amount supplied relative to total pool deposits | Grow TVL by rewarding depositors         |
| **Borrowing**        | Amount borrowed relative to total pool borrows  | Drive utilization by rewarding borrowers |

### How Fuul Tracks Positions

Fuul supports two approaches for fetching lending and borrowing data:

* **Receipt / debt tokens** — track the balance of protocol-issued tokens (e.g., aTokens, cTokens) that represent a user's supply or borrow position
* **Subgraph queries** — fetch positions directly from a protocol's subgraph for real-time on-chain balance tracking
* **Indexed onchain data** — for protocols without a usable subgraph, Fuul reads positions from indexed onchain data (e.g., Blend on Stellar)
* **Onchain program accounts** — for protocols whose API only answers per wallet, Fuul reads every position in the market directly from the protocol's onchain accounts (e.g., Kamino Lend on Solana)

Each method calculates each user's share of the total pool, ensuring proportional and accurate reward distribution.

### Supported protocols

| Protocol                 | Type                          | How positions are tracked                                                                |
| ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------- |
| **Compound V3**          | Lending                       | Receipt/debt token balances                                                              |
| **Morpho**               | Lending                       | Receipt/debt token balances                                                              |
| **Morpho Vaults**        | Curated vaults                | Subgraph query (supply positions in curated vault structures)                            |
| **Euler Vaults**         | Curated vaults                | Subgraph query (supply positions in curated vault structures)                            |
| **Euler V2 Looping**     | Looping (lending + borrowing) | Subgraph query (looped supply/borrow positions across Euler V2 vaults)                   |
| **Blend v2** (Stellar)   | Lending & borrowing           | Indexed onchain data (supply and collateral positions, or borrow positions, per reserve) |
| **Kamino Lend** (Solana) | Lending (supply)              | Onchain program accounts (every deposit position in the market, per reserve)             |

{% hint style="info" %}
Morpho Vaults and Euler Vaults are curated vault structures, distinct from direct lending pools. Fuul tracks user supply positions via subgraph queries rather than receipt tokens. Euler V2 Looping extends this by tracking looped supply and borrow positions within Euler V2 vaults.
{% endhint %}

### Blend (Stellar)

Each Blend trigger tracks one reserve in one pool, on one side:

| Setting                              | Description                                                                                                                                                                                                 |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pool address**                     | The Blend pool contract (`C…`)                                                                                                                                                                              |
| **Asset**                            | The reserve's asset contract (`C…`), e.g. USDC or XLM                                                                                                                                                       |
| **Side**                             | `supply` (supplied and collateral positions combined) or `borrow`                                                                                                                                           |
| **Utilization threshold** (optional) | An operator (`>`, `≥`, `<` or `≤`) and a percentage. Positions only count while the reserve's utilization meets it, e.g. "Utilization ≥ 80%". You can add, change or remove it from the trigger's edit page |

Stellar contract addresses are case-sensitive. Paste them exactly as shown in the Stellar explorer.

{% hint style="warning" %}
The reserve asset must be supported as a pricing currency on Stellar. Today that is **XLM and USDC**. For other reserves, reach out at <ecosystem@fuul.xyz> before launching.

Blend rewards can be paid in points or onchain in Stellar assets (XLM, USDC). See [Stellar Claiming](https://docs.fuul.xyz/developer-guide/claiming-onchain-rewards/stellar.md).
{% endhint %}

### Kamino Lend (Solana)

Each Kamino Lend trigger tracks one reserve in one lending market, on the supply side:

| Setting             | Description                                                                                                                                               |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Lending market**  | The Kamino lending market address (base58)                                                                                                                |
| **Reserve**         | The reserve address (base58), e.g. the market's USDC reserve                                                                                              |
| **Price reference** | The token the supplied volume is priced in: **USDC** or **apxUSD**. It does not have to be the reserve's own token, e.g. an apxUSD reserve priced in USDC |

Solana addresses are case-sensitive. Paste them exactly as shown in the Solana explorer.

Rewards go to the wallet that owns the Kamino position. The tracked amount is the wallet's full deposit in the reserve, accrued interest included. Borrows against it are not netted out, so a supplier who also borrows is credited on everything they deposited.

{% hint style="warning" %}
Only reserves whose token has **6 decimals** are supported. The price reference can be USDC or apxUSD; for another token, reach out first.

Each reserve has to be enabled on Fuul's side before its trigger gets data. Reach out at <ecosystem@fuul.xyz> with the market and reserve addresses before launching.
{% endhint %}

### Why Use Fuul for Lending & Borrowing?

* **Target supply or demand** — choose whether to incentivize lenders, borrowers, or both
* **Accurate on-chain data** — positions are fetched directly from the blockchain or subgraphs
* **Works with major protocols** — native integrations for Compound V3, Morpho, Euler, Blend, Kamino, and others
