# BlazePhoenix-Dex Whitepaper v2.4.0 — part 8 of 9: Part VII — The token, the research programme and what you must trust > One part of the whitepaper in llms.txt form; every part and every section is listed in > https://blazephoenix.xyz/whitepaper/llms.txt. The parts are the full text, unabridged: the bodies of parts > 1-9, joined in order, are https://blazephoenix.xyz/whitepaper.md byte for byte (sha256 a47389f947e4aa6656f693004e43fbe3e0101dccaf133e49c303767811f223cc). > Cite as https://doi.org/10.5281/zenodo.24517342; numbering (§, E, INV-) as in the paper. ----- verbatim text of whitepaper.md follows ----- ## Part VII — The token, the research programme and what you must trust ## §20 Token — BZPX One billion BZPX, fixed for ever, as a plain ERC-20: 18 decimals, no mint path, no fee-on-transfer, no rebasing, no transfer hooks, no pause or blacklist: six deploy invariants, checked against the token bytecode at wiring time. Fully-diluted supply is known from genesis; scarcity is a property of the contract, not a policy. | Allocation | Tokens | Share | Note | |---|---|---|---| | Market liquidity | 520,000,000 | 52.0 % | the float the aggregator routes through | | Staking emission | 180,000,000 | 18.0 % | two independent deployments of 90,000,000 each (§25.8); the V4 emission design is in §25 | | Airdrop & Bounties | 130,000,000 | 13.0 % | one pool: the former 50,000,000 airdrop, the former 50,000,000 research pool of §21, and 30,000,000 moved out of market liquidity | | Team and operations | 103,000,000 | 10.3 % | the only locked insider tranche; 30-month linear vesting | | Partners and ecosystem | 60,000,000 | 6.0 % | integrations, venue partnerships | | Marketing | 7,000,000 | 0.7 % | launch awareness | ^tab-20 The allocation above is the one the project serves at `/facts.json`. ![FIG-20b — Allocation of 1,000,000,000 BZPX](https://blazephoenix.xyz/whitepaper/figs/v2.4/fig-20b.svg) *FIG-20b — the allocation as a single stacked bar of 1,000,000,000 BZPX with the six segments of TAB-20; the staking segment is two halves of 90,000,000.* **What changed in September 2026.** The airdrop and the security-research pool were two lines paying the same people for the same thing: reading the protocol hard and using it for real. They are now one line of 130,000,000 BZPX: 50,000,000 from the airdrop, 50,000,000 from the research pool, and 30,000,000 taken from market liquidity, which moves from 550,000,000 to 520,000,000. Nothing was taken from anyone else's line, and the supply is still exactly one billion. (Historical entry, dated; kept as in 2.3.) The token contract's on-chain record, once published, is the canonical version of this table. At the time of writing the token has no provisioned liquidity and no token generation event; on-chain volume of zero is the expected state of this stage, not a signal about the code. ## §21 Research programme Before this project had a research programme worth the name, independent researchers read the source hostilely — unasked, with nothing promised — and disclosed what they saw privately. The code this paper describes is the code that survived their reading. What each of them reported, and what became of it, lives where such records belong: in the repository's `SECURITY.md` and `SECURITY_HALL_OF_FAME.md`, next to the code, where every entry can be checked in both directions. This section records who they are, what hostile reading pays, and the shape of what it found. **The researchers.** NetGakarot · duxun · AmanDara1 · amitbhakar · auditor_1b3f2c · siam siddik · Thomas · llen · destinyae · superagent · Mohd Huzaifa · Raditya · bai bo · Josh W · Borutobro · mohaseenkatika · mohaseenbasha · Karan Rathod · Seavia Resources · acit aja · Brian Wahyu · M2000 Slash · Binod Bk · CHARIR ABDELHAMID · and one researcher who chose to remain anonymous. These are the names credited in 2.3.1; the repository's `SECURITY_HALL_OF_FAME.md` at `6387350` now credits seventy-six researchers, and is the list of record. No report has reached the Critical class. Attribution is never rounded down: names are published exactly as given. Security awards are paid at the bands below, which are unchanged from 2.3. | Severity | Award | |---|---| | Critical — direct theft or permanent freezing of user funds | 2,500,000 – 7,500,000 BZPX | | High — theft under specific conditions, or protocol insolvency | 625,000 – 2,500,000 BZPX | | Medium — griefing, temporary denial of service, value leakage | 125,000 – 625,000 BZPX | | Low — demonstrated impact below the above | up to 125,000 BZPX | Awards are paid in BZPX — quantity and schedule promised, market value not — with payouts beginning after the 15 December 2026 launch and reports triaged now. One clause is deliberate: a report need not break a conservation law to be in scope — a redistribution that systematically pays the wrong party while the books balance is priced like a theft, because that is the class only hostile readers catch. **What the record contains, by class.** Every confirmed finding became a named property, a regression test that fails against the pre-fix code, and a mutant the test must kill; the classes, one sentence each, by reference to the register: - *Two producers of one quantity* — a planner and an executor, a preview and a delivery, answering one question in two frames (the floor's impact aggregation, the bridge named by the preview against the hop the fee anchors on, the leg budget across two contracts, the frozen bridge bit against the live predicate): closed by collapsing to one producer or by a named parity test, and enumerated as a register with a CI rule. - *A caller-supplied quantity where a measurement existed* — the fee base read from `route.totalOut`, the registry's fee and hooks written from calldata, depth declared rather than measured, a published volume that reported the declaration: closed by measuring, and by the field classification of §16.4. - *Absence read as permission* — a final hop that could not be quoted in-frame leaving the floor inert, a coverage gate a caller could switch off by writing zero, an empty fee list that quoted a whole family at zero: closed by falling back to the attested or measured figure, never to nothing. - *A pin on the wrong object* — a factory's derivation origin that a proxy could move while its codehash stayed, a hook's runtime pinned where its implementation could move: closed by attesting the answer where the code cannot be pinned, and by stating the residual at the site where it cannot be closed. - *Fail-open in a quote* — the stable curve's domain guard that itself overflowed on dust, found by the N-version lane: closed red-first with the repair smaller than the code it replaced. - *A fix applied to one of two symmetric channels* — the defect signature this codebase names first, met repeatedly; every closure now searches for the sibling before it merges. The invitation is the point of the section, and it is standing: independent readers are invited, in public, and paid, in a currency whose quantity is fixed. Report privately, through the disclosure channel in the repository's `SECURITY.md`. ## §22 What you must trust, and what you need not Every protocol asks to be trusted somewhere; almost none can enumerate where. Here is the full list, each power stated with the line that bounds it. - **The venue registry, the bridge list and the V4 hook allow-list** — curated; a hostile listing's worst case is bounded by the stricter of your minimum and the Iron-Law floor Φ; principal it cannot reach (§9.6, §14.6). - **The Router's control key, before renunciation** — can transfer itself (`setAdmin`), repoint both treasury slots (`setTreasuries`, which also redirects any fee the slots are owed), pause swaps, repoint the WETH and Permit2 contracts its native and Permit2 doors call, and recover mis-sent tokens behind a 48-hour public delay (a rescue never takes the fees the slots are owed); cannot move the fee rate, the split or the floors (compile-time constants, no setters) or reach principal (no proxy, no upgrade path, no `selfdestruct`). The only balance the Router holds at rest is fee owed to a treasury slot: a fee push the token refuses is booked in `owed[token][slot]` instead of reverting the swap. - **The Hub's control key, before renunciation** — can repoint the Hub's view of the Router, Solver and Quoter, repoint the V4 manager, pause the registry's learning, and grant operator seats; cannot misprice a fill, because nothing that prices a trade reads the registry. - **The treasuries** — two fee slots, set at construction (a zero argument falls back to the admin). Before renunciation the Router's control key can repoint both with `setTreasuries`, which refuses the zero address; `renounceControl` (refused while paused) freezes that for ever. Each treasury can always move its own slot, and only its own, with `moveTreasury`, also after renunciation, so a payee the fee token blacklists is not stuck. A fee the token refuses to push is booked to the slot in `owed[token][slot]` and pulled by the slot's current holder with `claimFee`. The 30 / 70 split is a compile-time constant with no setter. - **The canonical contracts the doors depend on** — Uniswap's Permit2 for the Permit2 door, the chain's WETH for the native door, the PoolManager for V4 legs: each is called only through its door or its leg, and the Router prices every leg off its own measured balance delta, so a dishonest counterparty collapses the output and your bound refuses the swap. - **The token and the correspondence** — that BZPX satisfies its six deploy invariants, and that the addresses you call correspond to this text: checkable the moment §19's records publish, by the procedure §19 specifies. - **The Gate: external venues** — Balancer, Curve and the other venues that are reached through an adapter are reached only through an immutable wrapper in front of a curated adapter whose codehash is pinned; adding or replacing one waits `ADAPTER_DELAY` (48 hours) and a pair has at most four wrappers; a hostile venue's worst case is still bounded by your minimum and the floor (§14.4). - **The site and the app** — add no trust to the trade: the quote is reproducible on your own RPC and the swap is bounded by your minimum, whatever the page displays (§14.5, §27). What you need not trust: anyone to price your trade — the route is derived in the executing frame from public state, or re-measured there if you supplied it; anyone to route it fairly — the floor is re-derived on-chain from measured output and the fee has no term that grows with the gap between quote and delivery; anyone to count the fee — the Router settles no swap without paying the fee or booking it to the treasury's slot; and anyone to keep serving you — if every server this project operates disappeared tonight, the contracts would quote, route and settle tomorrow exactly as they did today. And if you keep one habit from this document, make it the minimum you set on your own trades. Every bound in the aggregator falls back to that number; it is the only protection in the system whose quality depends on nobody's competence but yours. > **License: source-available, not open source.** The DEX source is published under the Business Source License 1.1 (BUSL-1.1). You may read it, build it and run it to check what we claim, but BUSL-1.1 is not an open-source license and this paper never calls it one. Licensor: BlazePhoenix Protocol. Change License: GNU General Public License v2.0 or later. Change Date: 2030-06-01 (README.md:47 and LICENSE:5, 11, 12 at `6387350`). The license text converts on the Change Date or on the fourth anniversary of the first publicly available distribution of the code, whichever comes first (LICENSE:37–40). Production use before conversion is limited by the license's Additional Use Grant, which you should read in the repository rather than in this paper. ## §23 Related work **Routing.** Angeris, Evans, Chitra and Boyd cast routing across constant-function market makers as a convex program whose optimum equalises marginal prices across venues; Diamandis, Resnick, Chitra and Angeris give an efficient dual-decomposition algorithm for it. This design sits deliberately short of that optimum on chain: the Split Allocator is proportional-to-depth in one pass (§10.4), which needs no iteration and no per-venue curvature model and is robust where an iterative solver is a gas bill and an attack surface; the metamorphic lane measures the distance the choice costs — the split never pays less than the best single pool (MR-R1) and the fidelity matrix places the Solver's route within 0.01 bps of an exhaustive 10 % split grid on Arbitrum (−0.0072 bps), Optimism and Robinhood Chain (equal to the wei), and 1.178 bps above it on Base, where the 10 % grid is therefore not the optimum (§17.2, `969bcc6`). The exact marginal-return-equalising closed form for the constant-product family is two sums and a square root per venue and is a candidate for a later release; the objective is flat near its optimum, which is why the robust rule ships first. Off-chain solver designs move the optimisation to a server and reduce the contract to a checker; the Dependency Budget of §3.1 is this paper's statement of what that costs. Recent work extends the model with gas: *Optimal Routing across Constant Function Market Makers with Gas Fees* shows gas widening no-trade regions and interacting non-trivially with fragmentation, and *Routing Frictions and Executable Liquidity in Fragmented Markets* separates advertised from executable liquidity — the distinction this design measures in-frame rather than models. **Robust aggregation.** The believability centre of §10.3 is a depth-weighted median, whose breakdown point is half the weight. Müller, Moumeni and Messaoudi, *Cost of Manipulation in AMM-Based Oracles* (FC 2026), prove the corresponding bound for oracles that aggregate AMM prices: with equal weights the cheapest attack moves the shallowest pools, while with liquidity weights controlling half the weight requires at least half the total quote depth. Ormer proposes a median-estimating on-chain oracle in place of the TWAP mean, and *From Means to Medians* studies which benchmarks are hardest to manipulate. E25 applies the same principle to routing: a pool is believed only as far as capital at risk stands behind it. **Venues.** Uniswap v2 gives the constant-product reference and the 30 bps convention the V2 branch defaults to; Uniswap v3 the concentrated-liquidity model, `slot0` and Q64.96 fixed point the closed form of §4.2 follows; Uniswap v4 the singleton, flash accounting and the hook-permission address encoding that §5 and §14.2 rest on — the design here is, to our knowledge, the first to derive, prove, price, screen and settle V4 pools entirely in-frame. Egorov's StableSwap defines the amplified invariant of the Curve family, which this protocol does not price in its Core and reaches only through the Gate, behind a code-pinned adapter (§14.4); the Solidly stable curve of §6 has no peer-reviewed paper and is cited by its deployed implementations. **MEV.** Daian et al. named the ordering adversary and showed its scale; Zhou et al. measured sandwich attacks on decentralised exchanges and formalised their profitability. This paper claims no elimination — ordering is decided before contract code runs — and instead measures the bound: the sandwich curve of §14.3, from the attacker's side, with the refusal edge and the attacker's negative round trip past it. **Verification.** Clarkson and Schneider's hyperproperties name the class the redistribution findings of §21 belong to — properties of sets of traces, not of one trace — and why a conservation law can hold while the wrong party is paid. Cousot and Cousot's abstract interpretation is the frame for the single-tick closed form: an abstraction of the venue's mathematics that is exact within a range and sound in one direction outside it, with the floor as the concretisation check. Chen, Cheung and Yiu introduced metamorphic testing, the second judge of §15.7 where no oracle independent of the formula exists. DeMillo, Lipton and Sayward introduced mutation analysis, whose coupling hypothesis the curated guard of §15.2 relies on. Avizienis's N-version programming is the ancestor of §15.8, applied to code generation rather than to independent teams. Kuhn, Kacker and Lei's combinatorial testing gives the covering arrays of §15.4 their construction and their claim: every t-way interaction of regime factors exercised by construction, with the denominator printed. Littlewood and Strigini's result on validating ultra-high dependability is why no probability of correctness is stated anywhere in this paper. **Standards.** EIP-1153 transient storage carries the One-Callback Doctrine's leg context, the fee ledger and the reentrancy lock; EIP-170 is the 24,576-byte wall the Router and Hub sit 1,859 and 2,796 bytes under (1,283 and 2,220 under the project's own 24,000-byte guard); EIP-1014 is the CREATE2 arithmetic of 𝒟; EIP-2612 and Uniswap's Permit2 define the signature-based transfer of the second door; ERC-7201 namespaces the Hub's storage; EIP-7702 delegated accounts call the same doors as any contract. ## §24 Conclusion This paper has described one machine and one discipline, and the discipline is the part that travels. Nothing that a stranger can supply is allowed to choose its own shape, its own domain or its own floor (§2); a number that comes from the caller is measured, re-homed, or made costly to lie about; every guard has a mutant that turns it red (§15.3); and the question "what is this quantity?" has exactly one producer (§2.5). The same habit applies to the text. Every number here carries its denominator and the command that reproduces it (§15.1), and what none of the evidence establishes is said in plain words (§15.11). Where this paper could not measure something, it says so in place, rather than rounding the gap into a claim. A reader who finds a number without a command, or a sentence that outruns its evidence, has found a defect in the paper, and we want the report. The software is not finished by being described. The DEX source is source-available under BUSL-1.1, not open source; the staking engine is a pre-launch engineering preview. No external audit yet. Inspect it yourself: the code, the tests, the mutants, the bounty. ## Revision history ### Version 2.4.0 (2026-11) 2.4.0 describes the V2 generation of the DEX at `6387350` and the Staking V4 engine at `9958d5f` (measurements stay dated at `969bcc6`, 2026-11-16); the V1 generation is described only as the deployed one, in §19. What changed against 2.3.0, each item checked against the commit named: 1. Route shape: at most 2 hops (`MAX_HOPS = 2`, was 3) and at most 5 legs per hop (`MAX_LEGS_PER_HOP = 5`), so a route has at most 10 legs (2 hops × 5 legs, was 11); the solver has 4 topologies, the direct route and three through a bridge (`TOPOLOGIES = 1 + BRIDGE_SLOTS = 4`, was 13). 2. Architecture: the Router, Solver, Hub, Quoter and Core are joined by the Gate, which puts every external venue behind an immutable per-venue wrapper (Balancer V2 and V3, Curve StableSwap-NG, Twocrypto and Tricrypto-NG, among others), by the Math library and by the adapters. The 2.3 statement that Curve and Balancer were excised is withdrawn (§18). The deployed-size table (§16) lists 16 artifacts, with a total of 167,321 bytes of runtime. 3. Assurance: 54 stateful invariants in 18 files, 4 Certora specifications and 1,895 mutants (Appendix B), as stated in the repository README at `969bcc6`, which the invariant listing of Appendix B matches; 15 Halmos checks report `[PASS]` in the CI run at commit `6387350` (Appendix B.3). 4. Staking V4: the emission is 90,000,000 BZPX over eight years per deployment, a 60,000,000 BZPX linear base plus a 30,000,000 BZPX series that halves every two years (§25.3, E27); the equations E27–E30 are restated and the line numbers of E31–E42 are those of `9958d5f`; INV-24 is restated: the schedule closes exactly, at `BASE_REWARDS + S - (S >> EMISSION_PERIODS) = TOTAL_REWARDS` with remainder 0 wei. 5. Measurements: §17 keeps the 2.3 measurements with their date and commit, and adds the lines measured on 2026-11-16 at `969bcc6`. 6. Interfaces: a new section, §27, describes six ways to reach the DEX, each read at a named commit: the SDK (1.6.0 on npm at `bb41243`; main `2d2fc39`), the local MCP server (1.3.0, `3514804`), the hosted MCP and the API (`01c5468`), the Hermes plugin (1.0.0, `cf38638`) and the APP, with who performs the RPC and what each verifies (TAB-27.1, FIG-27). 7. Changes merged after `969bcc6`, each with its regression test: the fee-on-transfer leg ratio is measured, not recovered from a clamped slot (#137); the impact ceiling asks the leg's own book before refusing (#139); the funnel reads each book under the bar before dropping it (#138); the stable Newton exit steps down while the wei below still holds K (#141); the route floors read the declared gross, `outCap` (#132); the encode doors ask the Router's route protocol floor (#130); the release Yul step sequence drops the FunctionSpecializer, which changes the deployed sizes (#136). In the staking engine, after `c0366cf`: `syncEquity` writes off a position whose stake no longer exceeds its debt (#42). 8. Status: the V2 DEX and the staking engine are pre-launch engineering previews. No external audit yet. ### Version 2.3.0 (2026-10-14) 2.3.0 — adds the Staking V4 design chapter (§25), with equations E27–E42, invariants INV-23–INV-31 and figures FIG-19–FIG-21; it supersedes the statement below that the staking engine is no longer described in this paper. Elsewhere only the version labels, the enumeration ranges, the appendix introductions and the DOI lines change; the rest is the 2.3 text. ### Version 2.3 (2026-09-24) Version 2.3 continues the 2.2 line; the 3.0 numbering used briefly for a draft of this text is withdrawn, as the 3.0 numbering of 2026-09-01 was before it. What changed against 2.2: the eighteen innovations are named, numbered I-1 to I-18 and stated with their mathematics at the front of the paper, with a scoreboard of the measured record; every figure is re-measured against `main` at `8916545`; the staking engine is no longer described here (its own specification carries it); the token section records the single Airdrop & Bounties pool of 130,000,000 BZPX; and the errata of 2.2, below, are folded into the text they corrected. ### Errata to 2.2 (2026-09-07) Applied after a hostile read of the 2026-09-06 text against `main 8949a9d`; the version line stayed 2.2. Each item names what the text said and what the checkout says. 1. §4.2 — the boundary clamp `sqrtBoundary` is defined in the Core but not yet wired into ranking or the in-frame promise; the text said it was applied on the promise side. Open item: wire it (`Router._v4LegQuote`, Core ranking arm), with a red-first test that delivers below the net quote beyond the E21 buffer when a V4 leg leaves its range. 2. §10.4 — the capacity clamp excludes V4 legs (the Solver skips the balance read for kinds 4 and 8); the text said every concentrated leg was clamped. Open item: a physical bound for the singleton. 3. §5.4 — a static-fee V4 key ignores the manager's protocol fee (zero on every chain served today); the text called the key fee unambiguous. 4. §9.3 — the eviction margin runs down to about 25 % (incumbent 51, newcomer 64), not 3 %; the earlier figure violated E13 and was copied from a source comment. 5. §15 and the abstract — 43 `invariant_*` functions (the printed command returns 43), 217 `.t.sol` files. 6. §14.1 — `HubE(6)` does not exist; factory exhaustion is `HubE(4)`, slot exhaustion is `_canInsert`. 7. §14.2 — "any one layer suffices" withdrawn: the layers bound delta alteration; the fee-override residual of §5.4 is bounded by the floor. 8. §11.4, INV-21 — the route-shape rule is canonical order route-wide (`sawHooked`), not "hooked only in the last hop". 9. §11.3, E24 — the aggregate hop floor's slack is divided by BPS: 20 % of the average attested leg. 10. §17.3 and Appendix C — the `FactoryCensus` harness lives in the private deployment tree; the table is reported, not reproducible from this checkout. 11. §17.5 — the gas reference is named (KyberSwap `MetaAggregationRouterV2`, Base fork, 2026-08-22, Paraswap as second comparator) and the per-transaction ratio (2.7×) is printed beside the per-leg one; the harness and captured calldata are private, so the numbers are reported, not reproducible from this checkout. 12. §17.2 — "the chain's first V4-routed aggregation" withdrawn; "exact" replaced by the measured band (0–1 bps). 13. INV-8, INV-10, INV-15, INV-20, INV-22 — enforcement citations corrected to the tests and codes that carry them; INV-22 names the four deployed contracts. 14. §1 — the survey of aggregators is bounded to the seven named, as documented on 2026-09-07. 15. References 16 and 20 — EIP-1153 is by A. Akhunov and M. Salem; EIP-7702 by V. Buterin, S. Wilson, A. Dietrichs and M. Garnett. 16. §2.3, §15.11, §21 — instrument-calibration and defect-pattern counts replaced by the calibration rule itself. - §14.2, Layer 2 (2026-09-07, hook admission): the allow-list curates the automatic door and the codehash pin pauses a listed hook whose code moved, on every door. A hook whose address bits carry no swap permission never runs in a swap and needs neither list nor pin. A hook that runs in the swap and that nobody listed is accepted on the explicit door as the caller's signed choice, bounded like every venue by the in-frame promise, the attestation gate and `userMinOut`; it is never proposed by the automatic door. Registering a hooked pool admits and pins its hook, so a hooked pool is one operator step. The three layers stand; "default closed" describes the automatic door. ### Errata to 2.2 (2026-09-24) Applied after the ninth bounty wave; the version line stayed 2.2. 1. §4.2, and item 1 of the 2026-09-07 errata — closed. A V4 pool is quoted by walking its own book: its price, liquidity, tick bitmap and ticks, read through `extsload`, with the PoolManager's own step arithmetic, for ranking and for the promise alike (`Core.v4WalkOut`). The boundary clamp `sqrtBoundary` is retired. The statement that the dispatcher does not replicate tick-crossing arithmetic now holds for the V3 family only. 2. §10.4, and item 2 of the 2026-09-07 errata — closed for the purpose it served: the walk counts only the liquidity the book holds in the ticks it crosses, so a V4 leg is bounded by what its own pool holds (`test_AOneTickRangeWithNothingBeyondPaysWhatItHolds`). 3. Item 3 of the 2026-09-07 errata — closed: a static-fee key composes the manager's protocol fee with the key's LP fee in the swap's direction (`Core.effV4Fee`; `test_StaticKey_ProtocolFee_ReachesThePromise`). 4. §4 — every read the quote path makes of a pool is gas-capped and copies a fixed number of words; the two that were high-level calls (the Solidly pair's `getAmountOut`, and `factory()` then `getFee`) ask through `Core._askWord` (`test/APoolsAnswerIsBoundedByTheReader.t.sol`).