# Lender (Pools)

> Markdown export of the Gearbox Protocol documentation page for agents and retrieval systems.

Canonical page: https://docs.gearbox.finance/developers/gm-lender
Source file: content/developers/gm-lender.mdx
Section router: https://docs.gearbox.finance/developers/llms.txt
Section full export: https://docs.gearbox.finance/developers/llms-full.txt

This section covers everything from the lender's perspective — how Gearbox pools work, how to deposit and withdraw, how interest rates are determined, and how the insurance mechanism protects depositors.

## Overview

Lenders provide liquidity to ERC-4626 Pools and receive Diesel Tokens as yield-bearing receipts. Interest paid by borrowers flows back to the Pool, causing the Diesel Token exchange rate to appreciate over time. Lenders earn passive yield without managing positions or choosing strategies.

## What's in This Section

| Page | Covers |
| --- | --- |
| [Markets Data](https://docs.gearbox.finance/developers/gm-markets-data) | Query pool state, TVL, utilization, and enriched metadata |
| [Pool Operations](https://docs.gearbox.finance/developers/gm-markets-pools) | Deposit, withdraw, and preview pool transactions |
| [Interest Rates & Quotas](https://docs.gearbox.finance/developers/gm-markets-rates) | How supply/borrow APY is calculated, quota rates, and the interest rate curve |
| [History & Events](https://docs.gearbox.finance/developers/gm-markets-insurance) | Historical metrics, parameter changes, and governance event feeds |
| [Insurance](https://docs.gearbox.finance/developers/gm-markets-insurance) | Automated insurance fund, bad-debt coverage, and loss distribution |

## SDK Entry Points

The primary namespaces for lender operations:

```ts
// Discover lender opportunities
const pools = await sdk.pools.list();
const detail = await sdk.pools.getDetail(poolId);

// Deposit into a pool
const tx = await sdk.positions.prepareDeposit({ pool, amount });
const preview = await sdk.positions.previewDeposit(tx);
await sdk.transactions.execute(tx);

// Check pool status
const status = await sdk.pools.getStatus(poolId);

// Historical data
const apyHistory = await sdk.history.getMetric({ pool: poolId, metric: "supplyApy" });
```

## Learn More

- [Lender Opportunities](https://docs.gearbox.finance/developers/gm-opps-lender) — discover pools via the unified opportunity search
- [Positions (Strategies)](https://docs.gearbox.finance/developers/gm-positions) — the borrower side of the protocol
- [SDK Namespaces](https://docs.gearbox.finance/developers/gm-start-namespaces) — full namespace reference
