# YB post-policy study: machine-readable version

Agent-readable twin of https://method.ovchinnikov.co/yb-policy/. It compares the YieldBasis (YB) team's proposed **new policy** for its WETH pool on Curve with the **current settings**: on the real 2025–26 ETH history, on histories rebuilt from it, and on older 2023–25 prices with modelled oracle reports. The site leads with the **LP/xyk**: the growth of an LP share's value at market prices beyond a passive x·y = k pool, after the donations. The result tabs are Markdown files with the visitor's text. LP/xyk, Ablations and 2023–2025 history give every chart as a table; the 2025–26 histories tab gives its selector statistics as a table, and its daily charts come from the data files. The "Parameter choice" tab is a separate app, not included here.

## Files

- [lp-excess.md](lp-excess.md): tab "LP excess over x·y = k" (the first tab). What the measure is, how it relates to the pool's own counters (xcp_profit, virtual price, lp_xcp_profit), the accounting version, what moves it, and how the YB position follows from it.
- [yb.md](yb.md): tab "2025–26 histories". Headline, how to read the numbers, the default view, and the statistics behind every selector.
- [ablations.md](ablations.md): tab "Ablations". Which of the four changes matter, with each test's data.
- [conclusions.md](conclusions.md): tab "Conclusions". The key results on both measures (LP/xyk, YB position in ETH), in sample (the 2025–26 history the policy was tuned on) and out of sample, each with its numbers.
- [older.md](older.md): tab "2023–2025 history". The new policy on 2023–25 prices, how Pyth's error was modelled, and what is out of sample.
- [data/paths.csv](data/paths.csv): one row per history (309).
- The JSON the page draws from:
  - `data/index.json`: per-history summaries and family statistics.
  - `data/path/<tag>.json`: daily series for one history. `price` is ETH in USD per ETH (Binance ETH/USDT, with crvUSD counted as $1); `arms.<pool>` holds `eq` and `eq_admin` (change in the YB position's ETH value, % of start), `k` (% held in crvUSD, net of debt), `gap` (price_scale off market, daily time-weighted average of the absolute gap, %), `ps` (price_scale at the end of each day, USD per ETH, the same moment as `price`), `vm` (100 × ln(virtual price ÷ marked-to-market value) at the end of each day, %), and `M`, `pool`, `lev`, `fund`, `P1`–`P5`, `C` (running parts, % of start).
  - `data/fan_<family>.json`: price paths relative to the start.
  - `data/nlr_view.json`: the LP excess over x·y = k tab (texts, the four valuations, the accounting variants, diagnostics, the rebuilt-history link).
  - `data/ablations_view.json`, `data/older_view.json` (2023–2025 tab, error model 1), `data/older_view_b.json` and `data/older_view_c.json` (the same keys for error models 2 and 3).

## Names

- **Four pools.**
  - *Current settings* (`cur`, `current`): native fee curve; donation rate 5%, reserved profit fraction (RPF) 45%, LevAMM fee 1.3%.
  - *New policy* (`post`): all four changes.
  - *New parameters only* (`fin`, `finance`): changes 2–4, no oracle.
  - *Oracle only* (`pol`, `policy`): change 1 only.
- **Four changes.**
  1. The oracle policy (YBOraclizedPolicy: swap fees and price_scale follow Pyth ETH/USD reports).
  2. Donation rate (refuel) 5% → 1.2% of pool value a year.
  3. RPF 45% → 42.9%.
  4. LevAMM fee 1.3% → 1.5%.
- **Comparisons (gaps).**
  - `bundle`: new policy minus current settings.
  - `financing`: new parameters only minus current settings.
  - `policy_today`: oracle only minus current settings.
  - `policy_post`: new policy minus new parameters only.
- **The YB position:** YieldBasis's 2x leveraged holding of the pool's LP tokens, financed with crvUSD debt: about $29.9M (14,354 ETH) at the start of the real history. Its growth is measured on its value in ETH.

## Units

- **% a year:** a growth rate, 100 × ln(end ÷ start) ÷ years.
- **Gap:** one pool's growth rate minus another's, also in % a year (14% against 10% a year is a gap of +4% a year). A negative gap is slower growth, not a fall.
- **Parts** (`M`, `pool`, `lev`, `fund`, `P1`–`P5`, `C`, `eq`): simple % of starting value, so they add up: yearly rates in summaries and the CSV, cumulative % since the start in the daily JSON.
- **Pool measures** (`nl`, `mtm`, `xcp`, `xwo`, `vmk`): per LP share, log growth.
  - `nl`: the **LP/xyk**, `mtm` minus the donation rate (the engine's `donated_apy`: the log growth of LP supply from donated shares). The YB position holds the LP shares, so donations are its own coins coming back through burns; subtracting them charges each setting for the capital it adds.
  - `mtm`: the LP share's value at market prices against a passive x·y = k pool, (crvUSD + ETH × P) ÷ 2√P per LP share.
  - `xcp`: Curve's xcp_profit counter: it adds every rise of the virtual price between re-pegs (the fees the pool keeps, gross).
  - `xwo` = `xcp` − `vp`: xcp_profit growth minus virtual-price growth (D ÷ 2√price_scale per LP share): the losses recognised at re-pegs. A re-peg moves no coins; the losses happened earlier, in trades along the curve.
  - `vmk` = `vp` − `mtm`: the virtual price minus the value at market prices; positive is a loss carried but not yet recognised. `xwo` + `vmk` = `xcp` − `mtm`.
  - `index.json` and `paths.csv` also keep `xd` (`xcp` minus the donation rate), which the site no longer shows.
- **Missing values:** where a YB position's value ever reaches zero, its growth and pool measures are left out (empty in the CSV).

## paths.csv columns

- **The history:** `tag`, `family` (`identity` = the real history; `L180`/`L90`/`L30`/`L1` = rebuilt from blocks of that many days; `core` = synthetic with yearly log `drift`), `L` (block length, days), `k` (history number within its family; in the daily JSON `k` is the crvUSD share instead), `days`.
- **ETH price over the history:** `ret` (log return), `vol` (yearly volatility), `runup`, `drawdown` (fractions).
- **Each pool** (`<pool>_*`): `log_pre`, `log_admin`, `nl`, `mtm`, `xcp`, `xwo`, `vmk` (% a year); `detached` (price_scale more than 20% off for at least 7 days); `longest_det_days`; `first_nonpositive_day`.
- **Each comparison** (`<comparison>_*`): the gaps for every measure, in % a year.

## older_view.json, older_view_b.json and older_view_c.json

- One file per error model for the modelled Pyth reports (`model`: `A` = model 1, the fast noise follows ETH's volatility over the past hour; `B` = model 2, ETH's latest one-second move; `C` = model 3, ETH's volatility over the past minute from its one-second moves). All carry `compare`, the three models side by side.
- `fit`, `validation`, `mechanism`, `folds`: the error model (fit window, dollar loading λ, hourly persistence) and its checks (bias and RMS in log bp; monthly folds).
- `gate`: the result check on 2025-03-24 to 2026-06-02, real against modelled reports, before and after the LT admin fee.
- `windows.<window>.<comparison>.<log_ppyr|after_admin_log_ppyr>`: `mean`, `min`/`max` (across the 8 draw means), `per_draw`, `draw_sd`, `start_se`.
- `nl`, `mtm`, `xcp`: LP/xyk, value at market prices and xcp_profit gaps per window (mean, min, max over the 8 draws, `per_draw`).
- `rolling`: 43 weekly-start 180-day windows.
- `n`: the display strings the page shows. `notes`: units, what the draws vary, window conventions and name aliases (`policy_at_today` = `policy_today`).
- These runs see only arbitrage, like the 2025–26 backtest.

## Headline

- **LP/xyk**, new policy minus current settings: +1.65% a year on the real history; higher on 84 of 100 histories rebuilt from 180-day blocks.
- **YB position growth**, new policy minus current settings: +4.48% a year on the real history; faster on 88 of 100 histories rebuilt from 180-day blocks.
- **Pool xcp_profit growth** (fees kept, gross), new policy minus current settings: −3.00% a year on the real history.
- **2023–2025 history** (Dec 2023 – Mar 2025, modelled reports): LP/xyk +0.53, +0.48 and +0.51% a year with error models 1, 2 and 3; YB position +3.17% a year with error model 1, +3.02% with error model 2 and +3.16% with error model 3; faster in 38, 38 and 37 of 43 half-year windows.
