Tool · Difficulty & emission

WTEMA simulator

Shock the hashrate and watch the difficulty catch up

WTEMA simulator

Hashrate jumps; the target follows, a little after every block

Simulation Blocks arrive at random, as on the real network, but the hashrate and timeline are made up. Times are random draws, not chain data.

Demo run · Block 8,064 of 8,064 day 17.1 WTEMA avg 232 s · diff ×1.15 Bitcoin-style avg 272 s · diff ×1.36

After 8,064 blocks: hashrate ×1.00. WTEMA: last 144 blocks averaged 232 s, difficulty ×1.15. Bitcoin-style: 272 s, difficulty ×1.36.

This demo doubles the hashrate at block 1,500 and drops it back at 5,000. WTEMA starts correcting with the very next block and closes the gap smoothly, about 63% of it per week of clock time (its one-week time constant). The 2,016-block rule does nothing until its window ends, then jumps all at once, and lags again when the hashrate changes back: blocks run slow until its next window ends.

One step, exactly as pearld does it

The chart uses floating point for speed. pearld uses whole numbers: new target = old + ⌊(t − 194) × old ÷ 604,800⌋, clamped to [1, PowLimit], then rounded into bits.

old target
0x6af3a60000000000000000000000000000000000000000
t − T
300 − 194 = 106 s
adjustment
⌊106 × old ÷ 604,800⌋ = 0x4cc76689133bde689133bde689133bde689133bde68
new target
0x6af87276689133bde689133bde689133bde689133bde68
next bits
0x176af3a6 → 0x176af872
difficulty
40,157,376.49334089 → 40,150,342.21117200 (-0.0175%)

Slower than 194 s, so the target rises a little: the next block gets slightly easier. One block moves it by a fraction of a percent, but the steps compound: if blocks run late by 604,800 seconds in total (one week), the target grows by a factor of about e ≈ 2.72.

Runs in your browser · simulated, not chain data src/lib/wtema.ts · T = 194 s, τ = 604,800 s

What it does

Press Run and blocks start arriving, each after a random wait that depends on the hashrate and the current target. Double or halve the hashrate, or knock 90% of it out for a while, and watch two rules respond:

  • Pearl (WTEMA) retunes the target after every block.
  • A Bitcoin-style rule holds the target for 2,016 blocks, then corrects by the ratio of actual to expected time (at most ×4 either way).

The run covers 8,064 blocks (four Bitcoin-style windows, about 18 days at 194 seconds). Press +1 day to step about 445 blocks at a time.

How to read it

  • Top chart: the average block time over the last 144 blocks, with every individual block as a faint dot. The dashed line is Pearl’s 194-second target.
  • Bottom chart: difficulty relative to the start, on a log scale, with the hashrate as a dashed line. Difficulty should track hashrate; block times should stay near 194 s.
  • Hover the chart to read any block. The demo that loads first doubles the hashrate at block 1,500 and drops it back at 5,000.

Pearl specifics

  • WTEMA moves the target a little after every block: new = old × (1 + (t − 194) / 604,800). Its time constant is one week of clock time: after a sudden hashrate change, block times close about 63% of the gap to 194 s per week, smoothly and starting with the very next block. There is no 2,016-block wait and no jump.
  • Block timestamps must be at least 1 second after the parent, so the simulator never draws a solve time below 1 s.
  • This is a simulation. Hashrate, timing and the random draws are made up, and the chart uses floating point for speed. Open One step, exactly as pearld does it to run the real integer rule from any real bits.

Under the hood

Runs entirely in your browser. The one-step panel calls src/lib/wtema.ts, which mirrors pearld’s difficulty.go with exact integer math; its unit tests reproduce the research worked example (0x176af3a6 with a 300-second block becomes 0x176af872) and the bits of real consecutive mainnet blocks.

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.