top of page

Account Nonce

The Account Nonce is one of the fields of the Ethereum Account, which keeps track of the number of transactions sent by a particular address.

Consider a scenario:

When Bob sent $40 to Alice, the nonce counter increments by 1.

🔢 It is important to note that the nonce counter starts at 0, not 1.

When Bob sent $30 to Tom, the nonce counter again increments by 1.

But when Alice sent $10 to Bob, Alice's nonce increments by 1.

⚙️ Nonce is the transaction counter of the sending address. It doesn’t include transactions received by the address.

Therefore, Bob’s nonce doesn’t change as he hasn’t sent; he has received the $10.

And again when Bob sends $20 to Lily, Bob's nonce counter increments.

🔀 It allows the transactions to be processed in order:

Let’s say Bob sent the first two transactions in 15 seconds. It is not necessary that the transaction to Alice (1st transaction) is processed before the transaction to Tom (2nd transaction).

But with a nonce, we can keep track. Unless the transaction with nonce 0 is not collected and processed, the transaction with nonce 1 cannot be processed.

Hence, it allows the transactions to be processed in order according to the Nonce value.

🛡️ Protects from reply Attacks:

Bob already signed the transaction to Alice that sends her $40. Alice can keep using the same transaction to withdraw money from Bob until he loses all his funds.

If the transaction has a nonce, Alice cannot duplicate the transaction. Nonce makes the transaction unique as no two transactions can have the same Nonce. It will get rejected if Alice tries to use the same transaction again.

15 views0 comments

Recent Posts

See All

Off-Chain Solutions

Blockchain technology has revolutionized the way we think about data management, trust, and security. However, as it continues to evolve, it faces scalability and performance challenges. Off-chain sol


bottom of page