Drivechain ObservatoryConnecting…Waiting for data.
  1. 1What is a drivechain?
  2. 2Blocks: the heartbeat
  3. 3Slots and sidechains
  4. 4Creating a sidechain
  5. 5Deposits and the treasury
  6. 6Withdrawals by miner vote
  7. 7Blind merged mining
  8. 8How we know
Concept 6 of 8

Withdrawals by miner vote

Moving coins out is slow on purpose: a long, public miner vote.

6 min read

Withdrawals travel in bundles

To move coins back to L1, sidechain users request withdrawals on the sidechain. The sidechain periodically combines many requests into one withdrawal bundleWithdrawal bundleMany withdrawals from one sidechain combined into one L1 transaction. It pays everyone or no one.: a single L1 transaction that pays everyone. A bundle pays all of its withdrawals or none of them.

Propose (M3), then vote (M4)

A miner puts the bundle up for a vote with an M3M3 · Propose bundleA coinbase message that puts a withdrawal bundle up for a vote. It counts as the first vote. message. Miners vote on its M6 idM6 idThe identifier miners vote on for a bundle: the id of a "blinded" copy of the withdrawal transaction without its treasury input, which usually does not exist yet when voting starts. This site shows it in the byte order of the M3 coinbase message, like the enforcer and mining pools; written as a transaction id, its bytes are reversed., an identifier of the payout transaction, not on the transaction itself. Being proposed counts as its first vote.

From then on, each block may carry an M4M4 · ACK bundlesA coinbase message with each block's withdrawal votes: upvote one bundle per sidechain, abstain, or raise an alarm. message with the miner's vote for every sidechain that has bundles pending. For each one, the miner can:

  • Upvote one bundle. It gains a vote; the sidechain's other pending bundles each lose one.
  • Abstain. Nothing changes. A block without an M4 counts as abstaining.
  • Raise an alarm. Every pending bundle of that sidechain loses a vote.

Votes never drop below zero.

Votes accumulating block by blockEach new block can add a vote. The proposal passes only if its votes go above the threshold before it gets too old.thresholdproposedtoo oldtime, measured in L1 blocks →

Pay out (M6), or expire

Once a bundle has more votes than the threshold, the payout transaction (M6M6 · WithdrawThe L1 transaction that pays out an approved bundle and returns the rest of the coins to a new treasury output.) can be included in a block. It spends the treasury, pays the withdrawals, and returns the rest to a new treasury output. A bundle that grows too old without passing is dropped and pays nothing.

It is a public countdown. Everyone can watch the votes for thousands of blocks before a single coin leaves, so a dishonest withdrawal would have to happen in the open, where anyone can see it coming.

What protects the coins in a treasury

L1 checks the vote count and nothing else. It cannot see the sidechain, so it cannot tell whether a bundle pays the people who own those coins on L2. If miners keep voting for a bundle that pays the wrong people, and it gets enough votes in time, L1 pays it out.

What the design offers instead is time and visibility: a theft needs a majority of hashrate voting for it, block after block, for thousands of blocks, in public. Every one of those blocks is a chance for other miners to vote against it and for everyone else to react. That is the security assumption of BIP300, and its text says so: sidechains "are already vulnerable to one catastrophe per 13150 blocks (the invalid withdrawal)".

So keep two things apart. L1's consensus is isolated from sidechains: a broken sidechain cannot break L1. The coins deposited into a sidechain are not isolated in the same way: they are as safe as miners' votes on its withdrawals are honest.

Check yourself

Block after block, most miners vote for a bundle that pays coins to people who never owned them on the sidechain. It passes the threshold in time. What does L1 do?

Live on eCash

The rules eCash is running

UnknownThis value is missing, conflicting, or was read while the chain moved. Nothing is guessed to fill the gap.

Loading live data…

Live on eCash

Withdrawals being voted on

Loading live data…

Live on eCash

Withdrawal history

Loading activity…

Go deeper: how the M6 id hides the treasury input

When voting starts, the treasury output the payout will spend usually does not exist yet: more deposits may replace it. So the M6 id is computed from a "blinded" copy of the transaction with no inputs, and with the treasury output replaced by an output that records the total fee. The real payout must match it.

Each M4 can be encoded in several compact versions, such as "repeat the previous block's votes". The enforcer decodes them all to the same upvote, abstain and alarm choices.

Check yourself

A sidechain has two pending bundles, A and B. In this block the miner upvotes A. What happens to B?

Read the source

The rules in this lesson come from these documents and code:

Ask an AI assistant about this concept

Opens your assistant with a question about this concept and its sources already written. AI answers can be wrong: check them against the sources above. Your question goes to the assistant you choose, not to us.