Networks and tokens

Chain reorganization

Also called: Reorg, Orphaned block

When a network replaces its most recent blocks with a competing version, removing the transactions that were only in the replaced blocks.

Sometimes two valid blocks are produced at nearly the same height. The network briefly has two versions of its recent history, then settles on one. Blocks on the losing side are orphaned, and any transaction only in them is gone: it may come back in a later block, or never.

Short reorganizations of a block or two are normal on some networks. Deep ones are rare, but they're how double-spend attacks on exchanges have worked: deposit, get credited, withdraw, then reorganize the deposit away.

Defending against them

  • Credit only after enough confirmations.
  • Check that each block you process links to the previous one, so you notice when history changes.
  • Have a plan for a deposit that disappears after it was credited.

On Valtu

Valtu checks that every block links to the one before it. A deposit dropped before it was final becomes ORPHANED and is never credited. One dropped after it was confirmed becomes NEEDS_REVIEW, with its own webhook, and the team investigates. On Tron only solidified blocks are read.

Related terms

Keep reading.

More in networks and tokens: Testnet · EVM · Layer 2 · Smart contract · Contract address · Token decimals · ERC-20 · TRC-20 · BEP-20 · Stablecoin · USDT · USDC · Wrapped token. The whole glossary.

Put it into practice.

Every workspace starts on testnets with free test coins: same dashboard, same API. Go live when your team is ready.