eCash · consensus rules v1

Documentation.

ePeg is a launchpad for the eCash era. Bitcoin splits 1:1 into eCash (ECX) at block ~973,728; ECX keeps Bitcoin's exact SHA-256d proof of work. Every coin here is a block in a small chain that follows those same rules, scaled down so a browser can mine it, and every coin trades against wrapped ECX on Solana. The consensus code reproduces Bitcoin's genesis block hash byte for byte.

Hash
SHA-256d · like ECX
Header
80 bytes
Retarget
21 blocks
Halving
210 blocks
Target spacing
10 min
Pair
wECX
01

What is eCash

eCash (ECX) is a Bitcoin hard fork from Paul Sztorc and LayerTwo Labs, built to activate Drivechains (BIP300 and BIP301) on a chain of its own. It is Bitcoin Core with that change: the same SHA-256d proof of work, the same address formats, and its own difficulty retargets after a one-time reset at the fork.

At mainnet block ~973,728 (estimated around October 31, 2026) every Bitcoin address receives ECX one-for-one: hold 1 BTC at the fork, own 1 ECX after it. From then on ECX is priced by its own market. The home page shows both numbers live: the fork ratio (1:1) and the market ratio between ECX and BTC.

BitcoineCash (ECX)
Proof of workSHA-256dSHA-256d (identical)
Node softwareBitcoin CoreFork of Bitcoin Core v31.1
Addresses1… / 3… / bc1…Identical formats
DistributionMined since 20091:1 snapshot of every BTC balance, then mined
Upgrade-Drivechains: BIP300 escrow + BIP301 blind merged mining

That is why this launchpad fits: every coin here is mined with the same SHA-256 work, in the same 80-byte header format, with the same retarget and median-time rules. Not to be confused with eCash XEC, an unrelated coin, or with Chaumian “ecash” (Cashu, Fedimint).

02

wECX on Solana

Coins here trade against wrapped ECX (wECX), an SPL token issued by ecash.com that exchanges at par (1:1) for real ECX through the ecash team's bridge: deposit ECX and receive wECX on Solana, or send wECX back and receive ECX, minus a bridge fee. wECX has 8 decimals, so one raw unit is one satoshi of ECX.

wECX
Mint6ombVv3YMs9qpx1QkycD9XW8HKSfv7vGrCFX3cxCYMVY
Issuerecash.com (mint authority 6Av9…sKT)
Decimals8 (1 unit = 1 sat)
Redemption1:1 for ECX via the ecash bridge (custodial)
MarketsOrca, Tessera and others, routed by Jupiter

Know the trust model. The bridge is custodial: the ecash team holds the ECX that backs wECX. Their own bridge README notes that per-window withdrawal caps and multisig payout authority are not built yet. Until mainnet, wECX is a claim on ECX that has not forked; expect volatility around the fork.

03

How ePeg works

ePeg is a launchpad built on eCash's idea of money: proof of work. Every coin is a block in a small chain that follows the same SHA-256d rules as Bitcoin and ECX. Before a coin can launch, your browser has to find a nonce that makes its 80-byte block header hash below the network target. The server checks the proof and that it builds on the current tip, then builds the Meteora bonding-curve transaction that creates the coin, paired with wECX. The block hash rides along in that transaction as a memo, so the proof lives on Solana permanently.

Mined, not minted

A coin exists only after its header beats the target. No proof, no transaction.

Chained

Each block commits to the previous block's hash. The order of launches is fixed forever.

Paired with eCash

Every curve trades against wrapped ECX. Prices are in sats; graduation lands in a wECX pool.

04

Launch lifecycle

Eight stages from a blank form to a graduating coin. Click a stage to pause on it.

Launch lifecycleStage 1/8
  1. 1
    Inscribe
    Name, ticker, art, first buy
    Browser
  2. 2
    Pin
    Image + metadata JSON to IPFS
    Server
  3. 3
    Commit
    Merkle root of mint, miner, inscription
    Browser
  4. 4
    Mine
    SHA-256d over the header in Web Workers
    Browser
  5. 5
    Verify
    PoW, tip, bits, time, merkle
    Server
  6. 6
    Sign
    Wallet + mined mint keypair
    Browser
  7. 7
    Broadcast
    DBC pool + first buy + memo
    Solana
  8. 8
    Confirm
    Curve fills: 6 confirmations
    Solana
Gold = in your browser · white = server · green = on Solana
06

Proof of work

A header is valid when sha256d(header), read as a little-endian 256-bit integer, is at or below the target. Hashes are uniformly random, so the only strategy is to try nonces until one lands. The miner precomputes the SHA-256 state of the first 64 header bytes (the midstate), which never change, so each attempt costs two compressions instead of three, the same trick every ASIC uses. Work is split across Web Workers, one slice of the nonce space per CPU thread.

Try it: mine a stringExpected ≈ 65.5K tries
sha256d("epeg0") =
—
Nonce
0
Best
0 / 16 bits
Rate
—
Runs on your main thread; the real miner uses every core with midstate precomputation.
07

Targets & bits

The target is packed into 4 bytes: one exponent byte and a 3-byte mantissa. Difficulty is how many times harder the current target is than the easiest allowed one (powLimit).

powLimit   bits = 0x1e03ffff
           target = 0x000003ffff000000000000000000000000000000000000000000000000000000
difficulty = powLimit / target
expected   ≈ 2^256 / (target + 1)  hashes
Compact target decodertarget = mantissa × 256^(exponent − 3)
0x
Exponent0x1e = 30 bytesMantissa0x03ffffTarget000003ffff000000000000000000000000000000000000000000000000000000Difficulty1 (vs our powLimit)Expected work4.2M hashes · 22 leading zero bits
Phone · 1 MH/s
~4s
Laptop · 15 MH/s
<1s
Antminer S21 · 200 TH/s
<1s
08

Difficulty retarget

Every 21 blocks the target is recomputed from how long the last period actually took, aiming for one launch every 10 minutes at peak demand. This is Bitcoin's (and eCash's) GetNextWorkRequired, including Satoshi's off-by-one: the span covers 20 gaps but is compared against 21.

expected = 21 × 600s
actual   = time(h−1) − time(h−21)
actual   = clamp(actual, expected/4, expected×4)
target'  = clamp(target × actual / expected, powLimit/64, powLimit)

Drag the demand slider. Low demand sinks to the floor; a rush pushes difficulty up, at most 4× per period.

Retarget simulator24 launches/hour of demand
1.0P14.0P24.2P34.2P44.2P54.2P64.2P74.2P84.2P94.2P10
Final difficulty 4.2010.5 min / block
Bars: difficulty per 21-block period · line: average minutes per block · dashed: 10-minute target
09

Time rules

Two of Bitcoin's timestamp rules apply: a block's time must be later than the median of the previous 11 blocks, and at most 2 hours ahead of the server clock.

Median time pastMTP = t+11
Last 11 blocks, in order
Sorted · the middle one wins

Timestamps can be out of order (miners' clocks differ), so Bitcoin compares against a median rather than the last block. That stops one miner from dragging time backwards to game the retarget.

A new block's timestamp must be strictly later than the median of the last 11.
10

Merkle commitment

The merkle root makes a launch tamper-proof once mined. Three leaves are hashed pairwise with SHA-256d, and the odd one pairs with itself, exactly like Bitcoin's transaction tree. The mint keypair is generated in your browser and never reaches the server; it signs the launch there.

L0 = sha256d(mint pubkey)
L1 = sha256d(creator pubkey)
L2 = sha256d(json[name, symbol, uri, firstBuySats])
root = H( H(L0‖L1) ‖ H(L2‖L2) )
Merkle commitmentBitcoin-style · odd node duplicated
ROOT → HEADER9cd84931…H(L0‖L1)cf818954…H(L2‖L2)ed0ebbd3…L0 · MINT4e04815f…L1 · MINER1e1567e6…L2 · INSCRIPTIONfb2bb0a1…L2 (DUPLICATE)fb2bb0a1…
Change any leaf and the root changes, which breaks the proof of work.
11

First buy & halvings

In Bitcoin and eCash the coinbase is the miner's reward. Here it's the miner's right to the first buy, inside the launch transaction, before anyone else can trade. The cap starts at 5 ECX and halves every 210 blocks. You pay in SOL; a Jupiter swap buys the exact wECX amount at launch.

First-buy cap by epochHalves every 210 blocks
500M
E0
250M
E1
125M
E2
62.5M
E3
31.3M
E4
15.6M
E5
7.8M
E6
3.9M
E7
2M
E8
976.6K
E9
EpochBlocksCap (sats)Cap (ECX)
00–209500,000,0005 ECX
1210–419250,000,0002.5 ECX
2420–629125,000,0001.25 ECX
3630–83962,500,0000.625 ECX
4840–1,04931,250,0000.3125 ECX
51,050–1,25915,625,0000.15625 ECX
12

Confirmations

After launch, each coin trades on its own Meteora bonding curve against wECX. Progress toward the migration threshold is shown as Bitcoin confirmations: each sixth of the ECX the curve raises is one confirmation. At six the curve is complete, the block is final, and liquidity migrates to a DAMM v2 pool.

Illustrative constant-product curve · each line is a hash · orange = sold
ConfECX raisedSupply soldPrice vs launchProgress
116.7%26.3%1.54×
233.3%44.0%2.20×
350.0%56.8%2.97×
466.7%66.4%3.87×
583.3%74.0%4.87×
6 · final100.0%80.0%6.00×

On a constant-product curve price rises faster than supply sells, so confirmations bunch up near the end: the first confirmation sells about a quarter of the curve's supply, the sixth only a few percent.

13

Orphans & forks

Two miners can find a block on the same tip. The database enforces a unique prev_hash, so appending is atomic: the first submit wins and the other becomes an orphan that re-mines on the new tip. If a launch fails on Solana after its block was appended, the block stays as an empty block: its proof of work was real, so history isn't rewritten.

Two miners, one tipStep 1/6
ALICEblock Nmining…BOBblock Nmining…

1. Both miners fetch the template: tip is block N.

14

Transaction anatomy

A launch is at most two Solana transactions, signed together in one wallet approval. The swap only exists when your first buy needs wECX you don't already hold.

Tx 1 · Funding (only if needed)Jupiter
  1. 00Compute budget
  2. 01Wrap SOL
  3. 02Route SOL → wECX (ExactOut: the first-buy amount)
  4. 03Unwrap leftover SOL
Signers · Wallet
Tx 2 · LaunchMeteora DBC
  1. 00initialize_virtual_pool: creates the mint, Metaplex metadata and the curve pool from the config key
  2. 01swap: the creator's first buy, paid in wECX, before anyone else can trade
  3. 02memo: epeg:block:<height>:<hash> (the proof of work, on Solana forever)
Signers · Wallet (payer, creator) · mined mint keypair
15

Trust model

What enforces each rule, and how you can check it.

RuleEnforced byHow to verify
Hash ≤ targetServer, at prepare and submitRecompute sha256d from the public header
Builds on the tipUnique prev_hash in the databaseWalk prev_hash links back to block 0
Metadata can't changeMerkle root inside the headerRecompute the root from the coin's data
Proof is permanentMemo in the Solana launch txRead the memo on Solscan
Curve, fees, graduationMeteora DBC program on-chainRead the config and pool accounts
Fixed supplyDBC mints the full supply at creationCheck the mint account
First-buy capServer, from block heightCompare buy size to the halving schedule
wECX ↔ ECX at parecash.com's custodial bridgeTheir published bridge code and reserves
16

Parameters

ParameterThis chainBitcoin / ECX
Hash functionSHA-256dSHA-256d
Target spacing600s600s
Retarget interval21 blocks2016 blocks
Retarget clamp4× per period4× per period
powLimit bits0x1e03ffff0x1d00ffff
Expected work at difficulty 14.2M hashes~4.3B hashes
Maximum difficulty64none
Halving interval210 blocks210,000 blocks
Initial subsidy5 ECX (first-buy cap)50 BTC / ECX block reward
Median-time-past window11 blocks11 blocks
Max future drift2h2h
Confirmations to final6 (curve complete)6 (convention)
17

Verify it yourself

Every coin page has a “Verify in browser” button that recomputes the hash and merkle root from the stored fields. The same check in a few lines:

import { checkProofOfWork, merkleRoot } from "@/lib/chain";

const header = { version, prevHash, merkleRoot: root, time, bits, nonce };
checkProofOfWork(header).valid;                         // hash ≤ target
merkleRoot({ mint, creator, name, symbol, uri, firstBuySats }) === root;
// and the Solana launch tx carries the memo: epeg:block:<height>:<hash>
18

FAQ

No. Difficulty is capped at 64, about 268M hashes, so even at peak a laptop finds a block in under a minute. At the floor it takes a second or two. Your browser uses every CPU thread you allow.

It is one, by design: each launch costs real computation, and the retarget makes it cost more when everyone launches at once. It also gives every coin a verifiable hash, a place in an ordered chain, and a timestamp nobody can backdate.

Only one block can extend each tip. The first valid submission wins; the other miner's browser re-mines the same coin on the new tip automatically. Nothing is lost except a few seconds of hashing.

It would be caught. Every block's header is public, the hash is written into the Solana launch transaction as a memo, and anyone can recompute SHA-256d and the merkle root from the coin's data. The 'Verify in browser' button on every coin page does exactly that.

Convenience. You type SOL; at launch a Jupiter swap buys exactly the wECX your first buy needs, and your wallet signs the swap and the launch in one approval. If you already hold enough wECX, no swap happens.

When the curve's wECX reserve reaches the config's migration threshold, trading on the curve stops and Meteora migrates the liquidity into a DAMM v2 pool, still paired with wECX. The coin page then links out to trade it there.

Not without breaking its block. The metadata URI is one of the merkle leaves, so the proof of work commits to it. A different URI means a different root, a different header, and an invalid hash.

19

Addresses

Address
DBC config46HPQEnTX35is3hHTpaperc3hcGHGFSfWn3FjF1fUQmJ
wECX mint6ombVv3YMs9qpx1QkycD9XW8HKSfv7vGrCFX3cxCYMVY
eCashecash.com
Meteora DBC programdbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN
Memo programMemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr