Full v1 Design Document
One-liner: A zero-sequencer, zero-bridge Proof-of-Work mini-chain and meme-coin launchpad whose entire ruleset, UI, and verifier live inside a single Genesis Inscription on Bitcoin.
1. Core Architecture
eyezero (i0) separates live UX from final settlement without introducing any centralized sequencer, validator server, or custodial bridge.
| Layer | Component | Role |
|---|---|---|
| Rules & App | Genesis Inscription (G) | Immutable HTML/JS app on Bitcoin holding the deterministic applyBlock() state machine, bonding-curve math, verifier, and UI. |
| Live Mempool | Entmoot (entmoot-lite) | WebRTC-direct P2P gossip (works inside ord’s strict sandbox CSP). Propagates signed orders (#i0-tx) and block announcements (#i0-blk) in <1s. |
| Settlement & PoW | Vanity Inscriptions (000000…i0) | Anyone packs pending orders, grinds reveal_txid offline until the inscription ID meets dynamic PoW difficulty, and inscribes on Bitcoin. |
| Verifying Nodes | Every User’s Browser | Opening G on ordinals.com verifies PoW, /r/inscription/<id>, signatures, and state transitions locally. Zero dedicated validator fleet. |
| BTC On/Off-Ramp | Built-in HTLC Swaps | Trustless P2P swaps between real Bitcoin L1 and native $I0 coins using standard Hash Time-Locked Contracts. |
2. Consensus, Vanity PoW & Fork Choice
2.1 Vanity-ID PoW (Zero Wasted BTC Fees)
An Ordinal inscription ID is <reveal_txid>i0. Because reveal_tx spends the commit_tx output (whose Taproot script commits to the exact block payload bytes), modifying any byte of the block changes commit_txid and therefore reveal_txid.
Miners grind non-content fields (e.g. nLockTime, miner nonce in payload, or commit/reveal tweaking) entirely offline until the display-order reveal_txid satisfies the difficulty target 000000…i0. Only once a valid hash is found do they broadcast commit + reveal on Bitcoin — failed hashes cost $0 in BTC fees.
2.2 Block Validity Rules
Every browser verifier rejects a block inscription B unless all 6 checks pass:
- Confirmed on Bitcoin:
GET /r/inscription/<B.id>succeeds,B.idends withi0, andBis confirmed in a Bitcoin block (btc_height(B)). - Chain Continuity:
B.prevequals the parent block’s ID (orGat height1),B.height === prev.height + 1, andbtc_height(B) > btc_height(prev)(at most one canonicali0block per Bitcoin block). - Anti-Premine Anchor:
BincludesbtcRefHeightandbtcRefHash, verified againstGET /r/blockhash/<btcRefHeight>, wherebtc_height(prev) <= btcRefHeight < btc_height(B)andbtc_height(B) - btcRefHeight <= 6. - PoW Difficulty Target: Interpreting
B.id.slice(0, 64)as a 256-bit unsigned integer satisfies \( \text{uint256}(B.\text{id}) \le \text{target}(B.\text{height}) \). Retargets smoothly every 72 blocks (~12h) toward 1i0block per Bitcoin block, clamped0.25x–4x, with a minimum floor of 20 leading zero bits (00000…i0). - Valid Transactions & Nonces: Every tx in
B.txshas a valid signature,chainId === G.slice(0, 16), strictly sequentialnonce === account.nonce + 1, and sufficient balance. - Deterministic State Root & Diff: Running
applyBlock(prevState, B)in pureBigIntinteger math produces exact matches forB.stateRootandB.diff(andB.checkpointon checkpoint heights).
2.3 Fork Choice & Orphan Tie-Break
- Primary: Highest cumulative PoW work (\( \sum 2^{256} / \text{target} \)).
- Same-work tie-break: (1) Earliest Bitcoin confirmation block (
lowest btc_height), then (2) lowestinscription_numberfrom/r/inscription/<id>.
2.4 Block Discovery & Cold Recovery
- Fast path: Miners announce confirmed blocks on Entmoot (
#i0-blk: { id, height, prev }). Browsers cache tips inIndexedDBand re-gossip. - Cold recovery: Given any single latest block ID, any browser walks
B.prevbackwards via/content/<id>all the way to GenesisGwithout needing Entmoot.
3. Native Coin ($I0) & Miner Economics
Miners expend compute/electricity + real BTC L1 fees and earn:
- Fair-Launch Block Reward (
$I0): Minted solely toB.mineron a Bitcoin-style halving schedule (0% premine). Serves as the quote currency for all meme-coin curves. - 100% of Protocol Trading & Launch Fees: 1.0% on every
BUY/SELL+ flat launch fee on everyLAUNCH+ optional priority tips.
4. MEV-Free Batch-Auction Bonding Curve
All curve math lives inside Genesis Inscription G in deterministic BigInt arithmetic.
4.1 Six Primitives
TRANSFER, LAUNCH (referencing any Bitcoin Ordinal inscription_id as permanent meme art), BUY, SELL, HTLC_LOCK, and HTLC_CLAIM / HTLC_REFUND.
4.2 Uniform Batch Clearing
For reserves \( X = V_{I0} + R_{I0} \) and \( Y = V_{\text{tok}} + R_{\text{tok}} \), net buy inputs \( B = \sum b_i \) (after 1% fee), and net sell inputs \( S = \sum s_j \) (after 1% fee):
\[ \text{out}_{\text{tok}} = \left\lfloor \frac{B \cdot (Y + S)}{X + B} \right\rfloor, \qquad \text{out}_{I0} = \left\lfloor \frac{S \cdot (X + B)}{Y + S} \right\rfloor \]
Payouts distribute pro-rata (\( \lfloor b_i \cdot \text{out}_{\text{tok}} / B \rfloor \) and \( \lfloor s_j \cdot \text{out}_{I0} / S \rfloor \)), and reserves update to \( X^{\prime} = X + B - \text{out}_{I0} \), \( Y^{\prime} = Y + S - \text{out}_{\text{tok}} \).
- Every buyer and seller receives the exact same uniform price \( P = (X + B) / (Y + S) \) (zero sandwiching / MEV).
- \( X^{\prime} \cdot Y^{\prime} \ge X \cdot Y \) and \( R_{I0}^{\prime} \ge 0 \) hold mathematically; reduces identically to \( x \cdot y = k \) when only buys or sells occur.
- Every included order must satisfy
actualOut >= order.minOut. - Crossing
GRAD_TARGETpermanently locks the curve into a constant-product AMM pool using the same formula.
4.3 Live UX & Sandbox Keys
- Signed orders over Entmoot
#i0-txupdate charts and balances in<1sas Pending (Entmoot) and flip to Final (Bitcoin) when000000…i0confirms. - Genesis Inscription
Gholds a local BIP-340 Schnorr trading keypair inIndexedDB(exportable via 12-word recovery phrase) becauseordsandboxes iframes from external browser wallet extensions.
5. Trustless BTC ↔ $I0 Swaps (HTLC)
- Alice (
$I0seller) and Bob (BTCbuyer) match on Entmoot. - Alice locks
$I0on eyezero viaHTLC_LOCK(H = SHA256(S), timeoutT + 18). - Bob locks real BTC on Bitcoin L1 in a standard Taproot/P2WSH HTLC (
H, timeoutT + 6). - Alice claims Bob’s BTC on Bitcoin L1 by revealing
S. - Bob submits
HTLC_CLAIM(swapId, S)on eyezero; browsers verifySHA256(S) === Hand release$I0to Bob.
6. Block Format, Checkpoints & v1 → v2 Scaling
{
"v": 1,
"h": 4201,
"prev": "0000007a...9f1ei0",
"btcRef": { "h": 924110, "hash": "00000000000000000002..." },
"miner": "<32-byte pubkey>",
"nonce": 18492011,
"stateRoot": "<32-byte SHA-256 Merkle root>",
"diff": [ [104, 0, "495000000"], [104, 17, "12840000"] ],
"checkpoint": null,
"txs": [ "...compact signed txs..." ]
}
- v1:
prev + diff + checkpoint + raw txs→ ~3,500–4,200 txs / block (~6–7 TPS), pure JS verification, 100% on Bitcoin. - v2: Swap
txsfor a ~200-byte ZK proof while keepingdiffon Bitcoin → hundreds of TPS, ~5 ms browser verification, and zero Entmoot data-availability risk.