Citrea uses a Bitcoin commit/reveal pattern (similar to inscriptions)
for both batch commitments and proofs. A background daemon scans every Bitcoin block
for transactions sending to the known sequencer address
(bc1pqq...dyvz5) and prover address (bc1ppu...947j),
then decodes the batch data from the witness to extract the batch number, state root,
and L2 block range.
Each transaction's fee is computed as
sum(input values) − sum(output values)
in integer satoshis, using prevout data from Bitcoin Core.
The total settlement cost of each batch is the sum of four fees:
On-chain fees and commitment transactions are read directly from a
Bitcoin Core full node via getblock (verbosity 3)
and getrawtransaction.
L2 data comes from the Citrea JSON-RPC at
rpc.mainnet.citrea.xyz:
citrea_syncStatus — current L1 and L2 sync heights.ledger_getSequencerCommitmentsOnSlotByNumber —
sequencer commitments posted at a given L1 block height.eth_getBlockTransactionCountByNumber —
transaction count for each L2 block in a batch.eth_getBlockByNumber —
gas used and gas limit for each L2 block.
Proof-to-batch mappings are fetched from the Citrea Batch Explorer API
at batch-explorer.mainnet.citrea.xyz/proofs, which provides the
Bitcoin txid of each proof and the range of commitment indexes it covers.
The proof transaction is then verified on Bitcoin Core to compute its fee.
Built by YVR BTC Labs.