Proof-of-work turns electricity into security by making it expensive to rewrite an accepted transaction history.
A blockchain is a shared record maintained by independent computers. Its consensus mechanism is the rule those computers use to agree on which record is valid. In proof-of-work, miners compete to add the next block, a batch of transactions, by repeatedly hashing its contents with different nonce values until one hash falls below the network’s target.
The calculation is difficult to find but easy for every node to check. After a miner broadcasts a valid block, other nodes verify its transactions, hash, and link to the previous block. They follow the valid chain containing the most cumulative work, not merely the one with the most blocks.
This makes rewriting history an economic problem. To reverse a confirmed payment, an attacker must redo the target block’s work and catch up with honest miners while continuing to spend electricity and hardware capacity. With control of a majority of the network’s active hash rate, an attacker could reliably reorganize recent blocks; without it, the odds fall as more blocks are added. Confirmations therefore increase confidence rather than creating instant mathematical finality.
The electricity is not stored in the blockchain. It is a sunk cost attached to each candidate history, while block rewards and transaction fees motivate miners to keep extending the history most nodes will accept. That combination is why proof-of-work can secure an open network without requiring participants to own the chain’s asset first. The practical cost is that mining hardware, cheap power, and scale matter, so “anyone may mine” does not mean everyone can compete equally.
Proof-of-work suits a network that values simple, externally measurable competition and wants security anchored in an input—energy—that cannot be created by changing the software. It is a poor fit when electricity use, confirmation latency, or specialized mining economies are unacceptable.
Proof-of-stake makes the opposite trade: validators lock the network’s asset as collateral, and dishonest behavior can destroy that stake. It uses far less energy and can provide explicit finality, but it depends on capital, validator rules, and more complex social and cryptographic assumptions. Ethereum switched to proof-of-stake in 2022, so current Ethereum security is not proof-of-work security.
That distinction matters for zkSync Era, a zero-knowledge rollup: its transaction execution and validity proofs are handled above Ethereum, while Ethereum verifies the resulting state transition. A token swap therefore depends on several layers, not just on mining.
For the application layer, the next question is how an Automated Market Maker such as syncswap actually executes that swap.