Markets
A Gearbox market is the fundamental unit of the protocol: a lending pool paired with one or more credit managers, a quota system, and an insurance buffer. This section covers how to query and interact with markets using the TypeScript SDK.
What is a Market?
Each market revolves around a single underlying asset (e.g. USDC, WETH). It contains:
| Component | Purpose |
|---|---|
| Pool | ERC-4626 vault that holds liquidity and issues diesel (share) tokens |
| Credit Managers | Define borrowing parameters, allowed collateral, and adapters |
| Quota Keeper | Tracks per-token borrowing limits and quota interest rates |
| Interest Rate Model | Computes base borrow rates from pool utilization |
| Treasury Splitter | Retains fee revenue as an insurance buffer before distributing surplus |
Accessing Markets
TypeScript
import { GearboxSDK } from "@gearbox-protocol/sdk"; const sdk = await GearboxSDK.attach({ client, marketConfigurators: [] }); // Iterate all markets for (const market of sdk.marketRegister.markets) { console.log(`${market.pool.underlying.symbol} — ${market.creditManagers.length} CM(s)`); }
Section Overview
| Page | Description |
|---|---|
| Markets Data | Query pools, credit managers, collateral tokens, and rates |
| Pool Operations | Deposit, withdraw, and manage LP positions via ERC-4626 |
| Interest Rates & Quotas | Interest rate model parameters, quota rates, and quota limits |
| Insurance Mechanism | TreasurySplitter, revenue retention, and bad debt coverage |
Next Steps
Start with Markets Data to learn how to read pool state and credit manager configuration, or jump to Pool Operations if you want to deposit liquidity right away.