Tool · Difficulty & emission
WTEMA simulator
Shock the hashrate and watch the difficulty catch up
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.