> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

DeFi lending protocols are decentralized platforms enabling users to borrow digital assets without traditional intermediaries. These protocols use smart contracts to automate lending operations, allowing lenders to earn interest on their deposits while borrowers can access capital by providing collateral.

## Terminology: Supplied vs. Deposits vs. TVL

"Supplied", "deposits", and "TVL" sound interchangeable, but they answer different questions — and whether they agree with a number you see from another data provider depends on whether the underlying market comingles collateral and loan-asset supply (Aave, Compound) or keeps them as separate pools (Morpho Blue, Euler V2, and Solana's isolated markets like Kamino/Jupiter Lend).

<Note>
  Allium's `markets_daily` deliberately does not have a collateral column — `supplied_amount(_usd)` is loan-asset supply only (`available_liquidity + outstanding_loans`). This is a role-based definition, not a balance-based one.
</Note>

| Term | Allium's definition | Other providers' definition | Comingled-collateral markets (Aave/Compound) | Isolated markets (Morpho/Euler V2, Kamino/Jupiter Lend) |
| - | - | - | - | - |
| **Supplied** | Loan-asset supply only = `available_liquidity + outstanding_loans`. Collateral is explicitly excluded — it isn't even a column in `markets_daily`. | Mixed. Protocol-native front-ends (e.g. Morpho's own app) draw the same line — "Total Supply" per market excludes collateral. But some aggregators blend collateral in when they report a single "supplied"/"deposits" figure. | **Match.** Collateral and loan supply are the same pool, so "supplied" is definitionally identical everywhere. | **Often diverges.** Allium's number will read smaller than a vendor that blends in collateral for the same market — not a bug, a different question being answered. |
| **Deposits** | No equivalent column exists. Approximating it would require manually summing `supplied_amount_usd` with the collateral balance, which Allium doesn't currently surface together anywhere. | User-facing framing = supplied + collateral summed, as "everything a depositor/borrower put into the protocol." | **Match with Allium's "supplied."** Since collateral = loan supply here, a comingled protocol's "deposits" figure coincides with Allium's `supplied_amount_usd` by coincidence, not design. | **Diverges from anything Allium currently reports.** A vendor's isolated-market "deposits" ≈ Allium's `supplied` + collateral (which, for Solana, lives only in `tvl_daily` and is never joined to `markets_daily`) — this is the real coverage gap: there is no single field that reproduces this number. |
| **TVL** | Remaining balance — the actual on-chain token balance held at the contract/market address (`tvl_daily`). Borrowed-out funds are excluded because they've physically left the contract; collateral is included because it's still sitting there. | Balance-based for most vendors too (e.g. DeFiLlama reads the protocol's own balance/subgraph figure) — same "what's custodied right now" logic. | **Match** — same pool, so balance ≈ supplied ≈ collateral ≈ TVL, no real distinction to make. | **Should roughly match other balance-based vendors** (both = liquidity remaining + collateral), since this is a physical-balance question, not a role-based one — the one place isolated markets don't force new ambiguity. |

**The pattern:** in comingled-collateral protocols, *supplied*, *deposits*, and *TVL* are three names for the same pool, so every vendor's number for all three tends to agree. In isolated markets, the pool genuinely splits into two distinct assets (loan vs. collateral) for the first time — so *supplied* (role-based, loan-only) pulls away from *deposits* and *TVL* (both of which pull collateral back in), while *deposits* and *TVL* stay close to each other since they're both effectively "everything sitting at this address," just described from a user-centric vs. contract-centric angle. Allium's actual coverage gap is **deposits**: we have the two ingredients (`supplied_amount_usd` and the collateral balance inside `tvl_daily`) but no model that joins them, so a vendor's isolated-market "deposits" number cannot currently be reproduced from a single Allium table.

## Metrics

### Lending Overview

The `crosschain.metrics.lending_overview` table provides precomputed metrics for lending protocols, broken down by blockchain, project, and protocol. These metrics are derived from transaction-level data and are updated daily.

The table includes key metrics such as outstanding loans, total locked value (TVL), deposits, withdrawals, loans, repayments, and liquidations.

| Column | Description |
| - | - |
| `activity_date` | The date of the recorded activity |
| `is_verified` | Boolean flag indicating whether the project is verified |
| `chain` | The blockchain network where the project operates (e.g., ethereum, solana) |
| `project` | Unique identifier for the project |
| `project_name` | Human-readable name of the project |
| `protocol` | The specific protocol version or variant |
| `token_price_usd` | Price of the project's token in USD, if applicable |
| `market_cap_usd` | Market capitalization of the project in USD, if applicable |
| `vertical` | The DeFi vertical category, always 'lending' for this model |
| `total_volume_usd` | Total trading volume in USD for the given activity date |
| `avg_volume_usd` | Average trading volume in USD per transaction |
| `active_users` | Count of unique users who interacted with the project |
| `total_transactions` | Total number of transactions recorded for the activity date |
| `outstanding_loans_usd` | Total value of outstanding loans in USD |
| `available_liquidity_usd` | Total available liquidity in USD |
| `supplied_amount_usd` | Total USD value of assets supplied to lending markets. For pool-based protocols (Aave, Compound, Fluid) this is the gross pool deposit including collateral, which cannot be separated. For Morpho Blue this is loan token supply only — see methodology notes below. |
| `tvl_usd` | Total USD value of assets physically locked in protocol contracts. For pool-based protocols this equals available liquidity (borrowed assets leave the pool); for isolated markets (Morpho Blue) this includes both the loan token pool and borrower-posted collateral. See methodology notes. |
| `deposit_volume_usd` | Total deposit volume in USD for the activity date |
| `deposit_avg_usd` | Average deposit size in USD |
| `depositor_count` | Count of unique depositors |
| `deposit_tx_count` | Total number of deposit transactions |
| `withdrawal_volume_usd` | Total withdrawal volume in USD for the activity date |
| `withdrawal_avg_usd` | Average withdrawal size in USD |
| `withdrawer_count` | Count of unique withdrawers |
| `withdrawal_tx_count` | Total number of withdrawal transactions |
| `loan_volume_usd` | Total loan volume in USD for the activity date |
| `loan_avg_usd` | Average loan size in USD |
| `borrower_count` | Count of unique borrowers |
| `loan_tx_count` | Total number of loan transactions |
| `repayment_volume_usd` | Total repayment volume in USD for the activity date |
| `repayment_avg_usd` | Average repayment size in USD |
| `borrower_repaying_count` | Count of unique borrowers making repayments |
| `repayment_tx_count` | Total number of repayment transactions |
| `liquidation_volume_usd` | Total liquidation volume in USD for the activity date |
| `liquidation_avg_usd` | Average liquidation size in USD |
| `borrower_liquidated_count` | Count of unique borrowers who were liquidated |
| `liquidation_tx_count` | Total number of liquidation transactions |
| `_created_at` | Timestamp when the record was created |
| `_updated_at` | Timestamp when the record was last updated |

## Methodology Notes

### TVL vs supplied amount

These are two distinct metrics that answer different questions:

| Metric | What it measures | Use when |
| - | - | - |
| `supplied_amount_usd` | Gross assets deposited by lenders | Measuring lender activity, comparing protocol adoption |
| `tvl_usd` (TVL Daily) | Assets physically locked in protocol contracts | Measuring capital the protocol controls at a point in time |

They are not interchangeable, and the relationship between them depends on the protocol's `market_type`.

### By market type

**`pool` — Aave V1/V2/V3, Compound V2/V3, Fluid, and forks**

Users deposit into a shared liquidity pool. A deposit earns interest for the supplier AND can serve as collateral for that same user's borrows — the two roles are structurally inseparable.

* `supplied_amount_usd` = gross pool deposit (includes assets acting as collateral)
* TVL = available liquidity only, because borrowed assets leave the pool contract: `tvl ≈ supplied_amount_usd - outstanding_loans_usd`
* TVL is always less than or equal to gross deposits for pool-based protocols

This is the same figure reported by DeFiLlama and Blockworks — there is no way to disentangle supply from collateral at the protocol level.

**`market` — Morpho Blue and other isolated markets**

Each market has exactly one **loan token** (what lenders deposit to earn interest) and one separate **collateral token** (what borrowers post as security). The two sides are structurally distinct.

* `supplied_amount_usd` = loan token supply only. Borrower-posted collateral is excluded.
* TVL = loan token pool (available liquidity) + collateral token pool. Both are physically locked in the market contract, so TVL can exceed `supplied_amount_usd` when collateral values are large relative to loan supply.

<Note>
  Some third-party dashboards (e.g. Blockworks) include collateral in their "deposits" figure for Morpho, producing a higher number than our `supplied_amount_usd`. This is a definitional difference, not missing data. Our number corresponds to Morpho's own `supplyAssets` field in their API.
</Note>

### `outstanding_loans_usd` identity

For protocols with full market-state coverage (`has_market_state = true`), the following identity holds across all market types:

```
supplied_amount_usd = outstanding_loans_usd + available_liquidity_usd
```

Use this to sanity-check data. If the identity breaks for a protocol, flag it as a data quality issue.

## Protocols Supported

We support the following lending protocols:

| Protocol | Versions | Notable Forks & Projects |
| - | - | - |
| **Aave** | Aave V1, Aave V2, Aave V3 | Aave, Avalon Finance, Centrifuge, dTrinity, Extra Finance, HopeLend, HyperLend, HyperYield, Hypurrfi, Kinza Finance, MahaLend, Neverland, Omni Protocol, Spark, RealT, Sake Finance, Seamless Protocol, Shroomy Protocol, Vicuna, ZeroLend, Agave, Granary, Moola Market, Portler, Blizz |
| **Compound** | Compound V2 | Compound, Venus, JustLend, Hundred Finance, Enclabs Protocol, Annex Finance, Atlantis Loans, Benqi, Cream Finance, Fortress Protocol, Keom Protocol, Neku, Ola Finance, Percent Finance, Reserve Lending, Rho Markets, Lendora Protocol, Strike, Tender Finance |
| **Compound** | Compound V3 | Compound |
| **Morpho** | Morpho V1 (Morpho Blue) | Morpho, Lista DAO, International Meme Fund |
| **Fluid** | Fluid Lending | Fluid |
| **Euler** | Euler V2 | Euler |
| **Maple** | Maple Finance | Maple Finance. (TVL is not supported as Maple Finance has off-chain components that cannot be tracked) |
| **Jupiter** | JupLend | Jupiter Lend |
| **Kamino** | Kamino Lend, KaminoVaults | Kamino |
| **MarginFi** | MarginFi | MarginFi. Full event coverage (deposits/withdrawals/loans/repayments/liquidations) and TVL are in `solana.lending.*`. MarginFi does not have `markets_daily` coverage (no outstanding-loans/available-liquidity state), so `has_market_state = false` for MarginFi in `solana.lending.metrics_daily`. |
| **Save** | Save (formerly Solend) | Save. TVL only (`solana.lending.tvl_daily`, Main Pool) — no decoded-instruction event coverage, so it is not in `solana.lending.{deposits,withdrawals,loans,repayments,liquidations}` or `markets_daily`. |

## Blockchain Coverage

| Ecosystem | Blockchain Supported | Planned Support (\~Q1 2026) |
| - | - | - |
| EVM-Compatible | arbitrum, avalanche, base, bsc, celo, ethereum, gnosis, hyperevm, ink, linea, monad, optimism, plasma, polygon, scroll, soneium, sonic, stable, worldchain, x\_layer, zksync | berachain, mantle |
| Other | solana, tron | aptos, sui |

## Lending Data Coverage (EVM-compatible blockchains)

We support the transaction-level data for the following lending datasets.

| Model | Description | Use Case |
| - | - | - |
| **TVL Daily** | Daily snapshots of Total Value Locked in lending markets by token. Calculated from contract balance snapshots of lending market addresses. For Aave protocols, this includes aToken contract balances; for Compound V2, cToken balances; for Morpho, market contract balances. | Explore the TVL of lending projects by token address. Note that our TVL models measure the available assets in contract, excluding the total loan. |
| **Interest Rates** | Provides transaction-level interest rates and outstanding loans from lending protocols by market. **Note:** Interest rate data availability varies by protocol - some protocols have incomplete historical data due to trace call variations or contract implementation changes over time. | Get historical borrowing rates of USDC on Aave; total outstanding loans on Morpho Blue. Data completeness may vary depending on protocol and time. |
| **Deposits** | Tracks deposit events across lending protocols, capturing deposit amounts, token details, and participant addresses. | Analyze users depositing/supplying collateral on lending projects over time. |
| **Withdrawals** | Monitors withdrawal events from lending protocols with full data on withdrawn amounts, tokens, and user addresses. | Track users withdrawing collateral from lending projects over time. |
| **Loans** | Records borrowing activity from lending platforms, including loan amounts, terms, borrower addresses, and collateralization. | Measure loan volume by assets and users. |
| **Repayments** | Documents loan repayment transactions with details on repaid amounts, outstanding balances, and borrower activity. | Analyze repayment volume by asset/user over time during market changes. |
| **Liquidations** | Captures liquidation events, including data on liquidated collateral, repaid debt, liquidators, and borrowers. | Monitor liquidation events by assets and users over time. |
