Gauges & Emissions
A gauge is the staking contract for one YB market. You stake yb-LP into it, and it pays you YB emissions.
veYB voting sets the share of emissions each gauge receives. The actual payout per gauge is scaled down if few LPs have staked there.
What a gauge is
Every YB market has its own gauge contract. You stake yb-LP there to earn YB emissions.
Stakers only earn emissions
Stakers earn only YB emissions. They do not accrue the unstaked PPS growth from fee flow. That goes exclusively to unstaked yb-LP holders.
This matters for APY comparisons. A staked position's return is emissions × YB/USD. An unstaked position's return is PPS growth.
How emissions are routed
Three steps:
- veYB votes set raw weights. Holders allocate vote weight across gauges.
- Staking ratio adjusts each gauge's weight. The vote weight is multiplied by the square root of the gauge's staking ratio (sqrt(staked / total_supply)).
- Stakers in each gauge split pro rata.
The math, in order:
# Stage 1: vote aggregation (GaugeController.vy)
gauge.raw_weight = sum(user_weights × veYB_balance_at_vote_time)
# (sum of every voter's weight times their veYB at the moment they voted)
# Stage 2: staking ratio adjustment (from LiquidityGauge.get_adjustment)
adjustment = sqrt(staked_in_gauge / lt_total_supply) # capped at 1e18
# (capped at 1.0; a gauge can't be adjusted up, only down)
gauge.adjusted_weight = raw_weight × adjustment
# rate_factor (passed to YB.emit) = sum(adjusted) / sum(raw)
total_rate_factor = Σ adjusted_weight / Σ raw_weight
# (if gauges average half-utilised, the whole reserve is emitted half as fast)
# Per-week emissions
weekly_emissions = reserve × (1 − exp(−Δt × max_mint_rate × rate_factor / 1e18))
# Per-gauge share
emissions_per_gauge = weekly_emissions × adjusted_weight / Σ adjusted_weight
Worked example: two gauges, equal votes
Two gauges A and B with equal veYB votes (50% each).
- A: 80% staking ratio.
sqrt(0.8) ≈ 0.894. Adjusted weight ≈ 0.5 × 0.894 = 0.447. - B: 10% staking ratio.
sqrt(0.1) ≈ 0.316. Adjusted weight ≈ 0.5 × 0.316 = 0.158.
Total adjusted = 0.605. Emissions split 74% to A, 26% to B. Both gauges have equal votes, but because gauge A is heavily staked and gauge B nearly empty, A receives ~74% of emissions.
Also: rate_factor = 0.605 / 1.0 = 0.605. The overall YB mint rate slows because voted-gauges are not fully utilised. If all gauges had 100% staking, rate_factor = 1.0 and emissions would run at max.
Worked example: one gauge empty
Gauge A: 50% vote weight, 100% staking ratio. Adjusted = 0.5 × 1.0 = 0.5. Gauge B: 50% vote weight, 0% staking ratio. Adjusted = 0.5 × 0 = 0.
Gauge A gets 100% of emissions. Gauge B gets 0. An unstaked gauge earns nothing, regardless of votes.
Narrative: one voter
Alice locked 10,000 YB for 4 years (= 10,000 veYB). She votes 100% of her weight on gauge X. Gauge X is at 50% adoption. Her 10,000 votes convert to 10,000 × sqrt(0.5) ≈ 7,071 effective vote weight in the emission routing.
The adoption curve
sqrt(staked / total_supply) scales gauge emissions by the square root of the staking ratio.
| Staking ratio | Adjustment |
|---|---|
| 100% | 1.00× |
| 50% | 0.71× |
| 25% | 0.50× |
| 10% | 0.32× |
| 0% | 0.00× |
Emissions reward active, well-adopted gauges, not unused ones. Square root is gentle enough that a moderately-used gauge is not catastrophically punished, but steep enough at the low end to prevent votes being cast for gauges no one actually uses. A gauge at 0% staking gets 0 emissions regardless of votes.
Vote timing
- Votes apply immediately. Gauge weights update in real time when you call
vote_for_gauge_weights. No epoch-boundary delay. - Same-gauge re-vote cooldown: 10 days.
WEIGHT_VOTE_DELAY = 864000seconds. You can still adjust votes across other gauges within that window. - Weekly accrual aligned to Thursday 00:00 UTC. From
WEEK = 604800rounding in GaugeController. This is when emissions are minted to gauges, not when your vote takes effect.
Implementation
Gauges are deployed by Factory.vy alongside each market. Vote aggregation lives in GaugeController.vy. Staking, reward distribution, and the sqrt-adoption adjustment live in LiquidityGauge.vy.
Related
- Vote for Gauges — step-by-step voting flow.
- Emission Dynamics — the full math of the emission curve.
- Staked vs Unstaked Economics — why staking trades PPS growth for emissions.
- Dev: GaugeController
- Dev: LiquidityGauge