← Back to all posts
Mining SHA-256 Proof-of-Energy

SHA-256 Proof-of-Energy

July 16, 2026  —  8 min read

Bitcoin uses SHA-256 to secure its blockchain — miners hash repeatedly until they find a value below a difficulty target. The computation is purposeless by design: the only output is proof that you spent electricity. Wattcoin takes the same SHA-256 primitive and repurposes it. Every hash burned is a measurement of energy consumed, not a lottery ticket.

What is SHA-256?

SHA-256 is a cryptographic hash function that takes any input and produces a fixed 256-bit (32-byte) output. It is deterministic — the same input always yields the same output — and one-way: you cannot reverse the output to recover the input. These properties make it ideal for tamper-proof computation verification.

In Wattcoin, SHA-256 is the computational engine behind energy proof generation. Workers burn through SHA-256 iterations in continuous loops, and the resulting state transitions serve as verifiable evidence of work performed.

The Mining Loop

Wattcoin mining is a continuous cycle of three phases: seed assignment, hash burning, and peer probe verification.

  1. Seed assignment — The coordinator assigns a unique 32-bit seed to the worker. This seed is the starting point for all SHA-256 computation in this interval. It changes with each probe cycle, preventing precomputation or reuse of old work.
  2. SHA-256 hash burning — The worker feeds the seed into a tight SHA-256 loop, hashing continuously for the duration between probes (up to 60 seconds). Each iteration produces a new 256-bit state. The worker tracks the starting state, ending state, total operations count, and elapsed wall-clock time.
  3. Proof generation — When the interval ends, the worker packages the results into a seed proof: the start state, end state, total operations, burn duration in milliseconds, and an optional intermediate proof for cross-verification.
  4. Peer probe verification — A peer challenges the worker with a probe. The worker runs a deterministic benchmark, submits the result, and the verifier re-executes the same computation to confirm correctness. Only after the probe passes are the accumulated seed proofs counted toward energy contribution.
  5. Contribution flush — The verified seed proofs are converted to watt-hours using the machine's calibrated power curve — a fingerprint of actual power draw measured at 10 load levels during the initial benchmark — then broadcast to the P2P network as a signed contribution to the current mining round.

From Hashes to Watt-Hours

The core formula is straightforward:

Energy (Wh) = Hardware Power (W) × Duty Cycle (%) × Time (h)
// Verified hardware power × configured load × measured burn duration

The SHA-256 loop serves two purposes here. First, it consumes real electricity — the CPU or GPU is actively computing, drawing power from the wall. Second, it produces a verifiable state transition that peers can independently recompute to confirm the worker actually did the work.

The hardware power draw comes from the machine's calibrated power curve — during the initial benchmark, hardware power sensors (RAPL, EMI, NVML) measure actual power draw at 10 load levels, creating a per-machine fingerprint. The miner's configured load indexes into this curve to determine the active power draw. The burn duration is measured by the worker's clock and bounded by the probe interval.

Seed Proofs: The Evidence

A seed proof is a compact record of SHA-256 computation:

Field Description
startState The SHA-256 hash of the assigned seed — the initial state
endState The final SHA-256 hash after N iterations — deterministic given startState and N
totalOps Number of SHA-256 iterations performed in this proof
burnMs Wall-clock time the worker spent hashing, in milliseconds
intermediateProof A mid-chain hash value for cross-verification without re-running the full chain

Any peer can verify a seed proof by re-running the SHA-256 chain from startState for totalOps iterations and checking that the result matches endState. This is deterministic and fast — verification takes milliseconds regardless of how long the original computation took.

Why SHA-256 and Not Something Else?

SHA-256 is universally supported, hardware-accelerated on modern CPUs and GPUs, and has well-understood performance characteristics. This makes it ideal for energy calculation: the relationship between hash rate and power consumption is predictable and measurable for every hardware model.

  • CPU miners run a single-threaded SHA-256 chain. The iteration count and wall-clock time directly reflect the CPU's single-core throughput.
  • GPU miners run a parallel SHA-256 grid across compute units. Each device produces a nonce proof that is verified against a difficulty target.

Each machine has its own calibrated power curve — a fingerprint of its actual power consumption at different load levels. The protocol does not care which hardware you use — it measures energy, not speed.

Peer Verification

Energy claims are not taken on trust. Every worker is periodically challenged by a peer through the probe system. A probe issues a time-bounded computational task — a VDF (Verifiable Delay Function) proof-of-time combined with a hardware-specific benchmark. The verifier re-executes the same computation and checks the result.

If the probe passes, the worker's accumulated seed proofs from that interval are flushed to the round ledger as verified energy contribution. If the probe fails — proof mismatch, suspiciously fast timing, or hardware liveness check failure — the energy is discarded and the worker's trust score is penalized.

Key takeaway: SHA-256 in Wattcoin is not a puzzle to solve — it is a measuring instrument. Every hash burned is a verifiable unit of energy expenditure, confirmed by peer re-execution and converted to watt-hours using the machine's calibrated power curve.

Read more about Proof-of-Energy consensus → or the full whitepaper → for the complete technical specification.

Frequently Asked Questions

How does SHA-256 prove energy consumption?

SHA-256 computation requires transistors to switch, which consumes electricity. By running a known computation for a measured duration on a calibrated machine, the energy consumed is derived from the machine's calibrated power curve — actual power draw measured at 10 load levels during the initial benchmark. The SHA-256 output serves as proof that the computation actually happened — peers can re-run the same chain and verify the result matches.

Can someone fake the SHA-256 computation?

No. The seed proof is a deterministic state transition — given a starting state and iteration count, there is exactly one valid ending state. A peer can verify the proof by re-computing the SHA-256 chain in milliseconds. Faking the proof would require producing the correct final hash without actually performing the computation, which is computationally infeasible.

Why not just count hash rate like Bitcoin?

Bitcoin rewards the fastest hasher. Wattcoin rewards the most energy spent. Hash rate is a proxy for energy, but an imperfect one — different hardware architectures achieve vastly different hash rates at the same power draw. By measuring energy directly through verified computation time on a calibrated power curve, Wattcoin eliminates the ASIC arms race and makes every watt of electricity count equally.

What prevents someone from claiming more energy than they actually used?

Three layers of protection. First, the calibrated power curve caps claimed power draw to values measured by hardware power sensors during the initial benchmark — you cannot claim 500W from a machine that measured 65W at full load. Second, the duty-cycle configuration limits the percentage of time the hardware is assumed to be active. Third, peer probes verify that the worker is actually performing the claimed computation in real time — a VDF proof-of-time proves sequential time elapsed, and the benchmark proof proves the hardware executed the work.

← Back to all posts