LIQUAPRO
◇ DREWLESS · 7-SLF

LIQUA · L1 CHAIN SPEC

draft v0.1 · DREWLESS · 7-SLF
Design-only document. This describes what a future Liqua L1 would look like.
It is NOT shipped code — see "What this document is not" below.
± What this document is. A spec — a technical design for a hypothetical Liqua L1. It exists so the project has a coherent answer to "what blockchain are you?" without faking the blockchain itself. This document is not a blockchain. The exchange you can use today (trade/profile/stake/explorer) runs on Hardhat locally or on an EVM L2 testnet — Liqua's contracts are deployed as ERC-20 + custom Solidity, not on a native Liqua chain. The native chain described below would be a multi-quarter engineering project for a real team.
CONTENTS
  1. Vision & positioning
  2. Stack at a glance
  3. Consensus choice
  4. Reward mechanism — decayed PoW + partial validation + keypair claim
  5. Hashing algorithm — RandomX as cellular metabolism
  6. Supply & gas (native LIQUA)
  7. Locked staking (veLIQUA) & locked-liquidity registry
  8. Block structure & time
  9. Governance — 98% supermajority for changes & rollbacks
  10. Execution layer (EVM-compatible)
  11. Mining pool architecture
  12. Bridge architecture (Ethereum ↔ Liqua)
  13. Rollout plan (what we'd actually build)
  14. What this document is NOT

1 · Vision & positioning

Liqua is a spot exchange today (off-chain orderbook + 0x-style on-chain settlement + UniV2 AMM + flash-cross Matchmaker). The exchange is the application. The chain underneath should be a boring, reliable execution surface for that application — not the product.

The reason to ship a native chain instead of just deploying on Base / Arbitrum / Ethereum:

2 · Stack at a glance

layerchoicewhy
consensusPoW (proof-of-work)matches "easy to mine with a pool" requirement; censorship-resistant; no validator set bootstrap
hashing algoRandomX (CPU) or KawPow (GPU)see §4 — ASIC-resistant + pool-friendly + battle-tested
executionEVM (Geth/Erigon fork) or Rethreuses all our Solidity, MetaMask, ethers.js — drops onboarding cost to zero
block time10 sfast enough for exchange UX, slow enough to give pool miners non-trivial share intervals
native tokenLIQUA (100M cap, same as the ERC-20)1:1 bridge with Ethereum-side ERC-20; emission halved every ~2 years
bridgelock-mint with N-of-M validators (interim) → ZK proof bridge (later)honest about phase 1 trust assumption; phase 2 removes it

3 · Consensus choice

Three candidates, ranked:

PoW (recommended)

Pros: zero-trust to bootstrap (no genesis validator pre-sale), familiar mental model for users, "easy to mine" requirement maps directly. Pool infrastructure already exists for the candidate algos. Permissionless miner entry.

Cons: high energy cost at scale, slower finality than PoS, vulnerable to 51% attack until hashrate matures (mitigated by checkpoint contract on Ethereum for the first ~year).

PoS (rejected)

Lower energy and faster finality, but requires a genesis validator set that's hard to bootstrap fairly. Doesn't satisfy "easy to mine with a pool" — staking is not mining. Would also concentrate power early in whoever gets the airdrop.

Hybrid PoW + Checkpoints (interesting)

PoW for liveness, but with a periodic checkpoint posted to Ethereum L1 (every ~256 Liqua blocks) that finalizes earlier blocks. Removes the 51%-attack window after checkpoint depth. Same dev cost as plain PoW + one small Solidity checkpoint contract. Recommended for phase 1.

4 · Reward mechanism — decayed PoW + partial validation + keypair claim

Three coupled ideas, all wired in per-block rather than per-epoch:

(a) Reward decays inside each block interval — fast twitch wins

Let t be seconds since the prior block was sealed. The available reward decays exponentially:

R(t) = R_max · e^(−λt)        where  λ = ln(2) / 30s  ⇒  half-life 30s
time since prior blockreward as % of R_max
1 s 97.7%
10 s 79.4%
30 s 50.0%
60 s 25.0%
120 s 6.25%
300 s ~0.1%

Why decay? The fastest finder captures the bulk of the reward (the "fast-twitch wins" property the user asked for). Slow miners aren't excluded, but the economic signal collapses if no one finds a block for minutes — which also smooths the long-tail of partition-induced gaps. Aggregate emission is bounded by the integral of R(t) over realized intervals; integrate at the 10s target and you get a predictable supply curve.

(b) Partial validation — more verification work = bigger validator share

Once a primary miner submits a valid solution, the per-block reward R(t) is split:

A validation proof carries a depth d ∈ {1, 2, 4, 8, 16} — higher depth = more re-computation of the primary's PoW chain = bigger share. Validator i with depth d_i earns:

validator_i_share = 0.30 · R(t) · d_i / Σ d_j

This achieves two things simultaneously: more eyeballs on every block (extra independent verification → security) and a non-zero income path for slow miners (race-losers can still earn by validating). Fast-twitch still controls because 70% goes to the primary; validators split the remaining 30%.

(c) Block reward → ephemeral keypair → claimed on L2 after K confirmations

For each new block N, the protocol deterministically derives an ephemeral keypair via VRF:

seed_N  = H(parentHash || difficulty_N || minerPubKey)
priv_N  = VRF(minerPrivKey, seed_N)        // only this miner can compute
addr_N  = address(pubKeyOf(priv_N))

The decayed + split reward is paid to addr_Nnot directly to the miner's wallet. To claim, the miner:

  1. Waits K confirmations on the Liqua chain (target K = 12 → ~2 min at 10s blocks).
  2. Calls the L2 Reward Claim contract with: (priv_N, sig_over_destination_wallet, merkleProof_of_block_N_canonicality).
  3. L2 verifies the proof against the L1's confirmed head, checks priv_N matches addr_N, then transfers the reward to the chosen destination wallet.
⊕ WHY THIS DESIGN
⚠ TRADE-OFFS

5 · Hashing algorithm — RandomX as cellular metabolism

"Easy to mine with a pool" is a value judgment, not a single algo. Three real candidates:

algodeviceASIC resistancepool maturitynotes
RandomXCPUvery highexcellent (Monero)cache + JIT-compiled program; 2 GiB dataset; CPU-only by design
KawPowGPUhighexcellent (Ravencoin)ProgPoW variant; GPU memory-hard; modern fork of Ethash
EtchashGPUmediumgood (ETC)simpler than KawPow but ASIC tolerance worse
SHA-256dASICnoneexcellentwould centralize mining instantly; rejected

Recommendation: RandomX

Choose KawPow instead if the target user has a GPU rig. KawPow → hashrate / W is much better than RandomX on GPU. Both are equally "pool-mineable".

What it represents · molecular framing

RandomX isn't picked just because it's mineable — it maps cleanly onto the molecular OS vocabulary the rest of Liqua is written in:

RandomX constructmolecular analogwhat the mapping means
per-input VM program (generated freshly each run)cell's metabolic programevery hash is a unique micro-program — different "cells" specialize at runtime, no two miners run the same instruction stream even at the same nonce
2 GiB scratchpad / datasetcellular nucleusworking memory the cell can't function without; both are large enough to make hardware shortcuts (ASICs) economically pointless
independent re-execution by validatorsKILLER_T verificationsame role as the molecular SCHEMA-GATE/SIG-GATE: re-do the computation and confirm the presented "antigen" (proof) is real
ASIC resistance (JIT + cache-bound design)cellular diversity preservedwithout ASIC resistance, mining centralizes into one "cell type"; RandomX explicitly protects against monoculture at the protocol layer
random instruction mix per runhormonal modulationlike cortisol/adrenaline shifting cellular behavior, the RNG mixes which instructions dominate each hash run — every hash has a slightly different "mood"

A fully bespoke "MolHash" could compose RandomX (cytoplasm) → Blake3 (membrane) → KILLER_T verification phase, but inventing novel cryptographic primitives is the kind of thing that costs years of security review and routinely ships exploitable in v1. Pick RandomX. Brand it as cellular metabolism in the docs and marketing. The narrative is honest, the security is borrowed from a battle-tested algorithm, and the molecular framing differentiates Liqua without inviting "rolled their own crypto" criticism.

5 · Supply & gas (native LIQUA)

Same 100M hard cap as today's ERC-20, so the bridge can be 1:1. Emission curve:

// reward per block
epoch 0 (blocks 0 – 6,307,200)        5   LIQUA   // ~2 yr at 10s blocks
epoch 1 (blocks 6,307,201 – 12,614,400) 2.5 LIQUA
epoch 2 (12,614,401 – 18,921,600)      1.25 LIQUA
epoch 3 (18,921,601 – 25,228,800)      0.625 LIQUA
...halve every ~2 years until 100M cap

Gas is paid in LIQUA. Protocol fees from the Exchange (current setting: 0–100 bps) go to LiquaStaking as today — but on the native chain a portion (e.g. 20% of gas burned + 100% of protocol fees) can be routed to stakers, the rest burned. setFee stays governance-controlled.

7 · Locked staking (veLIQUA) & locked-liquidity registry

Today's LiquaStaking contract has no lock — you stake, unstake, claim whenever. The native chain adds a locked tier: commit LIQUA for a fixed period in exchange for a higher reward multiplier and proportional governance weight. The unlocked tier still exists; locking is a choice.

Sliding scale: 1 day → 4 years

lock durationboost multiplierexample: 1,000 LIQUA earns…
none (today's model)1.00x1.00 share of pool
1 month1.02x1.02 shares
6 months1.13x1.13 shares
1 year1.25x1.25 shares
2 years1.50x1.50 shares
3 years1.75x1.75 shares
4 years (max)2.00x2.00 shares

Formula: boost = 1 + min(lockDuration, 4y) / 4y. Linear all the way to the 4y cap.

Hard lock — no early withdrawal, no decay-down

Withdrawal is impossible before the unlock date. No emergency exits, no slow decay-down (i.e. not Curve's veCRV model where weight bleeds linearly). The lock IS the commitment; soft-locks dilute the signal that lock duration is supposed to broadcast.

Trade-off: locked users lose liquidity for the duration. Mitigation: a secondary market for tokenized lock receipts (ERC-721 wrapping each position) can exist off-protocol — the chain doesn't bless it, but doesn't forbid it either.

Voting weight = boost × stake

Locked stake earns proportionally more rewards AND more governance weight (see §9). A holder with 1,000 LIQUA locked 4 years has 2,000 vote weight; the same 1,000 unlocked has 1,000. This aligns governance power with skin-in-the-game — short-term participants can't outvote long-term committers.

Locked-liquidity registry — on-chain transparency as marketing

Every lock is on-chain by construction. A public registry page (/locked.html) reads the staking contract and surfaces this as a marketing transparency layer — call it "proof of commitment":

This page is marketing precisely because the underlying data is verifiable on-chain. No "we have $X locked" press release — just a live chart anyone can audit by querying the contract directly. The chart is the marketing.

8 · Block structure & time

10-second target. Block format:

{
  version:    1,
  parentHash: "0x…",
  number:     42,
  timestamp:  1780000000,
  miner:      "0x…coinbase",
  difficulty: 12345678,           // retarget every 2016 blocks (~5.6 hr)
  nonce:      982374,             // PoW nonce
  stateRoot:  "0x…",              // EVM state Merkle root
  txRoot:     "0x…",
  receiptRoot:"0x…",
  extraData:  "liqua/1.0.0",
  randomxSeed:"0x…",              // rotates every 2048 blocks (RandomX requirement)
}

9 · Governance — 98% supermajority for changes & rollbacks

Two protocol-level operations are gated by an intentionally near-unanimous bar:

(a) Protocol changes

Any change to chain rules — block reward formula, fee bps, hashing algorithm choice, bridge validator set, governance parameters themselves — requires:

(b) State rollbacks

If the chain produces a block the community considers invalid (deeply embedded bug exploitation, bridge compromise, etc.), a rollback proposal can revert state to an earlier block. Same gating as protocol changes, plus:

Why 98% — trade-offs (honest)

propertyat 98% thresholdat 50% (most DAOs)
capture resistanceexcellent — a 51% governance attack can't change anythingpoor — whoever buys 51% of vote weight changes the rules
emergency upgrade speedslow / often impossible — needs broad consensusfast — small majority can move
contentious-fork riskmoderate — a 2% holdout can block, may walk away as a forkmoderate — losers may fork too, just at a lower threshold
signals "this chain doesn't change easily"stronglyweakly
parameter stability for usersvery high — what you stake into stays as it wascontingent on whoever holds majority weight

The bias is intentionally toward inaction. The bet is that users who want stable, hard-to-change rules will pay an illiquidity premium (longer locks, more capital committed) precisely because the rules can't be rugged on them by a 51% governance attack. If Liqua wanted to be governed like a startup, it would use 50%. It doesn't.

Vote execution mechanics

10 · Execution layer (EVM-compatible)

Use the existing EVM. Reasons:

Implementation path: fork Reth (Rust Ethereum execution client), strip the PoS consensus engine, replace it with our RandomX PoW + checkpoint engine. Reth has the cleanest module boundary for this swap.

8 · Mining pool architecture

A pool is three things: a stratum server that gives miners work, a share validator, and a payout system.

┌──────────────┐  getJob   ┌──────────────────┐  submitBlock   ┌────────────┐
│ miner (CPU)  │ ─────────►│ stratum server   │ ──────────────►│ liqua node │
│              │ ◄─────────│                  │ ◄──────────────│            │
└──────────────┘  newWork  └────────┬─────────┘     newJob     └────────────┘
                                    │
                                    ▼
                          ┌──────────────────┐
                          │ share validator  │ → DB → payout cron
                          └──────────────────┘

For RandomX, pool software exists and is mature (nodejs-pool fork, MoneroOcean's setup). For KawPow, MiningPoolHub has a reference. Forking either + pointing at our node's stratum RPC is ~2 weeks of work.

Payout choice: PPLNS (Pay Per Last N Shares) — discourages pool-hopping, fair across luck. PPS is friendlier to small miners but riskier for the pool operator until hashrate is established.

9 · Bridge (Ethereum ↔ Liqua)

Phase 1: lock-mint with N-of-M multisig

⚠ TRUST A 5-of-9 multisig has explicit trust assumption: 5 validators colluding can mint arbitrary LIQUA. Real users must understand this. Bridges have lost >$2B to compromises (Ronin, Wormhole, Nomad, Multichain). Validator set + slashing + insurance fund + clear public communication are non-negotiable. Phase 1 cap on bridge throughput at $X per day per address.

Phase 2: ZK proof bridge

Replace the multisig with a zk-SNARK that proves "this Ethereum block contained Locked(user, amount, nonce)". The Liqua mint function verifies the proof against a known Ethereum block hash (provided by a trustless light-client or oracle like Hashi). No trusted validators. Significantly more expensive engineering — probably year 2.

10 · Rollout plan (what we'd actually build)

phasescopeest. team-quarters
P0 (now)EVM contracts (done) on Hardhat / Base Sepolia / Arb Sepolia0 (done)
P1Fork Reth · swap PoS for RandomX+checkpoint engine · single-node devnet2
P2P2P mesh · multi-node testnet · genesis tooling · faucet · stratum server2
P3Multisig bridge (Ethereum ↔ Liqua) · validator set · monitoring · slashing2
P4Mainnet launch · 5+ pool operators bootstrapped · checkpoint contract on Ethereum1
P5ZK bridge research + delivery4

Rough total: ~11 person-quarters with a 4–5 person team of (Rust + Solidity + DevOps) seniors. Realistic budget: $1.5–2.5M including external audits.

11 · What this document is NOT

⚠ READ This is design only. To clarify what is and isn't shipped:

If you want any of the unshipped pieces actually built, the rollout plan above is the honest answer to "how long" and "how much."

LIQUA · ◇ DREWLESS · 7-SLF · draft v0.1 · design-only