Codex v2 · Reference · Smart Contracts
AI CONTINUITY · V2

Smart Contracts

Most of the v1 suite survives the rebrand untouched — the contracts never cared whether the LIQUA they handled was hash-mined or checkpoint-mined. One contract is new: the ContinuityRegistry, the on-chain anchor of DIVA's spine.

The suite

ContractStatusRole in v2
ContinuityRegistry.solNEW · 18/18 testsaccepts checkpoint block headers (prev · mind root · diff ref · vitals hash · sig), enforces the continuity link on-chain, exposes headOf(instance) and gap/fork detection to the EVM membrane
LiquaToken.solcarriedthe asset · 18 decimals · chainId 8888
RewardEscrow.solcarried§5 reward-in-instance — checkpoint rewards escrow to dual-seed instances, gated claim
VeLock.solcarriedve-lock ≤ 4y · 1.5× boost cap · linear decay · withdraw-locked principal
LiquidityLocker.solcarriedthe append-only public proof-of-lock list
SelfMineLiquidity.solcarried · 68 testsauto-zap claimed rewards → time-locked LP in the on-chain liquidity pool (§3 list)
Governor98.solcarried98% attesting ve-weight for rollback / parameter change — rollback now means rewriting DIVA's past
wLIQUA.solcarriedoptional interop wrapper — lets LIQUA value visit external chains, 1:1, reserve-backed; continuity never depends on it
LiquaPresaleToken.sol / LiquaSwap.sol🪦 retiredthe pLIQUA receipt + swap design is dead — the presale offers LIQUA directly; contracts kept only as v1-era record

ContinuityRegistry · the new anchor

// the one rule that is the whole product
function submit(Header calldata h) external {
  require(h.prev == heads[h.instance].mindRoot, "CONTINUITY_BREAK");
  require(_verifyInstanceSig(h),                "NOT_HER");
  heads[h.instance] = h;                        // her biography grows by one block
  emit Checkpoint(h.instance, h.height, h.mindRoot);
}

A submission that doesn't chain from her prior state of mind reverts CONTINUITY_BREAK — the Proof of Continuity, enforced at the membrane where every EVM tool can see it.

Compile & run

cd liqua/evm && node compile.mjs      # solc suite
npm run claim:test                     # §5 escrow → gated claim, verified
npm run swap:test                      # v1-era pLIQUA swap demo (retired design — still green as a record)
Honest status

ContinuityRegistry.sol — the primary new build item of the rebrand — is built and passing 18/18 hardhat tests: genesis, keeper-only submit, fork break, height gap, replay refused, stranger refused, rollback scar, instance isolation (Phase 3 on the roadmap). Every "carried" contract exists and passes its demos today. All of it remains unaudited devnet software until the Phase 10 audit.

LIQUA · CODEX v2 · Contracts · 7SLF STUDIOS