Connect
Cover: EIP-170 as a measured gate: every guard is paid for in bytes, and the build counts them

EIP-170 as a measured gate: every guard is paid for in bytes, and the build counts them

How close are the V2 contracts to the Ethereum contract size limit, and who checks?

Ethereum caps deployed runtime code at 24,576 bytes. The V2 build fails at 24,000 and a test enforces the same line, so the margin of each contract is a published number and every added guard has to fit.

Known formally as The size gate: 24,000 bytes in CI against the 24,576-byte limit in the BlazePhoenix whitepaper.

BlazePhoenix Engineering · article updated 2026-11-16 · site dataset through 2026-11-19 · 6 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 — The V2 contract size limit is enforced by the build, not by care: EIP-170 caps runtime code at 24,576 bytes, the release-profile CI job fails a contract at 24,000 bytes, and a test enforces the same line. The Router has the smallest measured margin, 866 bytes, so every added guard has to fit.

Português — O limite de tamanho dos contratos V2 é imposto pela build, não pelo cuidado: o EIP-170 limita o código de runtime a 24,576 bytes, o job de CI do perfil release falha um contrato aos 24,000 bytes, e um teste impõe a mesma linha. O Router tem a menor margem medida, 866 bytes, pelo que cada guarda acrescentada tem de caber.

Español — El límite de tamaño de los contratos V2 lo impone la build, no el cuidado: EIP-170 limita el código de runtime a 24,576 bytes, el job de CI del perfil release falla un contrato a los 24,000 bytes y una prueba impone la misma línea. El Router tiene el menor margen medido, 866 bytes, así que cada guardia añadida tiene que caber.

Français — La limite de taille des contrats V2 est imposée par le build, pas par la vigilance : l'EIP-170 plafonne le code runtime à 24,576 octets, le job CI du profil release fait échouer un contrat à 24,000 octets, et un test impose la même ligne. Le Router a la plus petite marge mesurée, 866 octets, donc chaque garde ajoutée doit tenir.

Deutsch — Das Größenlimit der V2-Verträge wird vom Build durchgesetzt, nicht durch Sorgfalt: EIP-170 begrenzt den Runtime-Code auf 24,576 Bytes, der CI-Job des Release-Profils schlägt bei 24,000 Bytes fehl, und ein Test erzwingt dieselbe Linie. Der Router hat mit 866 Bytes die kleinste gemessene Reserve, daher muss jeder zusätzliche Guard hineinpassen.

Русский — Лимит размера контрактов V2 обеспечивает сборка, а не аккуратность: EIP-170 ограничивает runtime-код 24,576 байтами, CI-задача release-профиля падает на 24,000 байтах, и тест проверяет ту же черту. У Router самый маленький измеренный запас, 866 байт, поэтому каждый добавленный guard должен поместиться.

Türkçe — V2 kontrat boyut sınırını özen değil derleme zorunlu kılar: EIP-170 runtime kodunu 24,576 bayta sınırlar, release profilinin CI işi bir kontratı 24,000 baytta başarısız sayar ve bir test aynı çizgiyi uygular. En küçük ölçülen payı 866 bayt ile Router'ın payı oluşturur, bu yüzden eklenen her koruma sığmak zorundadır.

العربية — حدّ حجم عقود V2 يفرضه البناء لا الحرص: يحدّ EIP-170 كود الـ runtime بـ 24,576 بايت، ويُفشل job الـ CI لملف release أي عقد عند 24,000 بايت، ويفرض اختبار الخط نفسه. أصغر هامش مقيس هو للـ Router، 866 بايت، لذلك يجب أن يتّسع كل guard يُضاف.

हिन्दी — V2 कॉन्ट्रैक्ट के आकार की सीमा बिल्ड लागू करता है, सावधानी नहीं: EIP-170 runtime कोड को 24,576 बाइट तक सीमित करता है, release-profile CI जॉब 24,000 बाइट पर कॉन्ट्रैक्ट को फ़ेल कर देता है, और एक टेस्ट वही रेखा लागू करता है। Router का मापा गया मार्जिन सबसे छोटा है, 866 बाइट, इसलिए जोड़ा गया हर guard उसमें समाना चाहिए।

日本語 — V2 コントラクトのサイズ上限は、注意深さではなくビルドが強制します。EIP-170 は runtime コードを 24,576 バイトに制限し、release プロファイルの CI ジョブは 24,000 バイトでコントラクトを失敗とし、テストも同じラインを強制します。Router の測定済み余裕は最小の 866 バイトなので、追加するガードはすべてその中に収まる必要があります。

中文 — V2 合约的大小上限由构建来强制,而不是靠小心:EIP-170 将 runtime 代码限制为 24,576 字节,release 配置的 CI 任务在 24,000 字节处就让合约失败,还有一个测试强制同一条线。Router 的实测余量最小,为 866 字节,因此每增加一个 guard 都必须装得下。

한국어 — V2 컨트랙트 크기 한도는 주의가 아니라 빌드가 강제합니다. EIP-170은 runtime 코드를 24,576바이트로 제한하고, release 프로파일 CI 작업은 24,000바이트에서 컨트랙트를 실패시키며, 테스트도 같은 선을 강제합니다. Router의 측정된 여유가 866바이트로 가장 작아서 추가하는 가드는 모두 그 안에 들어가야 합니다.

Bahasa Indonesia — Batas ukuran kontrak V2 ditegakkan oleh build, bukan oleh kehati-hatian: EIP-170 membatasi kode runtime pada 24,576 byte, job CI profil release menggagalkan kontrak pada 24,000 byte, dan sebuah tes menegakkan garis yang sama. Router memiliki margin terukur terkecil, 866 byte, sehingga setiap guard yang ditambahkan harus muat.

বাংলা — V2 কন্ট্র্যাক্টের আকারসীমা যত্ন নয়, বিল্ডই কার্যকর করে: EIP-170 runtime কোডকে 24,576 বাইটে সীমিত করে, release প্রোফাইলের CI জব 24,000 বাইটে কন্ট্র্যাক্টকে ব্যর্থ করে, আর একটি টেস্ট একই রেখা প্রয়োগ করে। Router-এর মাপা মার্জিন সবচেয়ে ছোট, 866 বাইট, তাই যোগ করা প্রতিটি guard-কে তাতে ধরতে হবে।

Filipino — Ang limitasyon sa laki ng mga V2 contract ay ipinapatupad ng build, hindi ng pag-iingat: nililimitahan ng EIP-170 ang runtime code sa 24,576 bytes, pumapalya ang release-profile CI job sa contract na umabot sa 24,000 bytes, at ipinapatupad ng isang test ang parehong linya. Ang Router ang may pinakamaliit na nasukat na margin, 866 bytes, kaya bawat idadagdag na guard ay dapat magkasya.

Short answer: the limit is enforced by the build, not by care. EIP-170 caps deployed runtime code at 24,576 bytes. The release-profile CI job fails a contract at 24,000 bytes, which is 576 bytes before the protocol limit, and `test/DeployedSizeGate.t.sol` enforces the same line. The margins below are measured, and the Router's is the smallest.

The point is not the limit itself. It is that a limit this tight turns every added check into a visible cost. A guard that does not fit does not ship, so each guard has to earn its bytes.

The measured sizes

At the commit the whitepaper cites, the runtime sizes and the margin to 24,576 bytes are as follows. The same figures appear in the repository's README table and in its size snapshot file.

ContractRuntime (bytes)Margin to 24,576
Router23,710866
Hub23,3601,216
Core21,8012,775
Solver21,2533,323
Quoter19,7604,816
Gate10,71013,866
Math10,68013,896
GateWrapper4,40820,168

Source: Whitepaper 2.4, section 26.1 and FACTOS section 7: CI job 133367307770, release profile, commit 969bcc6.

Two limits, not one

Runtime size is one limit. Deployment has another: EIP-3860 caps initcode at 49,152 bytes. The largest initcode in the set is the Solver's, at 32,324 bytes, well under that line. The eight adapters run from 3,026 to 6,666 bytes.

Reading the table, the Router stands apart. It is the one contract that moves funds, and it has 866 bytes left. That is the margin that decides what can still be added to it.

How the gate is run

The gate does not depend on a person remembering to look. It is a CI job named for the release profile, and a test in the repository enforces the same limit locally.

  1. Build the contracts under the release profile with the size report enabled.
  2. Compare each contract's runtime size with the 24,000-byte line. A size at or above it fails the job.
  3. Run `test/DeployedSizeGate.t.sol`, which holds the same limit.
  4. Compare the result with the committed size snapshot and the README table.

Why the budget shapes the design

The whitepaper's rule is that every guard comes with its mutant, a deliberate break that must turn a test red. The whitepaper points out that this rule is also a size budget: the Router has 866 bytes left, so every guard added is paid for in bytes.

What this does not claim

It does not say that a small contract is a correct contract; the size gate is a budget check and nothing more. It does not promise the margins stay as they are: they are a snapshot at one commit, and the next change will move them. The CI job and the snapshot file are where the current numbers live.

Do not trust this page — reproduce it

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

Run the repository's release-profile size report (forge build --sizes src with FOUNDRY_PROFILE=release and solc 0.8.36) at commit 969bcc6 and compare each runtime size with the table above: Router 23,710 and Hub 23,360, for example. Then compare with `.sizes-snapshot` and the README table, and check 24,576 - 23,710 = 866. CI job 133367307770 is the recorded run. Reading: section 26.1 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). EIP-170 as a measured gate: every guard is paid for in bytes, and the build counts them. BlazePhoenix Engineering. https://blazephoenix.xyz/learn/eip-170-as-a-measured-gate/
@misc{blazephoenix_eip_170_as_a_measured_gate,
  title  = {EIP-170 as a measured gate: every guard is paid for in bytes, and the build counts them},
  author = {BlazePhoenix},
  year   = {2026},
  url    = {https://blazephoenix.xyz/learn/eip-170-as-a-measured-gate/},
  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 Architecture · 7 / 20
One clock per chain: seconds, blocks and a schedule that does not drift ›Every economic quantity in the staking engine runs on seconds, so it is the same on any chain. Exactly one guard counts blocks, and its wall-clock length is the only thing that varies with the network.6 min

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

Go to APP