Documentation Index
Fetch the complete documentation index at: https://docs.moralis.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
A blockchain reorganization (re-org) occurs when a previously accepted block is replaced by another block at the same height. Re-orgs are a normal part of blockchain operation, especially on:- High-throughput chains
- L2s
- Testnets
How Streams Handles Re-orgs
When a re-org occurs:- Streams detects the replaced block
- Events from the dropped block are invalidated
- Replacement block events are processed
- Confirmation logic is recalculated
Impact on Webhooks
Re-org handling is reflected through:confirmed: falseevents that may not be finalizedconfirmed: trueevents only sent after finality
- It will not receive a confirmed webhook
- Replacement transactions will be delivered instead
Why This Matters
Without re-org handling, applications risk:- Double-counting transactions
- Incorrect balances
- Invalid ownership state
- Only finalized state is confirmed
- Re-orgs do not corrupt downstream systems
Re-org Behavior by Chain
- EVM — re-orgs are most common on high-throughput chains, L2s, and testnets. Confirmation thresholds vary per chain (see Supported Chains).
- Bitcoin — re-orgs follow the longest-valid-chain rule and are exponentially less likely with each additional confirmation.
- Solana — re-orgs are rare and bounded by the network’s slot-based finality model.
confirmed: true webhook, and replacement transactions are delivered in their place.
Replays & Recovery
If your system was offline during a re-org:- You can replay affected blocks
- You can replay failed webhooks
Best Practices
- Treat
confirmed: falseas provisional - Persist only confirmed state
- Make handlers idempotent
- Use replays for recovery, not polling

