Launch app
Cover: The median that holds liquidity honest: depth-weighted medians, manipulation cost and the research behind them

The median that holds liquidity honest: depth-weighted medians, manipulation cost and the research behind them

Why BlazePhoenix anchors every split on the depth-weighted median of marginal rates, what its 50% breakdown point means in capital, and how recent research on the cost of manipulating AMM-based oracles reaches the same bound.

Known formally as E25 · the depth-weighted median (believability centre) in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · article updated 2026-09-24 · site dataset through 2026-12-02 · 9 min · written from the deployed bytecode

By Mitra (@Sigmacrit) — anonymous developer of the BlazePhoenix protocol. The code is the résumé.

Abstract in 15 languages · resumo · resumen · 摘要 · 要旨 · ملخص

English — Why BlazePhoenix anchors every split on the depth-weighted median of marginal rates (E25), what its 50% breakdown point costs an attacker in real liquidity, and how research on manipulating AMM-based oracles (arXiv:2606.03548) proves the same bound.

Português — Porque é que a BlazePhoenix ancora cada divisão na mediana ponderada pela profundidade das taxas marginais (E25), quanto custa a um atacante o seu ponto de rutura de 50% em liquidez real, e como a investigação sobre manipulação de oráculos AMM (arXiv:2606.03548) prova o mesmo limite.

Español — Por qué BlazePhoenix ancla cada división en la mediana ponderada por profundidad de las tasas marginales (E25), cuánto le cuesta a un atacante su punto de ruptura del 50% en liquidez real, y cómo la investigación sobre manipulación de oráculos AMM (arXiv:2606.03548) prueba el mismo límite.

Français — Pourquoi BlazePhoenix ancre chaque répartition sur la médiane pondérée par la profondeur des taux marginaux (E25), ce que son point de rupture de 50 % coûte à un attaquant en liquidité réelle, et comment la recherche sur la manipulation des oracles AMM (arXiv:2606.03548) prouve la même borne.

Deutsch — Warum BlazePhoenix jede Aufteilung am tiefengewichteten Median der Grenzraten (E25) verankert, was sein Bruchpunkt von 50 % einen Angreifer an echter Liquidität kostet und wie die Forschung zur Manipulation AMM-basierter Orakel (arXiv:2606.03548) dieselbe Schranke beweist.

Русский — Почему BlazePhoenix привязывает каждое разбиение к взвешенной по глубине медиане предельных курсов (E25), сколько реальной ликвидности стоит атакующему её точка разрушения в 50% и как исследование манипуляций AMM-оракулами (arXiv:2606.03548) доказывает ту же границу.

Türkçe — BlazePhoenix’in her bölmeyi marjinal oranların derinlik ağırlıklı medyanına (E25) neden bağladığı, %50’lik kırılma noktasının saldırgana gerçek likiditede neye mal olduğu ve AMM tabanlı kâhin manipülasyonu araştırmasının (arXiv:2606.03548) aynı sınırı nasıl kanıtladığı.

العربية — لماذا تربط BlazePhoenix كل تقسيم بالوسيط المرجّح بالعمق للأسعار الحدّية (E25)، وكم تكلّف نقطة انهياره البالغة 50% المهاجمَ من سيولة حقيقية، وكيف يثبت بحث التلاعب بعرّافات AMM (arXiv:2606.03548) الحدّ نفسه.

हिन्दी — BlazePhoenix हर बँटवारे को मार्जिनल दरों के depth-weighted median (E25) पर क्यों टिकाता है, उसका 50% breakdown point हमलावर को असली तरलता में कितना महँगा पड़ता है, और AMM-आधारित oracles की हेराफेरी पर शोध (arXiv:2606.03548) वही सीमा कैसे साबित करता है।

日本語 — BlazePhoenix が各分割を限界レートの深さ加重中央値(E25)に固定する理由、その 50% の崩壊点が攻撃者に実際の流動性でいくらを要求するか、そして AMM 型オラクル操作の研究(arXiv:2606.03548)が同じ上界を証明していること。

中文 — 为什么 BlazePhoenix 把每次拆分锚定在边际价格的深度加权中位数(E25)上,其 50% 崩溃点让攻击者付出多少真实流动性,以及关于操纵基于 AMM 的预言机的研究(arXiv:2606.03548)如何证明同一界限。

한국어 — BlazePhoenix가 모든 분할을 한계 환율의 깊이 가중 중앙값(E25)에 고정하는 이유, 그 50% 붕괴점이 공격자에게 실제 유동성으로 얼마를 요구하는지, 그리고 AMM 기반 오라클 조작 연구(arXiv:2606.03548)가 같은 한계를 증명하는 방식.

Bahasa Indonesia — Mengapa BlazePhoenix menambatkan setiap pembagian pada median berbobot kedalaman dari laju marginal (E25), berapa biaya titik runtuh 50%-nya bagi penyerang dalam likuiditas nyata, dan bagaimana riset manipulasi orakel berbasis AMM (arXiv:2606.03548) membuktikan batas yang sama.

বাংলা — BlazePhoenix কেন প্রতিটি ভাগকে প্রান্তিক হারের depth-weighted median (E25)-এ নোঙর করে, এর 50% breakdown point আক্রমণকারীকে প্রকৃত তারল্যে কত খরচ করায়, এবং AMM-ভিত্তিক oracle কারসাজির গবেষণা (arXiv:2606.03548) কীভাবে একই সীমা প্রমাণ করে।

Filipino — Kung bakit iniaangkla ng BlazePhoenix ang bawat hati sa depth-weighted median ng marginal rates (E25), magkano ang halaga ng 50% breakdown point nito sa umaatake sa tunay na liquidity, at paano pinatutunayan ng pananaliksik sa pagmamanipula ng AMM-based oracles (arXiv:2606.03548) ang parehong hangganan.

The depth-weighted median is the rate at which half of the measured depth of a pair has been passed. BlazePhoenix uses it as the centre of the believability band (E25): before a single token is split across pools, every candidate whose marginal rate departs from that centre by more than 5 % is dropped.

The choice is not cosmetic. Averages can be dragged by one liar; a median cannot. And a median weighted by capital that is actually at risk can only be moved by putting capital at risk.

The rule, exactly

Sort the candidates by marginal rate, carry each depth alongside, and return the first rate at which the running depth reaches half of the total. The band is 0.95 to 1.05 times that centre. A candidate set of one is never filtered, and a centre that rounds to zero falls back to the plain median.

c=ri*,i*=min{i:∑j≤idj≥⌈∑d2⌉},band=[0.95c,1.05c]
E25 — Solver _depthWeightedMedian; MEDIAN_FILTER_BPS = 500.

What the breakdown point costs an attacker

A statistic's breakdown point is the fraction of the data an adversary must control to move it arbitrarily. For the depth-weighted median it is 50 % of the weight — here, half of the pair's measured depth. To shift the centre, an attacker must out-deposit half of the real liquidity of the pair.

The depths it weighs are chosen so that the weight is capital at risk: getReserves for reserve pools, active liquidity for concentrated pools and measured liquidity for V4. A plain donation inflates balanceOf without moving reserves or price and can be recovered by the donor, so it buys no weight. An external researcher demonstrated the earlier largest-balance anchor being captured by exactly such a donation; the anchor was replaced by the median, and the finding became a regression test.

aggregator of ratesbreakdown pointwhat moving it costs
arithmetic mean0 % — one outlier moves itone pool, any size
plain median (equal weights)50 % of poolsthe smallest pools — cheap to create
largest-balance anchor (retired)one donationa recoverable transfer
depth-weighted median (E25)50 % of measured depthhalf the pair's real liquidity, at risk

Source: whitepaper v2.3 §10.3; robust-statistics definitions

The research reaches the same bound

Independent academic work arrives at the same place. Müller, Moumeni and Messaoudi, in Cost of Manipulation in AMM-Based Oracles (arXiv:2606.03548, FC 2026 DeFi workshop), analyse oracle designs that aggregate prices across AMM pools. With equal weights, the optimal attack moves the pools with the smallest depths; with liquidity weights, controlling half of the total weight requires at least half of the total quote depth.

That second result is the property E25 is built on, applied to routing rather than to an oracle. The same thread runs through Ormer (arXiv:2410.07893), a manipulation-resistant on-chain pricing oracle that estimates a median instead of the TWAP mean, and through From Means to Medians: Optimal Benchmark Design (arXiv:2506.22142), which studies which benchmarks are hardest to manipulate.

On the routing side, the optimal-routing literature starts with Angeris et al. (arXiv:2204.05238) and continues with Optimal Routing across Constant Function Market Makers with Gas Fees (arXiv:2603.02844) and Routing Frictions and Executable Liquidity in Fragmented Markets (arXiv:2609.19013). BlazePhoenix sits on that line deliberately: a proportional allocator anchored by a manipulation-resistant centre, measured within 0.13 bps of an exhaustive grid on Base.

Measured from outside

The metamorphic lane of the test suite checks the band without trusting its implementation. With one pool priced 10^10 away from its sibling, the plan pays 35 % less than the outlier alone would have promised — the median refusing to believe it. And the split gate keeps any split only if it beats the best single pool by at least 25 ppm, so the filter can never cost a trader output.

Key facts

BlazePhoenix centres its believability band on a depth-weighted median (E25). The band is ±5%, MEDIAN_FILTER_BPS = 500. The breakdown point is 50% of measured depth. A donation buys 0 weight, because reserves and price do not move. BlazePhoenix routes within 0.13 bps of an exhaustive grid on Base.

The bottom line

BlazePhoenix believes a pool only as far as real capital stands behind it. To fool the router, an attacker must first put up half of the pair's liquidity — the same bound the research literature proves for liquidity-weighted medians.

Do not trust this page — reproduce it

Every claim above is checkable against the chain. Start here:

cd Blaze-Phoenix-Dex && forge test --match-path test/SplitGateSeesEverySurvivor.t.sol -vv   # plus the metamorphic lane (MR-R1)
Cite this article

Licensed CC BY-NC-ND 4.0: quote and cite it with attribution and a link. Commercial use and derivative versions need written permission from BlazePhoenix; translations are made by BlazePhoenix. Copy a ready-made citation:

BlazePhoenix (2026). The median that holds liquidity honest: depth-weighted medians, manipulation cost and the research behind them. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/the-median-that-holds-liquidity-honest/
@misc{blazephoenix_the_median_that_holds_liquidity_honest,
  title  = {The median that holds liquidity honest: depth-weighted medians, manipulation cost and the research behind them},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/the-median-that-holds-liquidity-honest/},
  note   = {Accessed: reproduce the claim with the command above}
}

Writing an answer, a wiki entry or a paper? The claim above is reproducible against the chain before you quote it — which is the only sound basis for citing a technical source at all.

Contracts are verified on every chain we deploy to — addresses in the protocol manifest. Deeper formal treatment: the whitepaper (PDF). Sources cited: arxiv.org: 2606.03548 · arxiv.org: 2410.07893 · arxiv.org: 2506.22142 · arxiv.org: 2603.02844 · arxiv.org: 2609.19013 · arxiv.org: 2204.05238

Related engineering

Next in Routing & pricing · 5 / 19
The mathematics of BlazePhoenix: every formula, and which ones are ours ›The complete formula set behind the protocol — the standard AMM invariants we compute and cite, and the original constructions we authored: the Iron Law Φ, the Vitality Field Ψ, the Capital-Anchored Filter and the Master Conservation Identity, derived from the deployed bytecode.9 min

Questions, a partnership or a bug to report? Contact us or email contact@blazephoenix.xyz

Go to APP