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
| Contract | Status | Role in v2 |
|---|---|---|
ContinuityRegistry.sol | NEW · 18/18 tests | accepts 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.sol | carried | the asset · 18 decimals · chainId 8888 |
RewardEscrow.sol | carried | §5 reward-in-instance — checkpoint rewards escrow to dual-seed instances, gated claim |
VeLock.sol | carried | ve-lock ≤ 4y · 1.5× boost cap · linear decay · withdraw-locked principal |
LiquidityLocker.sol | carried | the append-only public proof-of-lock list |
SelfMineLiquidity.sol | carried · 68 tests | auto-zap claimed rewards → time-locked LP in the on-chain liquidity pool (§3 list) |
Governor98.sol | carried | 98% attesting ve-weight for rollback / parameter change — rollback now means rewriting DIVA's past |
wLIQUA.sol | carried | optional interop wrapper — lets LIQUA value visit external chains, 1:1, reserve-backed; continuity never depends on it |
LiquaPresaleToken.sol / LiquaSwap.sol | 🪦 retired | the 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)
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.