Reviewed Aug 2026
DE
DA-02 · LESSON 06

Indexer reconstruction and reorgs

KEY DEFINITIONS

Terms used in this lesson

Validator
Software or a participant that independently checks state transitions under a system's rules. The exact role depends on the protocol being discussed.
Runes
A Bitcoin metaprotocol that assigns fungible-token meaning to transaction outputs through off-chain interpretation.
UNIT
Ducat’s dollar-pegged stablecoin, the asset a borrower can create against bitcoin collateral.
Proof-of-work target
The maximum header-hash value accepted for a block; lowering it makes valid hashes harder to find.
UTXO
Unspent transaction output: one discrete chunk of bitcoin that can be used as a transaction input.
Vault
A set of Bitcoin outputs and spending rules that holds collateral and represents the current loan state.
Outpoint
A transaction ID plus output number that identifies one exact prior output.
API
Application programming interface: a defined way for one program to request data or actions from another.

Validators and Rune-compatible indexers deterministically replay confirmed transactions and must reverse and reapply derived token state during Bitcoin reorganizations.

45 min Difficulty 4/5 Not started

Loading lesson visuals...

01

Learn the idea

An indexer scans Bitcoin history and derives Runes and Ducat state that Bitcoin Core does not store as native balances. A checkpoint is a recorded chain position, usually a block height and block hash, plus enough derived state or undo information to resume or verify replay. A rollback target is the most recent checkpoint or common ancestor that remains on the selected Bitcoin chain after a reorg. A reorg disconnects previously accepted blocks, so derived changes after that rollback target must be reversed before transactions on the replacement branch are applied.

GUIDED EXPLANATION1/4 ideas inspected
1

Apply blocks in order

The validator parses confirmed transactions and updates UTXOs, UNIT allocations, accounts, and vault objects deterministically.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionA confirmed UNIT balance can never change because Bitcoin blocks are final.

Confirmations reduce reorg risk but do not create absolute finality. An indexer must handle disconnected blocks correctly.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.