Skip to main content

veYB and governance

Locking YB in VotingEscrow mints a veYB ERC-721 NFT. Holding veYB grants three protocol powers: voting on YB DAO proposals, directing YB emissions across market gauges in GaugeController, and claiming weekly protocol admin fees in yb-LP tokens from FeeDistributor.

YieldBasis governance flywheel showing YB locking into veYB, gauge votes directing emissions, market fees flowing through FeeSplitter to FeeDistributor and MerklPIDDriverYieldBasis governance flywheel showing YB locking into veYB, gauge votes directing emissions, market fees flowing through FeeSplitter to FeeDistributor and MerklPIDDriver

YieldBasis governance flywheel: veYB locks direct gauge emissions, govern protocol parameters, and receive admin-fee revenue.

VotingEscrow (veYB)​

VotingEscrow calculates voting power linearly from locked YB and remaining lock duration up to a 4-year maximum (MAXTIME = 4 × 365 days = 126,144,000 seconds):

veYB=YBlocked×time_to_unlockMAXTIME\text{veYB} = \text{YB}_{\text{locked}} \times \frac{\text{time\_to\_unlock}}{\text{MAXTIME}}
TermVotingEscrow getterMeaning
veYBgetVotes(account)Current voting power.
YB_lockedlocked(account).amountLocked YB balance.
time_to_unlocklocked__end(account) - block.timestampRemaining seconds until unlock.
MAXTIMEInternal constant (126,144,000)4-year maximum lock window.

VotingEscrow rounds every lock expiry down to the nearest whole week (WEEK = 7 × 86,400 seconds), aligning all unlock dates to Thursday 00:00 UTC. Each address holds at most one veYB NFT (token_id = uint256(address)). VotingEscrow implements IVotes for proposal snapshots, while delegation (delegate, delegateBySig) reverts with Not supported.

Permalock (infinite lock) versus term lock​

Every veYB position operates in one of two lock modes:

PropertyTerm lock (decaying)Permalock (infinite lock)
Expiry timestampChosen Thursday 00:00 UTC (next Thursday 00:00 UTC up to 4 years)max_value(uint256) (no expiry)
Voting powerDecays linearly every second to 0 at expiryConstant 1.00 veYB per 1 YB (zero decay)
WithdrawalCall withdraw() after expiry to reclaim YB and burn the NFTBlocked while permalock is active
Switching modeCall infinite_lock_toggle() at any time to enable permalockClear all gauge votes to 0, then call infinite_lock_toggle() to start a fresh 4-year decaying lock rounded down to Thursday 00:00 UTC

For example, locking 1,000 YB for a 2-year term (730 days) starts at 500 veYB. After 1 year (365 days remaining), it decays to 250 veYB; at expiry it reaches 0 veYB and unlocks. Toggling permalock on holds the position at 1,000 veYB indefinitely until you toggle it off.

Transferring and merging veYB NFTs​

Unlike standard ERC-721 transfers, transferring a veYB NFT merges the sender's locked YB into the receiver's existing lock and burns the sender's NFT.

Receiver must already hold a matching lock

A transfer reverts (Need max veLock) unless the receiver already holds a veYB lock with the exact same lock type and expiry week.

A transfer succeeds only when all three conditions hold:

  1. Zero active gauge votes: The sender has vote_user_power == 0 in GaugeController (checked by transfer_clearance_checker). The receiver may hold active gauge votes.
  2. Matching maximum lock: Either both accounts hold a permalock, or both hold a term lock ending in the current 4-year unlock week ((block.timestamp + MAXTIME) // WEEK * WEEK). Shorter term locks cannot transfer.
  3. Merge execution: transferFrom or safeTransferFrom adds the sender's locked YB to the receiver's lock and burns the sender's token ID.

GaugeController and emission weights​

Each YieldBasis market deploys a LiquidityGauge staking contract. Once a YB DAO proposal registers a gauge via GaugeController.add_gauge(gauge), veYB holders can allocate up to 100% (10,000 bps) of their voting power across active gauges.

GaugeController routes YB emissions in three steps:

  1. Raw weight: Sum of veYB voting power allocated to gauge gg.
  2. Staking-ratio adjustment: LiquidityGauge.get_adjustment() scales raw weight by the square root of the market's staking ratio, capped at 1.0: adjusted_weight(g)=raw_weight(g)⋅min⁡ ⁣(staked(g)totalSupply(g),  1)\text{adjusted\_weight}(g) = \text{raw\_weight}(g) \cdot \min\!\left(\sqrt{\frac{\text{staked}(g)}{\text{totalSupply}(g)}},\; 1\right)
  3. Emission share: Gauge gg receives adjusted_weight(g)/∑kadjusted_weight(k)\text{adjusted\_weight}(g) / \sum_k \text{adjusted\_weight}(k) of minted YB, distributed pro rata to stakers with no per-user veYB boost.

The ratio ∑adjusted_weight/∑raw_weight\sum \text{adjusted\_weight} / \sum \text{raw\_weight} also sets the global rate_factor passed to YB.emit(). See Tokenomics for the decay curve.

Gauge voting rules and lifecycle​

  • Immediate updates: GaugeController.vote_for_gauge_weights() applies new weights in the same transaction with no epoch delay.
  • 10-day per-gauge cooldown: After voting on a gauge, you must wait 10 days (WEIGHT_VOTE_DELAY = 864,000 seconds) before changing your weight on that same gauge. You can still vote on other gauges during the cooldown.
  • Continuous accrual: Emissions accrue every second and mint on any gauge checkpoint (deposits, withdrawals, transfers, claims, votes, or explicit checkpoint() calls).
  • Killing a gauge: YB DAO can call GaugeController.set_killed(gauge, true). Killing a gauge blocks new non-zero votes but does not erase existing votes—voters must set their weight on the killed gauge to 0 to halt emissions to it.

YB DAO proposals​

YB DAO runs on Aragon OSx with the TokenVoting plugin using veYB as its voting token. Always read the live getters on the TokenVoting plugin to verify active thresholds.

SettingTokenVoting getterBehavior
Minimum proposer voting powerminProposerVotingPower()Minimum veYB voting power required to call createProposal.
Proposal cooldowngetProposalCooldownPeriod()Minimum wait time between proposals from the same address.
Quorum (minimum participation)minParticipation()Share of total veYB voting power at snapshot (scaled by 10^6) that must vote (Yes, No, or Abstain).
Support thresholdsupportThreshold()Share of Yes + No votes (scaled by 10^6) that Yes must strictly exceed.
Minimum voting durationminDuration()Shortest allowed voting window in seconds.
Voting-power decay midpointgetDecayMidpointBasisPoints()Point in the voting window (in bps out of 10,000) where linear power decay begins.
Voting modevotingMode()Controls early execution and whether voters can replace a cast vote (1 enables early execution and disables vote replacement).

Creating a proposal​

Any address can call createProposal when two conditions hold:

  1. Your address held veYB voting power at or above minProposerVotingPower() before the proposal block.
  2. Your address has waited at least getProposalCooldownPeriod() seconds since its previous proposal.

Voting-power decay​

When a proposal is created, TokenVoting snapshots veYB balances; YB locked afterward cannot vote on that proposal. To discourage last-minute vote swings, TokenVoting decays voting power linearly after the midpoint:

  • Before the midpoint: Your vote counts at 100% of your snapshot voting power.
  • After the midpoint: Effective power decays linearly to zero at the end of the voting window:
effective_power=snapshot_power×end−tvoteend−midpoint\text{effective\_power} = \text{snapshot\_power} \times \frac{\text{end} - t_{\text{vote}}}{\text{end} - \text{midpoint}}

Illustrative example. Suppose minDuration() is 7 days and getDecayMidpointBasisPoints() is 5000 (50%, or day 3.5). A vote cast on day 2 counts at 100% snapshot power; a vote cast on day 5.25 counts at 50% (1.75 / 3.5 days remaining).

Drag the slider below to inspect the effective power multiplier across a 7-day voting period:

Effective voting power: 100.0%
0d1.75d3.5d5.25d7d0%25%50%75%100%Days since proposal startEffective voting power (%)Decay starts (3.5d)
DAO proposal voting power stays at 100% for the first half of the 7-day voting window, then decays linearly to 0%.

Early execution and settlement​

When votingMode() == 1, a proposal qualifies for early execution before its window closes once total participation meets minParticipation() and Yes remains strictly above supportThreshold() even if every unvoted veYB votes No.

Any address can call execute() once a proposal passes (either via early execution or after the voting window ends). A voter whose vote triggers early execution can pass tryEarlyExecution = true to execute atomically. YB DAO has no timelock, so approved actions execute in that transaction.

FeeDistributor and FeeSplitter (Net Pressure)​

Protocol admin fees minted by each market's LT vault flow to Factory.fee_receiver(), which routes through FeeSplitter:

  1. FeeSplitter.split_fraction() routes to FeeSplitter.pid() (MerklPIDDriver) to fund the net-pressure reserve.
  2. The remainder (1 - split_fraction()) routes to FeeSplitter.fee_distributor() (FeeDistributor) for veYB holders.

Weekly veYB fee claims (FeeDistributor)​

FeeDistributor spreads every incoming yb-LP fee transfer evenly across the next 4 weekly epochs (OVER_WEEKS = 4, each opening Thursday 00:00 UTC) so fee spikes smooth out over a month. For each started epoch, your claim equals your snapshot share getPastVotes(user, epoch) / getPastTotalSupply(epoch).

Payouts arrive in the yb-LP tokens of the markets that generated fees (such as yb-WBTC or yb-WETH), not in YB or crvUSD. You can claim up to 50 epochs per transaction at any time.

Net pressure and the PID reserve (MerklPIDDriver)​

Net pressure measures how much pooled crvUSD debt across YieldBasis markets exceeds the crvUSD inside those markets' Curve LP collateral:

Net Pressure=AMM crvUSD Debt−crvUSD inside AMM’s Curve LP\text{Net Pressure} = \text{AMM crvUSD Debt} - \text{crvUSD inside AMM's Curve LP}

When BTC or ETH drops sharply, traders remove crvUSD from Curve pools, creating positive net pressure (buy pressure on crvUSD). MerklPIDDriver converts its FeeSplitter share of yb-LP into crvUSD (via MerklPIDDriver.trigger(), bounded by pool price_oracle EMAs) and holds it as a reserve.

Each cycle, MerklPIDDriver.preview_target_apr() reads manipulation-resistant pressure from YBNetPressure and a benchmark savings rate from MarketRateGetter, then computes a PID-controlled bonus APR for a Merkl campaign incentivizing crvUSD liquidity in MerklPIDDriver.sink_pool(). Deeper sink-pool liquidity absorbs crvUSD demand and protects the peg that all YieldBasis markets rely on.

Separation of powers​

Protocol authority splits across three entities:

EntityScope of control
YB DAOMarket borrow rates (AMM.rate()), Factory.min_admin_fee(), LEVAMM fees, GaugeController gauges, FeeSplitter split, MerklPIDDriver PID parameters, HybridVaultFactory.stablecoin_fraction(), PythReportBank.set_verifier(), and YBOraclizedPolicy parameters and kill switch.
Curve DAOCurve Cryptoswap pool parameters (A, reserved_profit_fraction(), admin_fee(), native fees) and attaching, replacing, or removing a v3 pool's POLICY() contract via set_policy_contract.
Curve Emergency DAOScoped emergency kill/revive switches on individual markets (LT.set_killed) and oracle-report policies (YBOraclizedPolicy.set_killed), plus select Curve pool emergency adjustments.