What you gain from this page is the single most useful question to ask of any test suite: if the code were wrong, would these tests notice? A green suite cannot answer it by being green. Mutation testing answers it by making the code wrong on purpose, one line at a time, and running the tests to see which one objects.

Mutation testing for beginners: we break our own code on purpose to see whether the tests notice
A mutant is a deliberate one-line break in the contract — a fee doubled, a floor halved. Run the tests; if none goes red, the tests were not watching that line. Two concrete examples, the idea of the killing test, and why 268 of 268 is a floor and not a guarantee.
BlazePhoenix Engineering · updated 2026-09-06 · data through 2026-10-11 · 4 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 mutant is a deliberate one-line break in the contract — a fee doubled, a floor halved. Run the tests; if none goes red, the tests were not watching that line. Two concrete examples, the idea of the killing test, and why 268 of 268 is a floor and not a guarantee.
Português — Um mutante é uma quebra deliberada de uma linha no contrato — uma fee duplicada, um piso reduzido a metade. Corra os testes; se nenhum ficar vermelho, os testes não estavam a vigiar aquela linha. Dois exemplos concretos, a ideia do teste assassino, e porque é que 268 of 268 é um piso e não uma garantia.
Español — Un mutante es una rotura deliberada de una línea en el contrato — una comisión duplicada, un suelo a la mitad. Ejecuta las pruebas; si ninguna se pone en rojo, las pruebas no vigilaban esa línea. Dos ejemplos concretos, la idea de la prueba asesina, y por qué 268 of 268 es un suelo y no una garantía.
Français — Un mutant est une cassure délibérée d’une ligne du contrat — des frais doublés, un plancher divisé par deux. Lancez les tests ; si aucun ne passe au rouge, les tests ne surveillaient pas cette ligne. Deux exemples concrets, l’idée du test tueur, et pourquoi 268 of 268 est un plancher et non une garantie.
Deutsch — Ein Mutant ist ein absichtlicher Ein-Zeilen-Bruch im Vertrag — eine verdoppelte Gebühr, eine halbierte Untergrenze. Lassen Sie die Tests laufen; wird keiner rot, haben die Tests diese Zeile nicht beobachtet. Zwei konkrete Beispiele, die Idee des tötenden Tests und warum 268 of 268 eine Untergrenze und keine Garantie ist.
Русский — Мутант — это намеренная однострочная поломка в контракте: удвоенная комиссия, вдвое сниженный пол. Запустите тесты; если ни один не покраснел, тесты не следили за этой строкой. Два конкретных примера, идея убивающего теста и почему 268 of 268 — это нижняя граница, а не гарантия.
Türkçe — Mutant, sözleşmede kasıtlı olarak yapılan tek satırlık bir kırılmadır — iki katına çıkarılmış bir ücret, yarıya indirilmiş bir taban. Testleri çalıştırın; hiçbiri kırmızıya dönmüyorsa, testler o satırı izlemiyordu. İki somut örnek, öldürücü test fikri ve 268 of 268’ün neden bir alt sınır olduğu, bir güvence değil.
العربية — الطفرة كسر متعمَّد في سطر واحد من العقد — رسم مضاعف، أو حدّ أدنى منصَّف. شغّل الاختبارات؛ فإن لم يحمرّ أيٌّ منها، فالاختبارات لم تكن تراقب ذلك السطر. مثالان ملموسان، وفكرة الاختبار القاتل، ولماذا 268 of 268 حدّ أدنى وليس ضمانة.
हिन्दी — म्यूटेंट अनुबंध में जानबूझकर की गई एक-पंक्ति की तोड़-फोड़ है — दुगुना किया गया शुल्क, आधी की गई न्यूनतम सीमा। टेस्ट चलाइए; अगर कोई भी लाल नहीं होता, तो टेस्ट उस पंक्ति को देख ही नहीं रहे थे। दो ठोस उदाहरण, मारक टेस्ट का विचार, और 268 of 268 क्यों एक निचली सीमा है, गारंटी नहीं।
日本語 — 変異体とは、コントラクトに意図的に入れた一行の壊れである — 手数料を二倍にする、下限を半分にする。テストを走らせる。どれも赤くならなければ、テストはその行を見ていなかったということだ。具体例が二つ、殺すテストという考え方、そして 268 of 268 がなぜ下限であって保証ではないのか。
中文 — 变异体是在合约里故意制造的一行破坏 — 手续费翻倍,下限减半。跑一遍测试;如果没有一个变红,说明测试根本没在看那一行。两个具体例子、杀手测试的概念,以及为什么 268 of 268 是下限而不是保证。
한국어 — 변이체란 계약에 일부러 넣은 한 줄짜리 파손이다 — 수수료를 두 배로, 하한을 절반으로. 테스트를 돌린다. 아무것도 빨개지지 않는다면, 테스트는 그 줄을 보고 있지 않았던 것이다. 구체적인 예 둘, 죽이는 테스트라는 개념, 그리고 268 of 268이 왜 하한이지 보증이 아닌지.
Bahasa Indonesia — Mutan adalah kerusakan satu baris yang sengaja ditanam di dalam kontrak — biaya yang digandakan, batas bawah yang dibagi dua. Jalankan ujinya; kalau tak ada yang memerah, uji-uji itu memang tidak sedang mengawasi baris tersebut. Dua contoh konkret, gagasan tentang uji pembunuh, dan mengapa 268 of 268 adalah batas bawah dan bukan jaminan.
বাংলা — মিউট্যান্ট হলো চুক্তিতে ইচ্ছাকৃতভাবে ঘটানো এক লাইনের ভাঙন — দ্বিগুণ করা একটি ফি, অর্ধেক করা একটি নিম্নসীমা। টেস্টগুলি চালান; কোনোটিই যদি লাল না হয়, তবে টেস্টগুলি ওই লাইনটিকে পাহারা দিচ্ছিল না। দুটি বাস্তব উদাহরণ, হত্যাকারী টেস্টের ধারণা, এবং 268 of 268 কেন একটি নিম্নসীমা, গ্যারান্টি নয়।
Filipino — Ang mutant ay isang sinadyang isang-linyang sira sa kontrata — dinoble ang bayad, hinati sa dalawa ang sahig. Patakbuhin ang mga test; kung wala ni isang pumula, hindi pala binabantayan ng mga test ang linyang iyon. Dalawang kongkretong halimbawa, ang ideya ng killing test, at kung bakit ang 268 of 268 ay isang sahig at hindi isang garantiya.
The idea in one paragraph
A mutant is a copy of the program with one deliberate change: a plus turned into a minus, a check deleted, a constant doubled. Run the tests against the mutant. If at least one test fails, the mutant is killed — that line is watched. If every test stays green, the mutant survived, and the suite has just been shown a line it does not see. The test that fails is called the killing test, and in this repository each mutant is written down together with the one test that must kill it, by name.
Example one: the fee doubled
The protocol fee is 28 basis points (0.28%). One mutant changes the line that computes it so the rate is multiplied by two. On a 1,000-unit input the fee would become 5.6 units instead of 2.8. The tests were run against that mutant, and one of the stateful properties — invariant_FeeNeverExceedsProtocolMax, a check that the fee never exceeds the protocol’s maximum — went red in 27 seconds. Killed. The line that sets the fee is watched, and the watcher has a name.
Example two: the floor halved
The floor is the minimum the Router will accept for a fill; below it, the swap is refused. One mutant changes the refusal so it fires only when delivery falls below half the floor — in effect, removing the floor for any shortfall smaller than half. On the first measurement, nothing noticed. No campaign in the suite had ever moved a pool against a quoted route, so honest pools always paid the quote, the floor never had to bind, and a halved floor looked identical to a whole one.
That survivor was the finding. The campaign was given the action it lacked — a whale moves the pool against the user, then the stale route executes — and a new property, invariant_DeliveredNeverBelowTheProtocolFloor, reads the floor the Router published and the floor the route attested. Under the halved check, 13 of 20 drifted settlements delivered below the attested floor and the property fired. Killed, the same day, with the reason recorded.
| mutant | what it breaks | killing test | seconds |
|---|---|---|---|
| the protocol fee doubles | the fee ceiling | invariant_FeeNeverExceedsProtocolMax | 27 |
| the protocol floor is halved | the floor | invariant_DeliveredNeverBelowTheProtocolFloor (after the campaign gained a whale action) | 52 |
| the final transfer pays one wei less | the Router holding nothing | invariant_RouterHoldsNothing and two others | 26 |
| the post-fee userMinOut check is halved | a regression sentinel | survives, by design — no campaign holds a fee-on-transfer output token; two unit mutants watch it instead | 26 |
Source: invariant-mutants.json, 2026-09-05: 15 mutants against 39 invariants on one seed, 14 killed, 1 survived
Why 268 of 268 is a floor
The full register holds 268 mutants, each paired with its killing test, and 268 of 268 are killed. That sounds like a perfect score and is better read as a floor. The 203 are a hand-written list: each exists because a specific line was worth watching. Killing all of them says the suite watches those lines. It does not say the list contains every way the contract could be wrong — a break nobody thought to write is not in the denominator. The honest sentence is: every deliberate break in this list is noticed, and the list is public.
Two more habits keep the number honest. A break the compiler silently undoes — the same machine code before and after — is reported as inert, not as killed, because a change that produces no different program watched nothing. And every mutant is checked to still point at exactly one real line, so a later edit cannot quietly leave a watcher pointing at nothing.
Try the question yourself
You do not need to run anything to use the idea. The next time a project says its tests pass, ask which line a wrong fee would trip, and which test would trip it. If the answer is a name, the line is watched. If the answer is “the tests”, nobody has checked.
Do not trust this page — reproduce it
Every claim above is checkable against the chain. Start here:
git clone https://github.com/blazephoenixxyz-crypto/Blaze-Phoenix-Dex && cd Blaze-Phoenix-Dex && python3 .github/scripts/mutants.py # every mutant, its killing test, and killed / inert / survivedCite this article
Licensed CC BY 4.0 — quote, translate and reuse freely, including commercially, with attribution and a link. Copy a ready-made citation:
BlazePhoenix (2026). Mutation testing for beginners: we break our own code on purpose to see whether the tests notice. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/mutation-testing-for-beginners@misc{blazephoenix_mutation_testing_for_beginners,
title = {Mutation testing for beginners: we break our own code on purpose to see whether the tests notice},
author = {BlazePhoenix},
year = {2026},
url = {https://blazephoenix.xyz/learn/mutation-testing-for-beginners},
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
- The mutation guard: 268 named breaks, each paired with the one test that must die ›
- Invariants, in plain words: why some software cannot lie to you ›
- What 1,320 tests mean for you — and why the count alone means little ›
- Check every claim on this site yourself, without being a developer ›
- What an audit means, what it does not, and what “verified” means on this site ›
Questions, a partnership or a bug to report? Contact us or email contact@blazephoenix.xyz