Anvil256 — Protocol Milestones
Milestones are ordered by logical dependency, not calendar time.
Each milestone has a well-defined completion criterion: a mathematical
property that either holds or does not. Informal descriptions are never
substituted for formal verification criteria.
Completion criterion: All core protocol constructions are stated as
closed-form expressions with explicit domain, range, and invariants, with
proofs or derivations for every non-trivial claim.
| Deliverable | Formal Property | Verification |
|---|
| Keccak-Cascade + gamma binding | Preimage resistance; wallet-rotation cost is at least k \times \0.10$ | MATH.md §1 |
| NCT concentration factor | Sybil cost equals k \times \0.10forak$-address attack | MATH.md §2.4 |
| PI controller Lyapunov certificate | ΔV≤−Kpe2≤0 with equality only at (e,I)=(0,0) | MATH.md §3.3 |
| Supply identity | Miner-only baseline approaches 21,000,000 ANVL; actual supply includes seed + POL reserve mints inside MAX_SUPPLY | MATH.md §6 |
| Oracle fee formula | fee_wei = 10^25 / p for an 8-decimal ETH/USD feed | MATH.md §5.1 |
| Q60.18 overflow bounds | Intermediate products are bounded within int256 for ∣u∣≤Umax | MATH.md §4 |
Status: complete.
M1 — Contract Correctness
Completion criterion: The deployed bytecode satisfies all protocol
invariants I1–I13 under adversarial input. Formally: for all reachable
states S and all valid calldata c:
∀i∈{1,…,13}:Ii(post(S,c))=⊤
M1.1 — Unit Correctness
Each contract component produces outputs matching its formal specification.
| Contract | Formal Correctness Condition |
|---|
CascadePoW.sol | mine(ν) accepts iff the Cascade hash is below currentDifficulty (I12) |
PIController.sol | Output matches §3.2 of MATH.md: upi=sat(−(Kpe+KiI),±0.5) for all (e,I,Cu) in domain |
MinerWindow.sol | Cu=∣{m:freq[m]>0}∣ at all times after first mine (I11) |
FixedPointMath.sol | ∣exp4(u)−exp(u)∣<4.3×10−4 for ∣u∣≤0.5; log2Floor exact |
FeeOracle.sol | Returns fee_wei = 10^25 / p; reverts on conditions O1-O4 |
M1.2 — Invariant Coverage
Fuzz tests over the full reachable state space demonstrate:
totalSupply≤MAX_SUPPLYafter n arbitrary mine calls
currentEpoch[n+1]≥currentEpoch[n]∀n
ΔFrecipient+ΔFstuck+ΔFLP=currentFeeWei()(I7, per mine)
M1.3 — Gas Budget
mine() gas ≤68,000 on Base L2 under worst-case storage access
pattern (cold slots on first call of a new address). Formally:
gas(mine())≤68,000for all reachable pre-states
This bound must not regress across versions.
M1.4 — External Audit
At least one independent security firm completes a review of the final
pre-deployment bytecode. Audit report published in full. The reviewed
bytecode must match the cosign-signed release hash.
M2 — Kernel Correctness
Completion criterion: The CUDA/OpenCL kernel produces found outputs
where κ(m,ν,n)<D[n], verified by independent on-chain mine()
acceptance, for 10,000 independent test cases. Formally:
Pr[mine(νkernel) accepted]=1over 10,000 test cases
M2.1 — Single-Device Correctness
Kernel output on one GPU matches CPU reference implementation for identical
(ι,ϵ[n],D[n]) inputs. Formally, for all test inputs:
κGPU(m,ν,n)=κCPU(m,ν,n)
Verified by CI on every commit.
M2.2 — Multi-Arch Correctness
Fat binary verified across sm_75, sm_80, sm_86, sm_89, sm_90.
OpenCL fallback produces identical results on AMD and Intel targets:
κCUDA(⋅)=κOpenCL(⋅)∀ inputs
M2.3 — Determinism Under Replay
Given identical (ι,ϵ[n],D[n]) and identical search range, two
independent kernel runs on the same hardware return the same ν∗:
νrun 1∗=νrun 2∗(no non-determinism from scheduling)
M2.4 — Reproducible Build
Docker-based build produces byte-identical binaries across two independent
build environments:
sha256(binarybuild 1)=sha256(binarybuild 2)
M3 — CLI Correctness
Completion criterion: The CLI correctly implements the full epoch lifecycle,
verified against a local Foundry fork of the deployed contract. The lifecycle
is the sequence:
γ-fetch→ϵ-fetch→ι-compute→dispatch→ν-recv→fee-attach→submit→epoch-transition
M3.1 — γ and Entropy Fetch Order
minerEpochCount[m] and ϵ[n] are read in the correct
causal order before each job dispatch. Verification:
nonce computed with stale γ⇒mine() reverts (Cascade verification failure)
M3.2 — Epoch Transition Handling
When a Mined event from any miner advances the epoch while the kernel runs:
CLI sends STOP→fetches new γ,ϵ[n+1]→recomputes ι→dispatches fresh job
within one RPC round-trip time. The stale job’s nonces are cryptographically
invalid for the new epoch (different ϵ[n+1]).
M3.3 — Fee Guard
MAX_FEE_USD enforcement prevents submission when:
1018currentFeeWei()×p$>MAX_FEE_USD
Verified under mocked oracle returning extreme values (p→0 and p→∞).
M3.4 — Integration Test
End-to-end test against anvil (local Foundry node) demonstrates:
- CLI mines epochs 0, 1, 2 sequentially
- γ(m) advances as 0→1→2→3 (I13)
- NCT window records miner address three times: Cu∈{1} throughout
- Supply: totalSupply=3×R0=150ANVL after epoch 2
M4 — Testnet Validation
Completion criterion: The deployed contract on Base Sepolia satisfies
the following quantitative properties over a public test period:
| Property | Formal Criterion | Pass Condition |
|---|
| PI controller convergence | $\left | \overline{T}_{\text{epoch}} - 120;\text{s}\right |
| NCT signal accuracy | ∥Cu−∥observed distinct signers∥∥ | ≤1 at all times |
| Halving | R(210,000) | =25ANVL exactly (=R0≫1) |
| Cascade anti-precompute | Submit ν computed before epoch n opens | mine() reverts |
| γ-binding | Submit ν computed for address m from address m′=m | mine() reverts |
| Fee accounting | ∑j=1nfeej=ΔfeeRecipient.balance+stuckFeesWei+lpReserveEthWei+LP ETH deployed | Holds exactly |
M5 — Mainnet Deployment
Completion criterion: Contract deployed to Base mainnet satisfying:
-
Deployment transaction verifiable on Basescan with identical bytecode
to the audited source: sha256(deployed bytecode)=sha256(audited bytecode).
-
Deployer address has no privileges post-constructor:
∄f∈Anvil256.sol such that f is callable only by
deployer after the constructor returns.
-
feeRecipient=deployer and =address(0) (I3).
-
v1.0.0 CLI binary cosign-signed and logged to Sigstore Rekor with
matching sha256sums.txt.
-
No dev premine: constructor/initializer supply is limited to the official
genesis LP seed, Sseed=1ANVL, held by the Anvil256 contract
and deposited into the official ANVL/WETH LP.
Invariants That Are Never In Scope
The following predicates are on-chain invariants of the immutable contract.
No milestone will ever modify them, as no mechanism to do so exists:
∄admin_key:∃fgated by privileged address
∄upgrade_proxy:Anvil256.soluses delegatecall or proxy pattern
∄governance_token:voting or parameter-setting mechanism exists
devPremine(S0)=0,genesisLPSeed(S0)=1ANVL
feeRecipient=deployer:enforced on-chain, constructor revert
∄admin mint;mine()mintsR(n)to miners and0.1R(n)to POL
∄token migration:no V2 contract or swap mechanism deployed
These are not governance decisions or social contracts. They are provable
properties of the deployed bytecode. No future milestone — and no actor —
can override them.