02 — Framework · Failure mode

Writing a custom precompile and forgetting what that means

A zkVM is chosen partly to avoid hand-written circuits, and then a custom precompile is added for performance. That precompile is a hand-written circuit with all the attendant risk — but it is often reviewed as an optimisation rather than as new soundness-critical code.

Mitigation

Scope custom precompiles into the audit explicitly, as circuit code. Precompiles are a recurring source of soundness bugs precisely because they are written for speed.

Cite this page
MarketComp (2026). Writing a custom precompile and forgetting what that means. The ZK Field Manual (Version 1.3). MarketComp. https://zkpick.com/frameworks/failure-modes/writing-a-custom-precompile-and-forgetting-what-that-means/
@misc{zkfieldmanual-writing-a-custom-precompile-and-forgetti,
  title        = {Writing a custom precompile and forgetting what that means — The ZK Field Manual},
  author       = {MarketComp},
  year         = {2026},
  version      = {1.3},
  howpublished = {\url{https://zkpick.com/frameworks/failure-modes/writing-a-custom-precompile-and-forgetting-what-that-means/}},
  note         = {Accessed: YYYY-MM-DD}
}