Connect
Cover: Measuring beats recomputing: the inequality that opens a leg, and the one gate it needs

Measuring beats recomputing: the inequality that opens a leg, and the one gate it needs

How does a router decide when a second pool is worth using?

A leg opens only while its marginal output exceeds its marginal cost, using quantities measured at the point of the split. The single numeric gate is priced from a measured break-even, not tuned.

Known formally as Law 2: measuring beats recomputing in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · article updated 2026-11-16 · site dataset through 2026-11-19 · 8 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 — A router opens an extra leg only while its marginal output exceeds its marginal cost, evaluated on numbers read from the pools at that point of the split, with no fixed threshold to tune. The one numeric gate is 25 ppm over the best single leg, priced from a break-even measured at 3 ppm on Base.

Português — Um router só abre uma perna extra enquanto a sua saída marginal superar o seu custo marginal, avaliados com números lidos das pools nesse ponto da divisão, sem nenhum limiar fixo para afinar. A única porta numérica é 25 ppm acima da melhor perna única, calculada a partir de um ponto de equilíbrio medido em 3 ppm na Base.

Español — Un router solo abre un tramo extra mientras su salida marginal supere su coste marginal, evaluados con números leídos de los pools en ese punto de la división, sin ningún umbral fijo que ajustar. La única puerta numérica es 25 ppm sobre el mejor tramo único, fijada a partir de un punto de equilibrio medido en 3 ppm en Base.

Français — Un router n'ouvre une jambe supplémentaire que tant que sa sortie marginale dépasse son coût marginal, évalués sur des chiffres lus dans les pools à ce point de la répartition, sans aucun seuil fixe à régler. L'unique porte numérique est 25 ppm au-dessus de la meilleure jambe unique, fixée à partir d'un seuil de rentabilité mesuré à 3 ppm sur Base.

Deutsch — Ein Router öffnet ein zusätzliches Bein nur, solange sein Grenzertrag seine Grenzkosten übersteigt, ausgewertet mit Zahlen, die an diesem Punkt der Aufteilung aus den Pools gelesen wurden, ohne festen Schwellenwert zum Einstellen. Das einzige numerische Tor liegt bei 25 ppm über dem besten Einzelbein und leitet sich aus einem auf Base mit 3 ppm gemessenen Break-even ab.

Русский — Роутер открывает дополнительную ногу, только пока её предельный выход превышает предельную стоимость, оценённые по числам, считанным из пулов в этой точке разделения, без фиксированного порога для настройки. Единственный числовой затвор — 25 ppm сверх лучшей одиночной ноги, выведенный из точки безубыточности, измеренной в 3 ppm на Base.

Türkçe — Bir router, ek bir bacağı yalnızca marjinal çıktısı marjinal maliyetini aştığı sürece açar; ikisi de bölmenin o noktasında havuzlardan okunan sayılarla değerlendirilir ve ayarlanacak sabit bir eşik yoktur. Tek sayısal kapı, en iyi tekil bacağın 25 ppm üzerindedir ve Base üzerinde 3 ppm ölçülen bir başabaş noktasından fiyatlanır.

العربية — لا يفتح الـ router مسارًا إضافيًا إلا ما دام ناتجه الحدّي يتجاوز تكلفته الحدّية، بحسب أرقام تُقرأ من المجمّعات عند تلك النقطة من التقسيم، دون عتبة ثابتة تحتاج إلى ضبط. البوابة الرقمية الوحيدة هي 25 ppm فوق أفضل مسار منفرد، وتُحدَّد من نقطة تعادل قيست عند 3 ppm على Base.

हिन्दी — राउटर अतिरिक्त लेग तभी खोलता है जब उसका सीमांत आउटपुट उसकी सीमांत लागत से अधिक हो, दोनों विभाजन के उसी बिंदु पर पूल से पढ़ी गई संख्याओं पर आँके जाते हैं, और ट्यून करने के लिए कोई निश्चित सीमा नहीं है। एकमात्र संख्यात्मक गेट सबसे अच्छे एकल लेग से 25 ppm ऊपर है, जो Base पर 3 ppm मापे गए ब्रेक-ईवन से तय होता है।

日本語 — ルーターは、分割のその時点でプールから読み取った数値で評価して、追加の脚の限界アウトプットが限界コストを上回る間だけその脚を開きます。調整すべき固定のしきい値はありません。唯一の数値ゲートは最良の単一脚より 25 ppm 上で、Base で 3 ppm と測定された損益分岐点から価格付けされています。

中文 — 路由器只有在额外一条腿的边际产出超过其边际成本时才会开启它,两者都用拆分那一点上从池子读取的数字来评估,没有需要调整的固定阈值。唯一的数值门槛是比最佳单腿高 25 ppm,它依据在 Base 上测得的 3 ppm 盈亏平衡点定价。

한국어 — 라우터는 분할 시점에 풀에서 읽은 수치로 평가했을 때 추가 레그의 한계 산출이 한계 비용을 넘는 동안에만 그 레그를 엽니다. 조정해야 할 고정 임계값은 없습니다. 유일한 수치 게이트는 최선의 단일 레그보다 25 ppm 높은 값이며, Base에서 3 ppm으로 측정된 손익분기점에서 가격이 정해집니다.

Bahasa Indonesia — Router hanya membuka leg tambahan selama output marjinalnya melebihi biaya marjinalnya, dihitung dari angka yang dibaca dari pool pada titik pemisahan itu, tanpa ambang tetap yang harus disetel. Satu-satunya gerbang numerik adalah 25 ppm di atas leg tunggal terbaik, dihargai dari titik impas yang diukur 3 ppm di Base.

বাংলা — রাউটার অতিরিক্ত লেগ কেবল তখনই খোলে যখন তার প্রান্তিক আউটপুট প্রান্তিক খরচ ছাড়িয়ে যায়, দুটিই বিভাজনের সেই বিন্দুতে পুল থেকে পড়া সংখ্যা দিয়ে মাপা হয়, আর টিউন করার মতো কোনো স্থির সীমা নেই। একমাত্র সংখ্যাগত গেট হলো সেরা একক লেগের চেয়ে 25 ppm বেশি, যা Base-এ 3 ppm মাপা ব্রেক-ইভেন থেকে নির্ধারিত।

Filipino — Nagbubukas lamang ang router ng dagdag na leg habang lumalampas ang marginal output nito sa marginal cost nito, na tinataya gamit ang mga numerong binasa mula sa mga pool sa puntong iyon ng split, nang walang nakapirming threshold na ia-adjust. Ang nag-iisang numeric gate ay 25 ppm sa ibabaw ng pinakamahusay na iisang leg, na itinakda mula sa break-even na nasukat sa 3 ppm sa Base.

Short answer: when the marginal output of the extra leg is larger than its marginal cost, evaluated on numbers read from the pools at that point of the split. There is no fixed threshold to tune and no model of each venue to maintain. The stopping rule is the inequality itself.

The whitepaper calls this the second law under the meta-equation (section 2.9): measuring beats recomputing. Where a quantity can be read, the router reads it; it does not re-derive it from a model that could drift from the pool.

The stopping rule

A leg is opened only while its marginal output exceeds its marginal cost, written as the partial of mu against the partial of gamma times g. Output is what the user receives; the cost term is what the extra leg spends. The marginal output is taken from a probe of the pool, not from a curve fitted in advance.

The probe is small on purpose. Each candidate is quoted once at a hundredth of the order, or at the whole order when that floors to zero. One call returns both its marginal rate and its depth. A stale-priced pool has a wrong marginal rate at any size, while a small but healthy pool has a correct marginal rate and merely a poor full-size output, so the probe separates two signals that a full-size quote would blend.

A split you can check with a calculator

The whitepaper's worked example sends one order of 100 to two pools of the same pair, both at a 0.30 % fee. Pool A holds 1,000 on each side and pool B holds 4,000. Weights follow measured depth against the deepest candidate, so A takes 20 % of the order and B takes 80 %.

RouteArithmeticYou receive
All 100 into A1,000 x 99.7 / (1,000 + 99.7)90.661
All 100 into B4,000 x 99.7 / (4,000 + 99.7)97.275
20 into A, 80 into B1,000 x 19.94 / (1,000 + 19.94) + 4,000 x 79.76 / (4,000 + 79.76)19.550 + 78.201 = 97.751

Source: Whitepaper 2.4, section 10, worked example 2.

The one numeric gate, and where its value comes from

The split beats the best single pool by 0.476 tokens, which is 48.9 bps of the best single pool's output. Before the split is kept it must clear a gate: its output has to be at least the best single leg multiplied by 1 plus 25 parts per million. For the example above that threshold is 97.275 x (1 + 25 / 1,000,000) = 97.278, and 97.751 clears it with room to spare.

The constant is `MIN_SPLIT_IMPROVEMENT_PPM = 25`. The allocator carries no gas-price term, because comparing gas in the native token with output in the trade's token would need exactly the price oracle the protocol refuses to have. The gate is the oracle-free stand-in, and the whitepaper prices it from a measurement: the true break-even between a leg's gas and its improvement measured 3 ppm on Base, and the gate sits at about eight times that.

It is written in parts per million because a quarter of a basis point does not exist in basis points. Its history is on the record too: 20 bps, then 5, then 0.25, a record of values that had not been calibrated against a measurement.

  1. Probe each candidate at a hundredth of the order and read marginal rate and depth together.
  2. Weigh each leg by measured depth against the deepest candidate and form the split.
  3. Compare the split with the best single leg. Keep it only if it clears the 25 ppm margin; otherwise collapse to one leg.
  4. For splits of three or more legs, ask the same question of each leg: it stays only while the split with it pays at least that margin more than the split without it.

A venue that looks deep and is not worth using

Depth alone can mislead, because a split by depth is the best split only where every leg pays one price. The guard called every leg pays for its place covers that case. In the test that pins it, beside two honest venues at 0.3 %, a venue charging 10 % with 0.3 times their depth took 23.1 % of an order a tenth of each, and the route paid 1.10 % less than it did without that venue.

The guard asks of each leg what the gate asks of the whole split, and the trials stop at the first leg that pays. The figures are recorded in the header of the test, `test/SplitLegPaysForItsPlace.t.sol`, as measured at commit 3975a50.

What this does not claim

It does not say 25 ppm is the right number for every chain. It says the number is anchored to one measured break-even on Base and is kept eight times above it, so the gate rejects splits whose gain is smaller than the gas they cost. The user's own check is the same as ever: compare the improvement the router claims against the gas your wallet shows before you confirm.

Do not trust this page — reproduce it

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

grep -n MIN_SPLIT_IMPROVEMENT_PPM src/BlazePhoenixSolver.sol   # 25, line 95 at commit 969bcc6, in a checkout of the V2 repository. Then reproduce the table: python3 -c "print(1000*99.7/(1000+99.7), 4000*99.7/(4000+99.7), 1000*19.94/(1000+19.94) + 4000*79.76/(4000+79.76), 4000*99.7/(4000+99.7)*(1+25/1e6))" prints 90.661, 97.275, 97.751 and 97.278 once rounded to three decimals. Reading: sections 2.9, 10 and 10.4 of the 2.4 whitepaper.
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). Measuring beats recomputing: the inequality that opens a leg, and the one gate it needs. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/measuring-beats-recomputing/
@misc{blazephoenix_measuring_beats_recomputing,
  title  = {Measuring beats recomputing: the inequality that opens a leg, and the one gate it needs},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/measuring-beats-recomputing/},
  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).

Related engineering

Next in Execution semantics · 2 / 7
Two hops, five legs: the largest route shape, and why the bound is a product ›A route is at most two hops, each split across at most five parallel legs, so at most ten legs. The bound is the product of two constants, produced once and read by the Router, the Quoter and the Solver.7 min

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

Go to APP