John Karanja

The field guide · rule 11 of 16

On a blockchain, wait until it is final

The newest blocks can be replaced. Wait for confirmations, count each transaction once, and refuse old requests.

What it means

Blockchains have their own ways of going wrong. The newest blocks can be replaced by others (engineers call this a reorg), so wait for enough confirmations before treating money as received. Make sure each transaction is counted once, and that a signed request cannot be sent again later.

What goes wrong without it

A deposit is credited as soon as it appears. Its block is replaced, the deposit disappears, and the customer has already withdrawn the money.

How I build it

From systems I build and run.

Ask your team

  1. How many confirmations do you wait for before you credit a deposit?
  2. What happens to a credit if its block is replaced?
  3. Can one transaction ever be counted twice?

A "no" or "not sure" is worth a closer look.

How a review checks this

For products that touch a blockchain, the payments check covers confirmations, replaced blocks and double counting.

Request a reviewThe offer: Payments and ledger integrity checkCheck your system in one minute

Related rules