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

> Canonical: https://blazephoenix.xyz/learn/measuring-beats-recomputing/
> License: CC BY-NC-ND 4.0 (attribution + link) · © 2026 BlazePhoenix
> Updated: 2026-11-16

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.

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 %.

## 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.

## 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.

**Verify it yourself:** 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.

Related: https://blazephoenix.xyz/learn/closed-form-optimal-split/ · https://blazephoenix.xyz/learn/why-splitting-wins/ · https://blazephoenix.xyz/learn/verifying-beats-solving/
