01 Foundational

Preamble

Preamble

Covenant is a smart contract language. Version 0.9 reached General Availability in April 2026, bringing the helper-contract bridge live on Sepolia for the first time. V0.9 introduces helper contracts (CeremonyHelper with a real four-phase state machine; MockedFHEHelper, MockedPQVerifier, MockedZKVerifier with deterministic stubs guarded by an onlyTestnet modifier), ERC-721 auto-synthesis (nft keyword), PQ key registry auto-synthesis (registry keyword), cross-contract calls via interface declarations, a Foundry-class CLI (test, fmt, doctor, coverage, init), and a 6-rule linter with one-click fixes for Solidity-isms. The compiler ships with 21 crates, 1102 passing tests, and zero clippy warnings; the current release is v0.9.5 — an OMEGA adversarial bounty pass that fixed the reveal access-control gate (F07 Critical) plus a fail-loud sweep, on top of the v0.9.4 "fail-loud pass" — arithmetic-builtin miscompiles (E424), division-by-zero (E519), and oversized text constants (E521) are now hard errors, test actions are stripped from on-chain output, non-zero constant field defaults are written, and all of these surface live in the LSP. Source-level compatibility is preserved across V0.7, V0.8, and V0.9. OMEGA V6 self-audit cleared (independent third-party audit deferred to V1.0). The cryptographic primitives advertised throughout this document — TFHE, Dilithium, Halo2, Wesolowski VDF, Shamir SSS — are mocked as deterministic stubs in V0.9.x (zero confidentiality, zero security), with real implementations swapping in at V2.0 — a separate, later release (12–24 months out), not V1.0. V1.0 is the external third-party audit of the compiler; real cryptography and mainnet helpers arrive later, at V2.0. This document describes the language design, its cryptographic substrate, and the trajectory toward V1.0 and beyond. The specifications herein are published under CC0-1.0; the compiler is Apache-2.0. We write in the present tense where implementations exist, and in the conditional where they are planned. The reader is invited to distinguish the two.

02 Foundational

Why a declarative language for cryptography

A senior Solidity engineer who wishes to deploy a contract with fully homomorphic computation, post-quantum signature verification, and selective disclosure of state must, today, assemble four or more independent libraries, each with its own ABI conventions, gas models, and key serialization formats. The integration code is not checked by any compiler. The bugs live at the joints.

This is not merely inconvenient. It is a structural failure of the toolchain. When a developer writes fhe.decrypt(pk, ciphertext) after a zkVerify(proof, publicInputs), the compiler does not know whether the key used for FHE encryption is the same key identity that the ZK proof asserts. It cannot know, because these primitives are not part of the language; they are external calls. The composition is the developer's responsibility, and the developer is fallible.

Covenant treats FHE, post-quantum signatures, ZK proofs, and cryptographic amnesia as first-class language primitives. The compiler reasons about key identities, data flows, and privacy invariants across all four layers simultaneously. An operation that would violate a privacy guarantee fails at compile time, not at runtime — not in production, not in an audit, not in a postmortem.

Assertion

"The class of integration bugs that arise from composing independent cryptographic libraries does not exist in Covenant. These bugs cannot be written, because the composition is expressed in the type system."

// Covenant: compiler-enforced primitives
fn process_private_vote(
    vote:  fhe<u256>,       // FHE-encrypted ballot
    voter: identity<pq>    // post-quantum identity
) -> amnesia {
    // @non_reentrant        auto-injected by compiler
    // privacy flow          verified: fhe → pq → zk consistent
    // compiled to           2,847 bytes

    let cleartext = decrypt(vote, voter.key);  // key identity enforced
    self.tally(cleartext);

} // scope exit: amnesia auto-triggered, ciphertext destroyed, proven on-chain
03 Foundational

Architecture: four cryptographic layers

Styx Protocol is Covenant's native standard library — the substrate on which every Covenant contract runs. It is not a dependency to be imported. It is the runtime. Styx defines four named cryptographic layers, each responsible for a distinct class of guarantee. A Covenant contract may use any subset; the compiler verifies that compositions are sound.

The four layers are not independent modules. OBLIVION can trigger termination of keys held by FORTRESS. VEIL's homomorphic computations may be verified by PRISM without decrypting. FORTRESS provides the identity substrate for all three. These interactions are the reason a language-level approach is necessary: no library-level API can express them.

04 Living · V0.9

What ships today

Version 0.9.4 — the "fail-loud pass" — shipped July 2026 from an OMEGA V6 self-audit. min/max/abs/pow/sqrt no longer miscompile to a+b (E424); division by a literal 0 is a compile error and non-literal divisors get a runtime guard (E519); text constants over 32 bytes error (E521); test actions are stripped from on-chain output; non-zero constant field defaults are now written; and the LSP surfaces every one of these diagnostics live. A 21-crate workspace, 1102 tests, zero clippy warnings. EVM (default), Robinhood Chain (Arbitrum Orbit L2), and WebAssembly targets. Source-level compatibility with V0.7–V0.9 is preserved.

Real vs. mocked — read this first

Covenant is testnet-only. The cryptography is mocked: FHE, post-quantum signatures, ZK proofs, VDF, and Shamir secret sharing are deterministic stubs with zero confidentiality and zero security. "Encrypted" values are readable straight from chain state, and the PQ / ZK verifiers accept forged proofs. Real cryptography is a separate, later release — V2.0, 12–24 months out — not V1.0. V1.0 is the external third-party audit of the compiler. Every audit to date is an internal Kairos Lab self-audit (OMEGA V4 / V5 / V6), never third-party.

Compiler Rust · 21-crate workspace · EVM + WASM v0.9.5 github.com/Valisthea/covenant-language
First Deployment M0–M5 on Ethereum Sepolia · M6 flagship token on Robinhood Chain testnet M0: 0xab083fc4…018671 · M1: 0x2FB87d54…e916D · M6 KairosCoin: 0x3E80F8c7…2FdE (Robinhood, chainId 46630) M0 on Etherscan ↗ M1 on Etherscan ↗
Documentation 72 pages · 30+ cookbook recipes · V0.8→V0.9 migration guide · CLI reference V0.9 · GA covenant-lang.org/docs ↗
Tooling CLI + LSP v1 + Security Linter + bench V0.9 · GA

810+ tests · 21+ detectors · VS Code extension · gas-regression baseline

Security Audit OMEGA V4 (41 · V0.6) + V0.8 re-verification (9) + OMEGA V5 (10-point gate · V0.9) + V0.9.2 sweep (29 confirmed → 5 shipped) + OMEGA V6 (17 · V0.9.3, then the v0.9.4 fail-loud cycle, then the v0.9.5 OMEGA adversarial bounty pass: 1 Critical + 2 High + 4 Medium + 2 Low) · all resolved · all internal self-audits, never third-party CLEARED · V0.6 → V0.9.5

OMEGA V4 V0.6: 41 findings, all resolved. OMEGA V4 V0.8: 9 findings, 8 verified + 1 mitigated. OMEGA V5 V0.9: 10-point self-audit, all GO. OMEGA V6 V0.9.3: 6 Critical + 6 High + 5 Medium findings, all fixed same-day with new regression tests — the largest single-cycle count since the V0.6 launch audit. The v0.9.4 "fail-loud" cycle then closed a class of silent miscompiles: E424 (arithmetic builtins → a+b), E519 (division by zero), E521 (oversized text constants), test actions leaking on-chain, and dropped non-zero field defaults — each with a new regression test and live LSP diagnostics. The v0.9.5 OMEGA adversarial bounty pass (two-block aggressive-generator / hostile-critic, every PoC confirmed on-chain) then found and fixed 1 Critical + 2 High + 4 Medium + 2 Low — flagship: the reveal access-control gate (reveal … to owner now enforces owner-only disclosure; F07). Helper-bridge verified end-to-end on Sepolia. 1102 tests, 0 clippy warnings. Every cycle is an internal Kairos Lab self-audit; the external third-party audit is V1.0 and gates mainnet.

License Policy Scheme-agnostic FHE + open standard RATIFIED · V0.9

Specs CC0-1.0; compiler Apache-2.0; FHE backends are pluggable to avoid scheme lock-in.

WebAssembly Backend --target-chain wasm · deterministic · wasmparser-clean SHIPPED · V0.9

Same .cov source compiles to EVM and WebAssembly. Browser and server-side sandboxes (wasmtime, wasmer) run Covenant contracts with an auditable output.

Cross-Chain Bridge Per-pair nonce anti-replay · validator-set Merkle roots · ECDSA attestations SHIPPED · V0.9

bridge … anchored_on [...] synthesizes four canonical functions per chain and emits one artifact per anchored chain with the correct local_chain() baked in.

04b Living · V0.9

Playground

Covenant ships a complete in-browser development environment at playground.covenant-lang.org. The playground loads in any modern browser — no Rust, no PATH setup, no toolchain. Compile to real EVM bytecode, deploy to MockChain (deterministic, instant) or Sepolia (real testnet, ~12–24 s block confirmation), interact with deployed contracts in a typed UI, persist state across reloads via IndexedDB, and follow a guided 20-lesson tour (4 modules: basics, privacy, advanced, V0.9 features) from record Hello to amnesia ceremony, NFT auto-synthesis, and Sepolia deploy.

Compile Real EVM bytecode via WebAssembly, in your browser. The same compiler that runs in CI.
MockChain In-tab EVM simulator. Deterministic. Instant. Free. Reset on demand.
Sepolia Real testnet via MetaMask. ~12–24 s block confirmation. Helper bridge live for ceremony state machine; FHE / PQ / ZK helpers ship deterministic stubs in V0.9.x (real cryptography in V2.0).
Robinhood Chain Featured deploy target (Arbitrum Orbit L2, chainId 46630 / 0xB626). M6 KairosCoin — the first Covenant token on Robinhood testnet — is live via the helper bridge; RWA / asset-issuance focus.
Tour 12+ guided lessons from record Hello through encrypted ballot, ceremony destruction, NFT mint.
Examples 16 verified contracts. Each has a "Try in Playground" deep link from the docs.
Verify /verify recompiles a .cov source in-browser and compares the result against on-chain runtime bytecode.

State persists across page reloads (IndexedDB) and syncs across tabs (BroadcastChannel). Events display as human-readable names, not raw hex topics. The playground is the fastest way to evaluate Covenant — and the recommended on-ramp for anyone considering adoption.

05 Living · V0.9

Trajectory

What follows is the public roadmap. Shipped phases are marked accordingly. The current phase is distinguished by a live indicator on the left margin.

V0.1 BASICSApril 2026Shipped
Core language and first deployment

The Covenant compiler ships in Rust. Core language semantics are implemented and tested. The first public contract deploys on Ethereum Sepolia.

V0.2–0.4 CODEXQ2 2026Shipped
Twenty canonical examples, four tiers

The Codex establishes the Covenant idiom across Basics, Intermediate, Advanced, and Edge Cases. Each example is tested and annotated.

V0.5 CLIQ2 2026Shipped
Command-line toolchain

The CLI provides compile, check, deploy, and test subcommands. 810+ tests cover the full language surface. Minimal and composable by design.

V0.6 LSP + LINTERQ3 2026Shipped
Language server and security analysis

LSP v1 brings Covenant to VS Code and any LSP-compatible editor (hover, go-to-definition, completion, formatting). The security linter ships with 21+ detectors covering the most common classes of cryptographic misuse.

V0.7 GAApril 2026Shipped
General availability — spec frozen, audit cleared

The 0.7.x language spec is frozen. OMEGA V4 self-audit complete with all critical/high findings resolved (independent third-party audit deferred to V1.0). Styx Protocol ERC drafts (PQ Registry, FHE primitives, ZK selective disclosure, Amnesia ceremony) normative — note that EIP-8228 has since been officially assigned to the unrelated Styx Encrypted Token Standard; the Covenant ceremony is no longer attached to that EIP number. Documentation, 30 cookbook recipes (auth, integration, privacy, testing, tokens, upgrades), and Solidity migration guide are complete.

V0.7.1 WASM + AMNESIAApril 2026Shipped
WebAssembly backend and cryptographic amnesia

Deterministic WASM codegen for browser and server-side sandboxes. Wesolowski VDF, Shamir secret sharing, and keccak-bound destruction proofs — all externally verifiable without the Covenant toolchain. Rolled into V0.8 GA.

V0.7.2 BRIDGE + OPTApril 2026Shipped
Cross-chain bridges and advanced optimizer

Per-pair nonce anti-replay, validator-set Merkle commitments, threshold ECDSA attestations, and one artifact per anchored chain. FHE coalescing plus compile-time hash precomputation deliver 15–30 % pGas reduction on FHE-heavy contracts. Rolled into V0.8 GA.

V0.8 GAApril 2026Shipped
WASM + Amnesia + Bridge + Optimizations — consolidated

V0.8 consolidated V0.7.1 and V0.7.2 into a single GA milestone. Three targets (EVM, Aster Chain, WebAssembly). Cryptographic amnesia complete via dedicated precompiles at 0x124–0x127. Bridge module synthesizes per-chain artifacts. Fully backward compatible at the source level; OMEGA V4 audit findings remain resolved.

V0.9 GAApril 2026Shipped
Sepolia live + helper bridge + NFT/Registry/Interface + CLI

V0.9 is the helper-bridge release. The helper-contract bridge brings Covenant constructs to live Sepolia execution: CeremonyHelper ships a real four-phase state machine; MockedFHEHelper, MockedPQVerifier, MockedZKVerifier ship deterministic stubs guarded by an onlyTestnet modifier (real cryptography lands in V2.0, not V1.0). Three new top-level constructs: nft (ERC-721 auto-synthesis, 11 functions from 5 lines of source), registry (PQ key registry, 5 functions), interface (typed cross-contract calls). Foundry-class CLI: covenant test/fmt/doctor/lint/init/explain with per-test isolation and name-heuristic coverage (IR-instrumented coverage in V0.9.x). 6-rule linter for Solidity-isms. OMEGA V5 self-audit cleared (10-point internal audit, all GO; independent third-party audit deferred to V1.0). M0 (record Hello), M1 (ceremony destruction commitment), M2 (auto-synth ERC-721 NFT, full 5-tx lifecycle) all verifiable on Sepolia Etherscan. Consolidated into the current v0.9.5 release.

V0.9.x FOLLOW-UPSQ2–Q3 2026In Progress
V0.9.3 (OMEGA V6) + v0.9.4 (fail-loud pass) shipped · Robinhood M6 live · LSP debounce · IR coverage · fuzz campaigns

V0.9.3 (5 July 2026) shipped from an OMEGA V6 self-audit — a breadth-first adversarial sweep found and fixed 6 Critical, 6 High, and 5 Medium severity defects the same day, each with a new regression test. v0.9.4 (July 2026), the "fail-loud pass", then closed a silent-miscompile class: E424 (arithmetic builtins → a+b), E519 (division by zero), E521 (oversized text constants), test actions leaking on-chain, and dropped non-zero field defaults, all surfaced live in the LSP. See the Audited section for detail. Robinhood Chain testnet (Arbitrum Orbit L2, chainId 46630 / 0xB626) is now a shipped deploy target — M6 KairosCoin (0x3E80F8c7…2FdE) is the first Covenant token live there. Remaining follow-ups: --strict doctor, LSP debounce on incremental edits, IR-level coverage, and continuous fuzz campaigns (a `cargo-fuzz` harness exists in-repo but has never actually been run — flagged by the OMEGA V6 cycle).

V1.0 PRODUCTIONQ1 2027Planned
External third-party audit of the compiler · semantic-versioning guarantee

V1.0 is the external third-party audit of the compiler — by a firm such as Trail of Bits, OpenZeppelin, or equivalent — covering the WASM backend, helper bridge, and async action semantics, plus partial formal verification (privacy flow soundness in Coq/Lean). The semantic versioning guarantee takes effect: no breaking changes without a major version increment. Note: V1.0 does not ship real cryptography — the primitives remain mocked. Real TFHE / Dilithium / Halo2 / VDF / Shamir are a separate, later release (V2.0, below).

V2.0 REAL CRYPTO12–24 months outPlanned
Real cryptographic primitives · mainnet helpers

V2.0 lights up real cryptographic primitives — Zama TFHE in CeremonyHelper, a real Dilithium-5 verifier in PQHelper, Halo2 on-chain in ZKHelper, and real Wesolowski VDF / Shamir secret sharing in the amnesia ceremony. This is where "encrypted" state stops being readable on-chain and the PQ / ZK verifiers stop accepting forged proofs. Mainnet helper deployment follows. 3+ production protocol deployments validate the model.

V1.5 FORMALQ3 2027Planned
Formal verification artifacts

Coq and Lean proofs of the Covenant type system's key invariants. A mechanically verified proof that the privacy flow checker is sound relative to the operational semantics. We state the goal here as a public commitment.

06 Foundational

Why Covenant is not another smart contract language

The question arises. A number of projects have occupied adjacent positions. The distinctions are not trivial.

Not another Solidity fork. Solidity is the runtime we target. Covenant compiles to EVM bytecode via the same backend. But Covenant is not a dialect of Solidity, nor a superset, nor a compatibility layer. It is a different language with a different type system and different compiler semantics.

Not an FHE-specific DSL. fhEVM and its contemporaries specialize in fully homomorphic computation. They solve one problem well. Covenant treats FHE as one primitive among four: post-quantum key infrastructure, fully homomorphic computation, zero-knowledge verification, and cryptographic amnesia. The integration between these four layers is where the most dangerous bugs live.

Not a research toy. A contract runs on Sepolia today. The CLI accepts input and produces bytecode. The linter catches bugs in real Covenant code. The VS Code extension syntax-highlights and autocompletes. This is not a paper describing a language that might one day be implemented. It is working infrastructure.

07 Foundational

How to read this document

This site is both a project document and a living specification. The sections on language design and architecture are normative: any deviation between the compiler and this document is a compiler bug. The roadmap sections are informative: they describe our intentions, which are subject to revision.

We distinguish two kinds of sections explicitly, via badges next to each section number:

When you read this manifesto, the Foundational sections describe what we are building and why. The Living sections describe where we are on the road to V1.0. Together they form a single document — but they evolve on different timescales.

The specifications published here are released under CC0-1.0. You may use them, fork them, implement them independently, and publish derivative work without attribution. The compiler implementation is released under Apache-2.0.

08 Living · V0.9

Invitation to contribute

Covenant is early. We have a working compiler, a deployed contract, a test suite, and a roadmap. We are selectively seeking collaborators in four areas.

Compiler engineers

Rust engineers with experience in type systems, compiler backends, or formal semantics. Particularly interested in MIR-style intermediate representations or incremental compilation.

Protocol cryptographers

Cryptographers with depth in lattice-based post-quantum constructions, FHE schemes, or recursive SNARK proof systems. The Styx Protocol interface definitions are open; formal critique is welcome.

Security researchers

Smart contract auditors who can stress-test the language semantics — the privacy flow checker, the reentrancy model, the amnesia scope rules. Break it before it ships.

Formal verification specialists

Mathematicians working in Coq, Lean, or Isabelle interested in mechanizing the Covenant type system soundness proof. The longest-horizon contribution; also the most consequential.

On compensation

Covenant has no venture funding and no token. There is currently no paid position available for contributors. We acknowledge this openly — the project cannot pay competitive market rates today, and we do not ask collaborators to pretend otherwise.

What we can offer

What we cannot offer

If this arrangement doesn't align with your constraints, we understand. Covenant is not for everyone at this stage, and we would rather you commit your time to work that compensates you properly than contribute with unvoiced expectations.

For contributors whose interest is fundamentally in the work itself — the research, the systems design, the opportunity to shape a language from first principles — we welcome you. The road from V0.1 to V1.0 is long and technically substantive. Every serious contribution will be acknowledged as such.

Reach out: covenant@kairos-lab.org

09 Living · V0.9

Contact

Watch this space. Private until V1.0.