For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gearbox Markets

One immutable meta-adapter that reports an account's passive-liquidity supply in any Gearbox V3 ERC-4626 farming pool.

One immutable meta-adapter that reports an account's passive-liquidity supply in any Gearbox V3 ERC-4626 farming pool. Which pools it queries is a governed instance set on the NAV Calculator; the adapter holds no per-pool state. The borrow side is covered by the sibling Gearbox Credit Accounts adapter.

  • Type: Meta-adapter

  • protocolSubId: keccak256("gearbox-v3-markets")

  • Instance key: the market (pool) address, widened to bytes32


Positions returned

One position per pool the account has shares in.

Leg
PositionKind
isDebt
Description

Pool supply

Supplied

false

Pool shares converted to the underlying

A pool returns an empty result when its asset is unregistered, excluded by assetFilter, or the converted balance is zero. Merkl rewards are not included.


Balance calculation

Flowchart of the Gearbox Markets balance adapter: read calls derive position legs into PositionBalance entries.
Gearbox Markets adapter — how the underlying balances reported to the NAV Calculator are derived.

convertToAssets uses the pool's current share price (reflecting interest accrued from Gearbox credit accounts borrowing the pool's liquidity). The result is denominated in market.asset().


Identity

  • positionId: abi.encode(address market) — the pool address

  • positionKind: Supplied

There is no labels field on the position. The adapter implements positionLabels(positionId), which returns ["Market", "<market ERC20 name()>"] from the market's on-chain name — surfaced only by the verbose reads (getAccountPositionsVerbose / getAccountNavVerbose); the full breadcrumb is [protocolName, ...labels].


Constructor

Parameter
Description

navCalculator_

NAV Calculator contract (asset registry + instance set)


Registration

Meta-adapter. Register once and seed its pools with addMetaBalanceAdapter(adapter, instances), then adjust with addMetaInstances(adapter, instances) / removeMetaInstances(adapter, instances) (MANAGER-gated). Each instance coordinate is a pool address widened to bytes32 (decoded via _toAddress). Adding a new pool is a config call — no new deploy.

Last updated