DocumentationOpen App

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:

ComponentPurpose
PoolERC-4626 vault that holds liquidity and issues diesel (share) tokens
Credit ManagersDefine borrowing parameters, allowed collateral, and adapters
Quota KeeperTracks per-token borrowing limits and quota interest rates
Interest Rate ModelComputes base borrow rates from pool utilization
Treasury SplitterRetains 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

PageDescription
Markets DataQuery pools, credit managers, collateral tokens, and rates
Pool OperationsDeposit, withdraw, and manage LP positions via ERC-4626
Interest Rates & QuotasInterest rate model parameters, quota rates, and quota limits
Insurance MechanismTreasurySplitter, 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.