Overview
Pessimistic Proof computes state transitions between bridging events using three main Sparse Merkle Trees and several supporting data structures. Core components:- Sparse Merkle Trees: Local Exit Tree, Nullifier Tree, Local Balance Tree
- State transitions: Bridge Exits, Imported Bridge Exits
- State representations: Local State, Multi Batch Header, Proof Output
Unified Bridge Foundation
Pessimistic Proof builds on top of the Unified Bridge data structure. For complete understanding, refer to the Unified Bridge Data Structures. Key Unified Bridge Components:- Local Exit Tree: Records outgoing cross-chain transactions as cryptographic commitments in a 32-level Sparse Merkle Tree, with each leaf representing a hash of bridge transaction details including destination, amount, and metadata.
-
Global Exit Root: Combines all chain states for verification by computing
hash(RollupExitRoot, MainnetExitRoot), providing a single unified root that represents the complete state of cross-chain activities across the entire network. - Global Index: Unique 256-bit reference for transactions within Global Exit Root, encoding the source network type (mainnet flag), rollup identifier, and local transaction index to enable precise transaction location across the hierarchical tree structure.

Local Balance Tree & TokenInfo
The Local Balance Tree tracks all token balances on a chain using a 192-bit depth Sparse Merkle Tree.TokenInfo Structure
Key Layout
TheTokenInfo key uses a clever bit layout for efficient storage and lookup:
- First 32 bits: Origin network ID where the token originally exists, enabling the system to track tokens across multiple chains while maintaining their original identity and preventing confusion between tokens with the same address on different chains.
- Next 160 bits: Token address on the origin chain (standard Ethereum address size), ensuring that each token can be uniquely identified by combining its origin network and original contract address, even when wrapped versions exist on other chains.
Balance Updates
When assets are bridged out or claimed, the token balance in the Local Balance Tree is updated accordingly through atomic operations that ensure balance conservation and prevent overdraft conditions. Outbound bridging decreases the balance while inbound claiming increases it, with all changes verified through Merkle proof validation.
Nullifier Tree
The Nullifier Tree prevents double-spending and ensures transaction uniqueness across the network. Each chain maintains its own 64-bit depth Sparse Merkle Tree.Key Structure
The Nullifier Tree key is constructed using a 64-bit identifier that uniquely identifies each claimable transaction:- First 32 bits: Network ID of the chain where the transaction originated, enabling the system to track which source chain a claimed transaction came from and prevent confusion between transactions from different networks.
- Last 32 bits: Index of the bridge exit within the Local Exit Tree of the source chain (also called Local Index or depositCount), providing the exact position of the transaction within the source chain’s bridge transaction history.
Double-Spending Prevention

Bridge Exits
Bridge Exits represent outbound transactions from a chain.Structure
Usage
All outbound transactions from a chain are represented in aBridgeExit vector during pessimistic proof generation. Each BridgeExit contains complete transaction information needed to validate that the chain has sufficient balance for the outbound transfer and to update the Local Exit Tree with the new transaction commitment.
Imported Bridge Exits
Imported Bridge Exits represent inbound transactions to a chain.Structure
Claim Data Types
- Mainnet: Requires direct proof from Mainnet Exit Root to L1 Info Root since L1 transactions are recorded directly in the Mainnet Exit Tree and don’t need to go through the Rollup Exit Tree aggregation layer.
- Rollup: Requires a two-step proof path from Local Exit Root → Rollup Exit Root → L1 Info Root because L2 transactions must first prove inclusion in the L2’s Local Exit Tree, then prove that the L2’s Local Exit Root was properly submitted to the Rollup Exit Tree on L1.
Local State
Local State represents the complete state of a local chain.Structure
Components
-
Exit Tree: Records all outgoing bridge transactions as a 32-level Sparse Merkle Tree, storing cryptographic commitments of
bridgeAssetandbridgeMessageoperations that represent assets and messages being sent to other chains. - Balance Tree: Tracks token balances for all assets on the chain using a 192-bit depth Sparse Merkle Tree, with TokenInfo keys enabling precise tracking of token origins and current balances for every asset type on the chain.
- Nullifier Tree: Prevents double-spending of claimed assets by maintaining a 64-bit depth Sparse Merkle Tree that marks imported bridge exits as claimed, ensuring that each cross-chain transaction can only be processed once on the destination chain.