Skip to main content

Pool policies

A pool policy, also called a fee policy, is a contract that a Curve Cryptoswap pool calls on each operation. It can set two values for the pool: the swap fee and the price_scale target. Only pools on Twocrypto code v3.0.0 can take a policy.

YieldBasis pools run the oracle-report policy, YBOraclizedPolicy. It prices each swap against a signed USD price report of the pool asset, and it uses the same reports to steer price_scale. Some pools can still run the earlier YBTwocryptoPolicy, which uses only the pool's own prices and does not set the fee. Contract addresses lists the policy of each pool. To check a pool yourself, call POLICY() on it.

The policy does not change where fees go. The pool admin_fee sets the Curve DAO share of the protected pool profit. Other swap fees stay in the pool for its LP holders, and the main holder is LEVAMM, the leveraged AMM of the market. See Fees and veYB revenue.

What the policy changes for you​

Swap fee​

A price report is a signed USD price of the pool asset from Pyth Lazer. Anyone can deliver one to the policy. Arbitrageurs deliver one with their swap, because a fresh report can lower their fee.

A swap gets a discount from the fallback fee only when the stored report is younger than the relax time and the swap is corrective. A corrective swap moves the pool price toward the report price without passing it. The swap must also have a positive edge, its gain at the report price before fees. The discounted fee is the base fee plus a capture share of the edge above the base fee, at most the fallback fee. The discount fades with the square root of the report age and is gone at the relax time. Every other swap pays the fallback fee.

Example: with the deployed settings (base fee 0.50%, capture 67.5%, fallback fee 1.75%, relax time 300 s), a corrective swap with an edge of 1.00% pays:

  • 0.50% + 0.675 × 0.50% = 0.8375% with a report of age 0.
  • 0.8375% + (1.75% − 0.8375%) × 0.5 ≈ 1.29% with a report of age 75 s, one quarter of the relax time.

To read the current settings, call config() on the policy.

price_scale target​

The LP oracle values the pool LP token from price_scale, and LEVAMM uses that value. So the price_scale target sets how fast your yb-LP position value follows the market price. See Oracle design.

The policy keeps a fast and a slow moving average (EMA) of the price. The EMAs observe the stored report until it is older than the report lifetime, and then the pool's own spot price. In a flat market, the target stays near the fast EMA. As the gap between the EMAs grows to the trend gate, the target moves to the observed price. Each rebalance moves price_scale at most half the gap to the target, within the step cap and the pool's own limits.

Deposits and withdrawals​

A yb-LP deposit or withdrawal adds or removes pool liquidity, and the pool charges half its fee rate on the imbalanced part. While the policy is active, that rate is the fallback fee, so the deployed settings give 0.875% on the imbalanced part. A balanced removal pays no imbalance fee. During the donation protection period, a deposit can also pay a penalty of up to half the fee rate on the whole deposit. preview_deposit and preview_withdraw include these fees.

LT deviation check​

A yb-LP deposit adds LP collateral and crvUSD debt to LEVAMM. The policy requires the added debt to match the LEVAMM debt-to-collateral ratio within 1 bp (0.01%) in the deployed settings. If it does not match, the deposit reverts with LT deviation.

LT.deposit lets the caller choose the debt, and a debt off the ratio is a fee-free trade against the existing yb-LP holders. The forum post calls this a deposit-and-withdraw route that could move value out of the pool. The check applies to every LT.deposit call, including Hybrid Vault deposits and LTMigrator migrations. Swaps, donations and withdrawals skip it.

If your deposit reverts with LT deviation, get a fresh preview and deposit again.

Why YieldBasis uses the oracle-report policy​

Our forum post of 21 October 2026 found that the YB-WETH market lost value from mid-June 2026. It names two causes. First, the pool's own fee curve (1.36% to 2.82% in the post) charged a high fee even on corrective swaps. Second, the price_scale target followed only the pool's own trade prices. YieldBasis did not test the post's results separately.

PeriodPool settings in the postYBOraclizedPolicy
24 March 2025 to 1 October 2026, backtest+3.6% per year+8.5% per year
10 June to 1 October 2026, backtest−3.0% per year+3.6% per year
10 June to 30 September 2026, onchain−2.4% per yearNot applicable

All figures are in ETH. The backtest rows are in-sample simulator results for position value. The last row is the post's own measurement of the yb-WETH share value. In the backtest, swap volume rises from $1.8 billion to $5.1 billion, and the average fee falls from 1.69% to 0.55%.

The post gives these caveats:

  • The simulator models only arbitrage flow, without retail flow or liquidations.
  • The team tuned the parameters on the same 18 months that the results report. No separate test period exists.
  • Governance must set the donation rate and the reserved profit fraction as a pair, and again when A changes.
  • In a replay of August 2026, price_scale stayed away from the market price for several weeks after an ETH rise of about 30%.
  • Results differed slightly between machines. The post suggests floating-point differences, but the team has not isolated the cause.

What can go wrong​

  • No fresh price report. Every swap pays the fallback fee, and after the report lifetime the EMAs observe the pool's own spot price.
  • Kill switch. The YB DAO or the Curve Emergency DAO can kill the policy. The pool then uses its own fee curve and price_scale target, the policy refuses price reports, and the LT deviation check is off.
  • A failing policy. If the policy contract reverts, swaps, deposits and normal withdrawals on the pool also revert. A balanced removal of liquidity ignores a failed policy call if at least 500,000 gas remains before the call, so emergency_withdraw stays available. With less gas, it also reverts.
  • Price trust. The verifier contract decides which prices are authentic. The YB DAO can replace it with any contract, so you trust the YB DAO for prices.

Who controls the policy​

Only a Curve DAO vote can attach, replace or remove a pool policy. The YB DAO owns each YBOraclizedPolicy and changes its settings within limits in the code, which the Pool policy developer page lists. For every role, see Who controls what.