Lender (Pools)
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 | Query pool state, TVL, utilization, and enriched metadata |
| Pool Operations | Deposit, withdraw, and preview pool transactions |
| Interest Rates & Quotas | How supply/borrow APY is calculated, quota rates, and the interest rate curve |
| History & Events | Historical metrics, parameter changes, and governance event feeds |
| Insurance | Automated insurance fund, bad-debt coverage, and loss distribution |
SDK Entry Points
The primary namespaces for lender operations:
TypeScript
// 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 — discover pools via the unified opportunity search
- Positions (Strategies) — the borrower side of the protocol
- SDK Namespaces — full namespace reference