Launch app
Cover: What 54 invariants and 1,895 mutants mean for you

What 54 invariants and 1,895 mutants mean for you

What do these numbers say about my swap?

An invariant is a rule that the tests try to break thousands of times. A mutant is an error planted on purpose to see whether the tests notice. Here is what each number counts, and what it does not.

BlazePhoenix Engineering · article updated 2026-11-16 · site dataset through 2026-11-30 · 5 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 — An invariant is a rule that must still be true after any sequence of actions, and a mutant is an error planted on purpose to see whether the tests turn red. In the V2 source at commit 969bcc6, 54 counts stateful invariants in 18 files and 1,895 counts registered mutants. These numbers describe how the code is tested, not a probability that it is correct, and they say nothing about V1.

Português — Um invariante é uma regra que tem de continuar verdadeira depois de qualquer sequência de ações, e um mutante é um erro plantado de propósito para ver se os testes ficam vermelhos. No código-fonte da V2 no commit 969bcc6, 54 conta invariantes com estado em 18 ficheiros e 1,895 conta mutantes registados. Estes números descrevem como o código é testado, não uma probabilidade de estar correto, e nada dizem sobre a V1.

Español — Un invariante es una regla que debe seguir siendo verdadera tras cualquier secuencia de acciones, y un mutante es un error plantado a propósito para ver si las pruebas se ponen en rojo. En el código fuente de V2 en el commit 969bcc6, 54 cuenta invariantes con estado en 18 archivos y 1,895 cuenta mutantes registrados. Estos números describen cómo se prueba el código, no una probabilidad de que sea correcto, y no dicen nada sobre V1.

Français — Un invariant est une règle qui doit rester vraie après n'importe quelle séquence d'actions, et un mutant est une erreur plantée exprès pour voir si les tests passent au rouge. Dans le code source de V2 au commit 969bcc6, 54 compte les invariants à état dans 18 fichiers et 1,895 compte les mutants enregistrés. Ces nombres décrivent la façon dont le code est testé, pas une probabilité qu'il soit correct, et ils ne disent rien de V1.

Deutsch — Eine Invariante ist eine Regel, die nach jeder Abfolge von Aktionen weiter gelten muss, und ein Mutant ist ein absichtlich eingebauter Fehler, um zu sehen, ob die Tests rot werden. Im V2-Quellcode bei Commit 969bcc6 zählt 54 die zustandsbehafteten Invarianten in 18 Dateien und 1,895 die registrierten Mutanten. Diese Zahlen beschreiben, wie der Code getestet wird, nicht eine Wahrscheinlichkeit, dass er korrekt ist, und sie sagen nichts über V1.

Русский — Инвариант — это правило, которое должно оставаться верным после любой последовательности действий, а мутант — намеренно внесённая ошибка, чтобы проверить, покраснеют ли тесты. В исходном коде V2 на коммите 969bcc6 число 54 — это инварианты с состоянием в 18 файлах, а 1,895 — зарегистрированные мутанты. Эти числа описывают, как тестируется код, а не вероятность его правильности, и они ничего не говорят о V1.

Türkçe — Değişmez (invariant), herhangi bir eylem dizisinden sonra doğru kalması gereken bir kuraldır; mutant ise testlerin kırmızıya dönüp dönmediğini görmek için bilerek yerleştirilmiş bir hatadır. V2 kaynağında 969bcc6 commit'inde 54, 18 dosyadaki durum bilgili değişmezleri, 1,895 ise kayıtlı mutantları sayar. Bu sayılar kodun nasıl test edildiğini anlatır, doğru olma olasılığını değil, ve V1 hakkında hiçbir şey söylemez.

العربية — الـ invariant قاعدة يجب أن تظل صحيحة بعد أي تسلسل من الإجراءات، والـ mutant خطأ يُزرع عمدًا لمعرفة هل تحمرّ الاختبارات. في الشيفرة المصدرية لـ V2 عند الـ commit 969bcc6، يعدّ الرقم 54 الـ invariants ذات الحالة في 18 ملفًا، ويعدّ 1,895 الـ mutants المسجلة. تصف هذه الأرقام كيف يُختبر الكود لا احتمال صحته، ولا تقول شيئًا عن V1.

हिन्दी — Invariant वह नियम है जिसे किसी भी क्रिया-क्रम के बाद भी सच रहना चाहिए, और mutant जानबूझकर डाली गई वह ग़लती है जिससे देखा जाता है कि टेस्ट लाल होते हैं या नहीं। V2 सोर्स में commit 969bcc6 पर, 54 का अर्थ 18 फ़ाइलों में स्टेटफ़ुल invariants की गिनती है और 1,895 का अर्थ पंजीकृत mutants की गिनती। ये संख्याएँ बताती हैं कि कोड को कैसे परखा जाता है, उसके सही होने की संभावना नहीं, और ये V1 के बारे में कुछ नहीं कहतीं।

日本語 — 不変条件 (invariant) とは、どんな操作の列の後でも真であり続けなければならない規則で、ミュータント (mutant) とは、テストが赤くなるかを確かめるためにわざと埋め込んだ誤りだ。コミット 969bcc6 の V2 ソースでは、54 は 18 ファイルにあるステートフルな不変条件の数、1,895 は登録されたミュータントの数を表す。これらの数字はコードがどうテストされているかを示すもので、正しさの確率ではなく、V1 については何も語らない。

中文 — 不变量(invariant)是在任何操作序列之后都必须仍然成立的规则,变异体(mutant)是故意植入的错误,用来看测试是否会变红。在提交 969bcc6 的 V2 源码中,54 统计的是分布在 18 个文件中的有状态不变量,1,895 统计的是已登记的变异体。这些数字描述的是代码如何被测试,而不是代码正确的概率,也不涉及 V1。

한국어 — 불변식(invariant)은 어떤 동작 순서 뒤에도 계속 참이어야 하는 규칙이고, 뮤턴트(mutant)는 테스트가 빨갛게 변하는지 보기 위해 일부러 심은 오류입니다. 커밋 969bcc6의 V2 소스에서 54는 18개 파일에 있는 상태 기반 불변식의 수이고, 1,895는 등록된 뮤턴트의 수입니다. 이 숫자들은 코드가 어떻게 테스트되는지를 설명할 뿐 코드가 올바를 확률이 아니며, V1에 대해서는 아무것도 말하지 않습니다.

Bahasa Indonesia — Invarian adalah aturan yang harus tetap benar setelah rangkaian tindakan apa pun, dan mutan adalah kesalahan yang sengaja ditanam untuk melihat apakah tes berubah merah. Pada kode sumber V2 di commit 969bcc6, 54 menghitung invarian berstatus di 18 berkas dan 1,895 menghitung mutan yang terdaftar. Angka-angka ini menggambarkan cara kode diuji, bukan probabilitas bahwa kode itu benar, dan tidak mengatakan apa pun tentang V1.

বাংলা — Invariant হলো এমন একটি নিয়ম যা যেকোনো কর্মক্রমের পরেও সত্য থাকতে হয়, আর mutant হলো ইচ্ছাকৃতভাবে বসানো একটি ত্রুটি, যাতে দেখা যায় টেস্ট লাল হয় কি না। commit 969bcc6-এ V2 সোর্সে 54 গণনা করে ১৮টি ফাইলের স্টেটফুল invariant এবং 1,895 গণনা করে নিবন্ধিত mutant। এই সংখ্যাগুলো কোড কীভাবে পরীক্ষা করা হয় তা বর্ণনা করে, কোড সঠিক হওয়ার সম্ভাবনা নয়, এবং V1 সম্পর্কে কিছুই বলে না।

Filipino — Ang invariant ay patakarang dapat manatiling totoo pagkatapos ng anumang pagkakasunod-sunod ng mga aksyon, at ang mutant ay error na sadyang itinanim para makita kung mamumula ang mga test. Sa V2 source sa commit 969bcc6, ang 54 ay bilang ng mga stateful invariant sa 18 file at ang 1,895 ay bilang ng mga nakarehistrong mutant. Inilalarawan ng mga numerong ito kung paano sinusubok ang code, hindi ang posibilidad na tama ito, at wala silang sinasabi tungkol sa V1.

An invariant is a rule that must still be true after any sequence of actions, and the test tool tries to break it with random sequences. A mutant is an error planted on purpose, to see whether the tests turn red (Whitepaper 2.4 §15.1).

Think of a smoke alarm. Pressing the test button shows that the alarm can sound. Holding real smoke under it for a minute is the invariant test. Breaking the alarm on purpose and checking that the monthly test notices is the mutant.

What each number counts

All counts are for the V2 source at commit 969bcc6, and each one is printed next to what it was counted against (Whitepaper 2.4 §15.1).

NumberWhat it countsIn plain words
54Stateful invariants, in 18 filesRules checked after long random sequences of actions
20Halmos propertiesRules checked symbolically, for all inputs of a given shape
4Certora specificationsRules checked by a second formal tool
1,895Mutants registeredPlanted errors that the tests must catch
1,753Mutants run on this commit, all caughtThe part of the register run at this commit

Source: Whitepaper 2.4 §15.1; Litepaper §4

Why it matters to a swapper

The invariants include the rules you care about: the Router holds nothing after a swap, and what is delivered never falls below your minimum or the protocol floor. The invariant campaigns run 50 sequences of depth 50 with a fixed seed, so a failure can be reproduced (Whitepaper 2.4 §15.1).

The staking contract has its own count: 21 stateful invariants in 6 files. Staking is scheduled for Q2 2027 and has no address yet.

What the numbers do not say

They do not give a probability that the code is correct. The whitepaper says that testing cannot produce one, and it states none (Whitepaper 2.4 §15.11).

They describe V2, which launches on 15 December 2026. Nothing in them protects V1, the generation that is live today (Whitepaper 2.4 §19).

Count one of them yourself

  1. Check out the V2 repository at commit 969bcc6.
  2. Run the search command below and count the lines it prints.
  3. You should find 54, spread over 18 files.

Do not trust this page — reproduce it

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

In a checkout of the V2 repository at commit 969bcc6, run git grep -h "function invariant_" -- test | wc -l. The count should be 54. Add the -c option and drop -h to see the per-file counts across 18 files.
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). What 54 invariants and 1,895 mutants mean for you. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/what-54-invariants-mean-for-you/
@misc{blazephoenix_what_54_invariants_mean_for_you,
  title  = {What 54 invariants and 1,895 mutants mean for you},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/what-54-invariants-mean-for-you/},
  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 Check it yourself · 4 / 9
Why BlazePhoenix needs to trust less ›Trust less, not more: BlazePhoenix finds pools by computing their addresses, plans routes inside the contract, re-checks each trade on what actually arrived, and writes its remaining trust down as a stated policy.5 min

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

Go to APP