BeCuriouzBeCuriouz

Learn something new every day

⛓️ Crypto & Blockchain
🔁

Why can't someone just resend your signed crypto payment?

💡 A valid signature isn't enough on its own; a per-account counter (the nonce) and a chain ID tie each signed transaction to exactly one use on exactly one chain.

When you send ETH, your wallet signs a message that says roughly "pay Bob 1 ETH." Once you broadcast it, that signed transaction is public. Anyone can copy it. So what stops Bob, or anyone else, from broadcasting the same valid signature 50 more times to drain your account? The signature checks out every time, because you really did sign it.

Ethereum stops this with a simple counter called the account nonce. Every account starts at nonce 0, and every transaction you sign includes the next number in the sequence. The nonce is part of the signed data, so nobody can change it without breaking the signature. Each node tracks your current nonce and accepts a transaction only if it carries exactly the next one. After your nonce-7 payment is included, any copy of it is stale and gets rejected. This defense against a replay attack costs almost nothing: one number per account.

The counter has two side effects. First, it enforces strict ordering. Transactions from one account are processed in nonce order, with no skipping. Second, it lets you replace a pending transaction: sign a new one with the same nonce and a higher fee, and only one of the two can ever be included.

A nonce stops replays on one chain, but a signature could still be valid on a different chain that shares the same history. After the 2016 split between Ethereum and Ethereum Classic, people's transactions were replayed on the other chain. EIP-155 fixed this by adding a chain ID to the signed data, so a signature made for one chain is invalid on any other.

🔁 Why can't someone just resend your signed crypto payment? — BeCuriouz