Consensus Mechanism

IBVM employs a hybrid consensus mechanism combining elements of Proof-of-Stake for the sequencer selection and anchoring to Bitcoin's Proof-of-Work for security.

Sequencer Selection

Sequencers are selected through a weighted random process based on stake:

  1. Sequencer candidates stake BTC in a special contract

  2. Selection probability is proportional to stake amount

  3. A verifiable random function (VRF) determines selection: $P(select_i) = \frac{Stake_i}{\sum_{j=1}^{n} Stake_j}$

  4. Selected sequencers have exclusive rights to produce blocks for a set period

Sequencer Responsibilities

Each selected sequencer:

  1. Collects transactions from the mempool

  2. Orders transactions based on gas price

  3. Executes transactions and updates the state

  4. Generates batch commitment and ZK proof

  5. Publishes commitment to Bitcoin blockchain

Fault Detection and Slashing

To maintain honest behavior:

  1. Sequencers' stakes are locked in a slashing contract

  2. Invalid state transitions can be challenged during the challenge period

  3. If a fraud proof is successful, the sequencer loses part of their stake: $Slash_{amount} = min(Stake_i, S_{base} + S_{proportional} \times TxValue)$ Where:

    1. $S_{base}$ is the base slashing amount

    2. $S_{proportional}$ is the proportional factor

    3. $TxValue$ is the economic value of affected transactions

Chain Reorganization Handling

In case of Bitcoin chain reorganizations:

  1. Monitor the Bitcoin chain for reorganizations

  2. If a reorganization affects IBVM commitments:

    1. Revert to the last valid state

    2. Reapply subsequent valid batches

    3. Update the IBVM state accordingly

The mathematical condition for reorganization: $Height(Block_{commitment}) > Height(Block_{fork})$

Last updated