Skip to content

Anvil256 Whitepaper

Anvil256 Whitepaper

Anvil256 is a proof-of-work token combining Keccak-Cascade PoW with temporal miner binding, Nakamoto-Coefficient-Throttle difficulty, pure epoch-native halving, protocol-owned liquidity, and a $0.10 native-ETH protocol fee — deployed on Base L2.

If κ(m,ν,n)<D[n]\kappa(m,\nu,n) < D[n], the miner receives R(n)R(n) ANVL and the protocol-owned liquidity reserve receives up to 0.1R(n)0.1R(n) ANVL inside the hard cap:

Sseed+n(R(n)+0.1R(n))21,000,000S_{seed}+\sum_n\bigl(R(n)+0.1R(n)\bigr) \leq 21{,}000{,}000

Admin keys: \varnothing.

v0.3 — 2026  ·  Base L2  ·  ERC-20  ·  immutable bytecode


Abstract

Anvil256 (ticker ANVL) is an ERC-20 token with a 21,000,000 ANVL hard cap, proof-of-work miner rewards, and explicit protocol-owned liquidity reserves. It introduces four constructions absent from any prior production PoW token in combination.

1. Keccak-Cascade PoW with Temporal Miner Binding. A three-layer hash construction. For epoch nn, miner mm, and nonce ν\nu:

κ(m,ν,n)  =  H ⁣(H ⁣(H(mγ(m)g)nν)    H(bn1D[n]))\kappa(m,\nu,n) \;=\; H\!\Bigl(H\!\bigl(H(m \,\|\, \gamma(m) \,\|\, g) \,\|\, n \,\|\, \nu\bigr) \;\big\|\; H(b_{n-1} \,\|\, D[n])\Bigr)

where γ(m)N\gamma(m) \in \mathbb{N} is a strictly monotonic, non-transferable on-chain counter — the miner’s accumulated identity. A nonce is valid iff κ<D[n]\kappa < D[n]. The outer layer binds each puzzle to ϵ[n]=H(bn1D[n])\epsilon[n] = H(b_{n-1} \,\|\, D[n]), a value determined only when epoch n1n{-}1 closes, making precomputation structurally impossible.

2. Nakamoto Coefficient Throttle (NCT). A second difficulty control signal derived from concentration in the 256-epoch miner window. With CuC_u distinct addresses and kk filled slots (steady state k=256k = 256):

unct[n]  =  min ⁣(0.1(kCu1),  0.3)    0u_{\text{nct}}[n] \;=\; \min\!\Bigl(0.1\,\bigl(\tfrac{k}{C_u} - 1\bigr),\;0.3\Bigr) \;\geq\; 0

This signal is always 0\geq 0 and is added to the PI timing signal in log-difficulty space. Centralisation raises DD; the unique Nash equilibrium of minimal difficulty requires Cu=k=256C_u = k = 256 (full distribution).

3. Discrete-Time PI Controller on lnD\ln D. With Lyapunov function V(e,I)=e2/2+(Ki/Kp)I2/2V(e,I) = e^2/2 + (K_i/K_p)\,I^2/2, one-step decrement ΔVKpe2\Delta V \leq -K_p\,e^2, and LaSalle invariance implying global asymptotic stability of the origin (e,I)=(0,0)(e,I) = (0,0). Difficulty update:

D[n+1]  =  sat ⁣(D[n]exp(u[n]),  D[n]/4,  4D[n])D[n+1] \;=\; \mathbf{sat}\!\bigl(D[n]\cdot\exp(u[n]),\;D[n]/4,\;4D[n]\bigr)

where u[n]=sat(upi+unct,±0.5)u[n] = \mathbf{sat}(u_{\text{pi}} + u_{\text{nct}},\,\pm 0.5) and exp\exp is computed as a 4th-order Maclaurin polynomial with truncation error <2.84×104< 2.84 \times 10^{-4}.

4. Pure Epoch-Native Emission. All supply parameters are expressed in epochs (confirmed mine() calls):

R(n)  =  R0n/H,M(n)=R(n)+0.1R(n),Stotal21,000,000  ANVLR(n) \;=\; R_0 \gg \lfloor n/H \rfloor, \quad M(n)=R(n)+0.1R(n), \quad S_{total}\leq 21{,}000{,}000\;\text{ANVL}

No calendar dates. No block times. Wall-clock duration is an observable, not a protocol input.


1. Design Goals

No Dev Premine. There is no team mint, VC allocation, presale, or admin mint. The constructor mints a 1 ANVL genesis seed to the contract for the official ANVL/WETH LP, and every valid mine mints a 10% POL token reserve alongside the miner reward. The claim is no dev premine, not “every token goes directly to miners.”

Structural Anti-Precomputation. \nexists PPT adversary that computes a valid nonce for epoch nn before blockhash(lastMineBlock[n1])\texttt{blockhash}(\texttt{lastMineBlock}[n-1]) is produced, except with negligible probability. Formal proof in MATH.md §1.5.

Anti-Wallet-Rotation. Cost of maintaining kk independent miner identities for one window cycle: \sigma(k) = k \times \0.10.Costofgenuineminingwith. Cost of genuine mining with krigs:rigs:k \times $0.10$. These are equal, so Sybil is economically dominated.

Decentralisation as Nash Equilibrium. The unique minimiser of the difficulty signal is Cu=256C_u = 256 (full distribution). This is not a policy — it is a provable property of the controller equations.

Epoch Purity. The next halving occurs at epoch H=210,000H = 210{,}000. No block time. No calendar. \square

Immutability. \nexists admin key, \nexists upgrade proxy. The deployed bytecode is the permanent, unalterable protocol.


2. Keccak-Cascade PoW

2.1 Wallet-Rotation Attack — Formal Analysis

Definition 2.1 (Naive PoW). Challenge: cnaive(m,n,ν)=H(mnν)c_{\text{naive}}(m,n,\nu) = H(m \,\|\, n \,\|\, \nu). A nonce ν\nu^* is valid iff cnaive<D[n]c_{\text{naive}} < D[n].

Problem. For any m{m}m' \notin \{m\}, cnaive(m,n,)c_{\text{naive}}(m', n, \cdot) is independent of cnaive(m,n,)c_{\text{naive}}(m, n, \cdot). Generating mm' costs O(1)O(1) elliptic-curve operations. Therefore:

Costsybil(k)  =  0  kW\text{Cost}_{\text{sybil}}(k) \;=\; 0 \quad \forall\;k \leq W

The NCT concentration signal is then trivially spoofable: a single physical operator can appear as kk independent miners by using kk fresh addresses, paying zero additional protocol cost.

2.2 Temporal Miner Binding — Construction

Definition 2.2 (γ\gamma-Counter). For address mm:

γ(m)  :=  {j<n:minej.sender=m}\gamma(m) \;:=\; |\{j < n : \texttt{mine}_j.\texttt{sender} = m\}|

Implemented as uint64 minerEpochCount[m], pre-increment value at each call. Properties: strictly non-decreasing, non-transferable, permanent.

Definition 2.3 (Full Cascade). For epoch nn, caller mm, nonce ν\nu:

ϵ[n]  =  H ⁣(blockhash(lastMineBlock[n1])D[n])\epsilon[n] \;=\; H\!\bigl(\texttt{blockhash}(\texttt{lastMineBlock}[n{-}1]) \,\|\, D[n]\bigr) τ(m,n)  =  H ⁣(mγ(m)genesisBlockhash)\tau(m,n) \;=\; H\!\bigl(m \,\|\, \gamma(m) \,\|\, \texttt{genesisBlockhash}\bigr) ι(m,n)  =  H ⁣(τ(m,n)n)\iota(m,n) \;=\; H\!\bigl(\tau(m,n) \,\|\, n\bigr) κ(m,ν,n)  =  H ⁣(H ⁣(ι(m,n)νbe32)    ϵ[n])\kappa(m,\nu,n) \;=\; H\!\Bigl(H\!\bigl(\iota(m,n) \,\|\, \nu_{\text{be32}}\bigr) \;\Big\|\; \epsilon[n]\Bigr)

Valid iff κ(m,ν,n)<D[n]\kappa(m,\nu^*,n) < D[n].

2.3 Security Properties — Summary Table

PropertyStandard PoWCascade PoW
PrecomputationPr[success]=D/2256\Pr[\text{success}] = D/2^{256} (same as online)Same (structural impossibility via ϵ[n]\epsilon[n])
Wallet rotation costσ(k)=0\sigma(k) = 0\sigma(k) \geq k \times \0.10$
Rainbow table (known miners)Feasible for fixed γ\gammaInfeasible: ϵ[n]\epsilon[n] rotates every epoch; γ\gamma personalises
Cross-miner nonce theftτ\tau not included — feasibleτ\tau includes mm; mmττm \neq m' \Rightarrow \tau \neq \tau'
Replay across epochsBlocked by epoch counterBlocked by ϵ[n]\epsilon[n] change (independent per epoch)
ASIC optimisationFull precompute feasibleOuter pass requires live ϵ[n]\epsilon[n]: mandatory per-epoch network fetch

2.4 Gas Cost

Total mine() gas: 66,500\approx 66{,}500. At Base L2 basefee =0.05= 0.05 gwei:

gas cost=66,500×5×1011  ETH$0.008\text{gas cost} = 66{,}500 \times 5 \times 10^{-11}\;\text{ETH} \approx \$0.008

Full per-opcode breakdown in MATH.md §1.6.


3. Nakamoto Coefficient Throttle

3.1 Motivation — Insufficiency of Timing-Only Controllers

In all prior production PoW systems, the difficulty controller is driven purely by timing: D[n+1]=D[n]T/TactualD[n+1] = D[n] \cdot T / T_{\text{actual}}. This signal is invariant to who mines — one actor with 99% of hashrate produces the same timing signal as 1,000 evenly-distributed actors at identical aggregate rate.

Definition 3.1 (Concentration Factor). Let CuC_u be the number of distinct addresses in the 256-slot miner window. The concentration factor is:

C  =  256Cu    [1,256]C \;=\; \frac{256}{C_u} \;\in\; [1,\,256]

C=1C = 1 \Leftrightarrow maximal distribution (Cu=256C_u = 256). C=256C = 256 \Leftrightarrow complete centralisation (Cu=1C_u = 1).

3.2 NCT Signal — Derivation and Equilibrium Analysis

unct[n]  =  min ⁣(0.1(C[n]1),  0.3)    0u_{\text{nct}}[n] \;=\; \min\!\bigl(0.1\,(C[n]-1),\;0.3\bigr) \;\geq\; 0

This is always 0\geq 0: the NCT only ever pushes difficulty upward. It cannot lower difficulty below what the timing PI alone would set. (Internally, MinerWindow.nctSignal() returns the negated value; PIController subtracts it, yielding the same result as adding the positive magnitude above. See MATH.md §2.3 for the full sign derivation.)

Equilibrium table:

CuC_uCCunctu_{\text{nct}}Difficulty multiplier per period
2561.000exp(0)=1.000\exp(0) = 1.000 (PI governs)
1282.0+0.1+0.1×exp(0.1)1.105\times\exp(0.1) \approx 1.105
328.0+0.3+0.3×exp(0.3)1.350\times\exp(0.3) \approx 1.350
1616.0+0.3+0.3 (capped)×1.350\times 1.350
1256.0+0.3+0.3 (capped)×1.350\times 1.350 compounding per period

Nash Equilibrium. The unique strategy profile that minimises difficulty (and thus maximises expected reward per unit of hashrate) is Cu=256C_u = 256. Any deviation toward concentration increases unct>0u_{\text{nct}} > 0, raising DD for all miners. This is not enforced externally — it is the mathematical structure of the update equation.

3.3 Combined Update

Define the NCT penalty magnitude unct[n]:=min(0.1(C[n]1),  0.3)0u_{\text{nct}}[n] := \min(0.1\,(C[n]-1),\;0.3) \geq 0 (see MATH.md §2.3 for the sign convention and its derivation from the MinerWindow.nctSignal() return value).

u[n]  =  sat ⁣(upi[n]+unct[n],  0.5,  +0.5)u[n] \;=\; \mathbf{sat}\!\bigl(u_{\text{pi}}[n] + u_{\text{nct}}[n],\;-0.5,\;+0.5\bigr) D[n+1]  =  sat ⁣(D[n]exp(u[n]),  D[n]/4,  4D[n])D[n+1] \;=\; \mathbf{sat}\!\bigl(D[n]\cdot\exp(u[n]),\;D[n]/4,\;4D[n]\bigr)

NCT always raises or holds difficulty. Because unct0u_{\text{nct}} \geq 0, adding it to upiu_{\text{pi}} can only increase u[n]u[n] (before the outer clamp), which increases D[n+1]D[n+1]. Centralisation is penalised; decentralisation (Cu=256C_u = 256, unct=0u_{\text{nct}} = 0) removes the penalty entirely.

Additivity in uu-space corresponds to multiplicativity in DD-space, which is the correct composition law for independent signals on a multiplicative quantity. Formal proof in MATH.md §3.4.


4. Timing PI Controller

4.1 Equations

With target T=2,016×120  s=241,920  sT = 2{,}016 \times 120\;\text{s} = 241{,}920\;\text{s}:

e[n]  =  Tactual[n]TT,I[n]  =  sat(I[n1]+e[n],  ±4.0)e[n] \;=\; \frac{T_{\text{actual}}[n] - T}{T}, \qquad I[n] \;=\; \mathbf{sat}(I[n{-}1]+e[n],\;\pm 4.0) upi[n]  =  sat ⁣((0.5e[n]+0.05I[n]),  ±0.5)u_{\text{pi}}[n] \;=\; \mathbf{sat}\!\bigl(-(0.5\,e[n]+0.05\,I[n]),\;\pm 0.5\bigr)

4.2 Stability Certificate (Summary)

Lyapunov function: V(e,I)=e2/2+0.1I2/2V(e,I) = e^2/2 + 0.1\,I^2/2. One-step decrement: ΔV0.5e[n]20\Delta V \leq -0.5\,e[n]^2 \leq 0. LaSalle invariance: largest invariant set in {e=0}\{e=0\} is {(0,0)}\{(0,0)\}. Conclusion: globally asymptotically stable origin in unsaturated regime. Full proof in MATH.md §3.3.


5. Epoch-Native Emission

5.1 Reward Function

R(n)  =  {50n/210,000(ANVL, right-shift)0for n/210,00064R(n) \;=\; \begin{cases} 50 \gg \lfloor n/210{,}000\rfloor & \text{(ANVL, right-shift)} \\ 0 & \text{for } \lfloor n/210{,}000\rfloor \geq 64 \end{cases}

5.2 Miner-Only Schedule — Idealized Derivation

The closed-form miner-only schedule is the Bitcoin-style baseline:

k=063210,000502k  =  210,000501264112    21,000,000  ANVL\sum_{k=0}^{63} 210{,}000 \cdot 50 \cdot 2^{-k} \;=\; 210{,}000 \cdot 50 \cdot \frac{1-2^{-64}}{1-\tfrac{1}{2}} \;\approx\; \boxed{21{,}000{,}000\;\text{ANVL}}

The deployed contract adds two hard-cap-inclusive components: a 1 ANVL genesis LP seed and a 10% POL token reserve minted beside each miner reward:

ΔS(n)=R(n)+0.1R(n)=1.1R(n),S(0)=1  ANVL after genesis\Delta S(n)=R(n)+0.1R(n)=1.1R(n),\qquad S(0)=1\;\text{ANVL after genesis}

Therefore the practical minting process reaches the 21,000,000 ANVL cap earlier than the pure miner-only terminus. The reserve is not inflation outside the cap; it is constrained by the same MAX_SUPPLY check.

5.3 Halving Schedule

Halving kkEpoch kHkHRR (miner ANVL)Miner-only cumulative% of 21 M
005010,500,00050.000%
1210,0002515,750,00075.000%
2420,00012.518,375,00087.500%
3630,0006.2519,687,50093.750%
4840,0003.12520,343,75096.875%
51,050,0001.562520,671,87598.438%
71,470,0000.39062520,917,96999.609%
102,100,0000.04882820,989,74699.951%
32+6,720,000+<108< 10^{-8}21,000,000\approx 21{,}000{,}000100%\approx 100\%
6413,440,000021,000,000100.000%

The table is a miner-only schedule reference. Actual totalSupply also includes the genesis LP seed and POL reserve mints, and is truncated by the hard cap.


6. Protocol Fee

feewei  =  100,000×1020pchainlink\text{fee}_{\text{wei}} \;=\; \frac{100{,}000 \times 10^{20}}{p_{\text{chainlink}}}

At ETH = \2{,}500:: \text{fee}_{\text{wei}} = 4\times 10^{13}weiwei= $0.10$. Full dimensional derivation in MATH.md §5.

The fee is split deterministically:

$0.10=$0.05dev+$0.05LP\$0.10 = \$0.05_{dev}+\$0.05_{LP}

The dev split is transferred to the immutable feeRecipient. The LP split is accumulated as lpReserveEthWei and paired with the LP token reserve:

ΔLPETH=$0.05,ΔLPANVL=0.1R(n)\Delta LP_{ETH}=\$0.05,\qquad \Delta LP_{ANVL}=0.1R(n)

Before the 50% supply trigger, reserves accumulate. At and after the trigger:

totalSupply0.5×21,000,000=10,500,000 ANVLtotalSupply \ge 0.5\times 21{,}000{,}000 = 10{,}500{,}000\ \mathrm{ANVL}

any caller may run deployLiquidityReserves(). Later reserves can be added via dripLiquidityReserves(). Official Uniswap v3 LP NFTs are held by the token contract and no withdrawal path exists.


7. Security Summary

ThreatFormal Mitigation
Keccak preimagePr[success]2128\Pr[\text{success}] \leq 2^{-128} (birthday bound, NIST FIPS 202)
Cascade precomputationϵ[n]\epsilon[n] uniformly random before epoch n1n{-}1 closes (Theorem 1.11, MATH.md)
Wallet rotation / Sybil\sigma(k) \geq k \times \0.10$ (Theorem 1.9, MATH.md)
Rainbow table over minersϵ[n]\epsilon[n] rotates per epoch; γ\gamma personalises per address
NCT Sybil (fake diversity)Costs \0.10/\text{mine}$ — equal to legitimate mining (Corollary 1.10)
Nonce replay across epochsϵ[n]\epsilon[n] is independent per epoch; reuse invalid
Cross-miner nonce theftτ\tau includes msg.sender\texttt{msg.sender}; different caller \Rightarrow different challenge
Oracle manipulationReverts O1–O4; client-side MAX_FEE_USD cap (MATH.md §5.2)
Difficulty collapseD1D \geq 1 floor; ×4/÷4\times 4/\div 4 envelope
Integrator windupIImax=4.0\|I\|_\infty \leq I_{\max} = 4.0 anti-windup saturation
Selfish miningN/A: Base L2 deterministic sequencer finality

8. Comparison with Prior PoW Tokens

Bitcoin0xBitcoinCatecoinAnvil256
Hash functionSHA-256Keccak-256VariousCascade Keccak
PrecomputationYesYesYesNo (Theorem 1.11)
Rotation cost σ(k)\sigma(k)000\geq k\times\0.10$
Difficulty algorithmRatioRatioLWMAPI + NCT (Lyapunov)
Decentralisation signalNoneNoneNoneOn-chain NCT
Halving unitBlocksBlocksBlocksPure epochs
Fee mechanismNoneGas onlyGas only$0.10 native ETH split 50/50 (Chainlink)

9. Glossary

TermFormal Definition
EpochOne successful mine() — atomic unit of all protocol timekeeping
Period2,0162{,}016 epochs — difficulty controller update interval
HalvingEvery H=210,000H = 210{,}000 epochs; RR1R \gets R \gg 1
ϵ[n]\epsilon[n]H(blockhash(lastMineBlock[n1])D[n])H(\texttt{blockhash}(\texttt{lastMineBlock}[n-1]) \,\|\, D[n])
γ(m)\gamma(m)minerEpochCount[m]\texttt{minerEpochCount}[m] — strictly monotonic, non-transferable
τ(m,n)\tau(m,n)H(mγ(m)g)H(m \,\|\, \gamma(m) \,\|\, g) — temporal identity hash
CascadeThree-layer Keccak: τ\tau-layer, ι\iota-layer, κ\kappa-layer
NCTNakamoto Coefficient Throttle — unct=min(0.1(C1),0.3)0u_{\text{nct}} = \min(0.1(C-1),\,0.3) \geq 0
CC256/Cu256/C_u — concentration factor; C=1C=1 distributed, C=256C=256 centralised
WAD101810^{18} — Q60.18 fixed-point scale

10. References

  • Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008.
  • Wood, G. Ethereum: A Secure Decentralised Generalised Transaction Ledger. 2014.
  • Åström, K.J. & Murray, R.M. Feedback Systems. Princeton University Press, 2nd ed. 2021.
  • Khalil, H.K. Nonlinear Systems. Prentice Hall, 3rd ed. 2002.
  • LaSalle, J.P. The Stability of Dynamical Systems. SIAM, 1976.
  • NIST FIPS 202. SHA-3 Standard. 2015.
  • Chainlink Labs. Data Feed Heartbeats and Deviation Thresholds. docs.chain.link.
  • MATH.md, TOKENOMICS.md, ARCHITECTURE.md, SECURITY.md.