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: 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):
| Term | VotingEscrow getter | Meaning |
|---|---|---|
veYB | getVotes(account) | Current voting power. |
YB_locked | locked(account).amount | Locked YB balance. |
time_to_unlock | locked__end(account) - block.timestamp | Remaining seconds until unlock. |
MAXTIME | Internal 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:
| Property | Term lock (decaying) | Permalock (infinite lock) |
|---|---|---|
| Expiry timestamp | Chosen Thursday 00:00 UTC (next Thursday 00:00 UTC up to 4 years) | max_value(uint256) (no expiry) |
| Voting power | Decays linearly every second to 0 at expiry | Constant 1.00 veYB per 1 YB (zero decay) |
| Withdrawal | Call withdraw() after expiry to reclaim YB and burn the NFT | Blocked while permalock is active |
| Switching mode | Call infinite_lock_toggle() at any time to enable permalock | Clear 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.
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:
- Zero active gauge votes: The sender has
vote_user_power == 0inGaugeController(checked bytransfer_clearance_checker). The receiver may hold active gauge votes. - 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. - Merge execution:
transferFromorsafeTransferFromadds 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:
- Raw weight: Sum of veYB voting power allocated to gauge .
- Staking-ratio adjustment:
LiquidityGauge.get_adjustment()scales raw weight by the square root of the market's staking ratio, capped at1.0: - Emission share: Gauge receives of minted
YB, distributed pro rata to stakers with no per-user veYB boost.
The ratio 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,000seconds) 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 to0to 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.
| Setting | TokenVoting getter | Behavior |
|---|---|---|
| Minimum proposer voting power | minProposerVotingPower() | Minimum veYB voting power required to call createProposal. |
| Proposal cooldown | getProposalCooldownPeriod() | 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 threshold | supportThreshold() | Share of Yes + No votes (scaled by 10^6) that Yes must strictly exceed. |
| Minimum voting duration | minDuration() | Shortest allowed voting window in seconds. |
| Voting-power decay midpoint | getDecayMidpointBasisPoints() | Point in the voting window (in bps out of 10,000) where linear power decay begins. |
| Voting mode | votingMode() | 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:
- Your address held veYB voting power at or above
minProposerVotingPower()before the proposal block. - 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:
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:
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:
FeeSplitter.split_fraction()routes toFeeSplitter.pid()(MerklPIDDriver) to fund the net-pressure reserve.- The remainder (
1 - split_fraction()) routes toFeeSplitter.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:
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:
| Entity | Scope of control |
|---|---|
| YB DAO | Market 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 DAO | Curve 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 DAO | Scoped emergency kill/revive switches on individual markets (LT.set_killed) and oracle-report policies (YBOraclizedPolicy.set_killed), plus select Curve pool emergency adjustments. |
Related
- Lock and vote guide: walk through locking YB, voting on gauges, and claiming fees.
- Tokenomics: supply distribution, vesting contracts, and emission decay.
- Fees and policies: how trading fees flow through the admin-fee curve.
- Dev: DAO contracts and Dev: Net pressure: contract ABIs and exact math.