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

Balancer V2 Gauges

Reports an account's gauge-staked Balancer V2 LP plus claimable rewards across any gauge.

Reports an account's gauge-staked Balancer V2 LP plus claimable rewards across any gauge. The staked LP is decomposed pro-rata into the pool's underlying tokens via the Vault's pool balances, and BAL plus the gauge's extra reward tokens are reported as accrued rewards. Wallet-held (unstaked) LP is the separate Balancer V2 Pools adapter.

  • Type: Meta-adapter

  • protocolSubId: keccak256("balancer-v2-gauges")

  • Instance key: the gauge address, widened to bytes32.


Positions returned

Leg
PositionKind
isDebt
Description

Staking

Staking

false

Pro-rata share of one underlying pool token, from the account's gauge-staked LP

Rewards (BAL)

Rewards

false

Claimable BAL, minted via the Balancer Minter

Rewards (extra)

Rewards

false

Claimable amount of each extra gauge reward token

Unregistered, zero-amount, and asset-filtered tokens are skipped.


Balance calculation

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

Staking legs use staked = gauge.balanceOf(account). The gauge's lp_token BPT resolves its getPoolId(), and BalancerV2PoolLib.shares reads the Vault balances to compute each token's pro-rata amount:

where effectiveSupply is getActualSupply() (composable-stable) or totalSupply() (legacy). The poolId read is skipped entirely when stake is zero.

BAL rewards and extra rewards use the exact same logic as the Balancer V3 Gauges adapter — V2 and V3 gauges share the BalancerMinter inflation design:

integrateFraction is recomputed off-chain by walking weekly boundaries (WEEK = 7 * 86400) accumulating integrate_inv_supply, trying the mainnet model (up to 500 weeks, future-epoch rate switch via the token admin) and falling back to the L2 per-week-rate model (up to 256 weeks); a killed gauge zeroes the rate. Extra rewards come from claimable_reward(account, token) per reward_tokens(i) (BAL excluded).


Identity

  • positionId: abi.encode(address gauge)

  • positionKind: Staking · Rewards

There is no labels field on the position. The adapter implements positionLabels(positionId), which returns ["Staking Gauge", "<sym0>/<sym1>/…"] from the staked pool's underlying token symbols — surfaced only by the verbose reads (getAccountPositionsVerbose / getAccountNavVerbose); the full breadcrumb is [protocolName, ...labels].


Constructor

Parameter
Description

vault_

Balancer V2 Vault address (must be a contract); the chain-level singleton holding pool balances

balancerMinter_

Balancer Minter contract (must be a contract); resolves the BAL token, token admin, and minted amounts

navCalculator_

NAVCalculator address (must be a contract); source of the asset registry and the instance set


Registration

Registered as a meta-adapter via addMetaBalanceAdapter(adapter), then per-gauge instances are added with addMetaInstances. Each instance coordinate is the gauge address widened to bytes32.

Last updated