Many companies seem to use off chain transactions to transfer bitcoins between their own customers. What happens when a side chain gains dominance and no longer contains a block with the underlying transaction?
Let me explain my question with an example:
- Customers A and B have Coinbase wallets.
- Customer A receives 10 bitcoins from Block 1 into his wallet.
- He instantly transfers 5 bitcoins to B's wallet using an off chain transaction.
- B spends 1 bitcoin using and on chain transaction and that is included in Block 2.
This is displayed again below:
Block 1 -> A -> Off Chain -> B -> Block 2 10 BTC 5 BTC 1 BTC
Now suppose Block 1 and 2 now become invalidated due to a reorg of the blockchain and the initial 10 BTC transaction in Block 1 never makes it into a block again. However, the 1 BTC transaction from Block 2 does make it back into another block.
This could potentially corrupt an off chain system like Coinbase because it would end up not having the initial 10 BTC from Block 1 but customer A has still managed to give 5 BTC to customer B who has managed to send 1 BTC back to the blockchain.
In this example the off chain wallet company eg Coinbase, BitPay, Circle etc will potentially lose 10 BTC because it has already been allocated within their systems.
How do these companies resolve this issue and unravel their systems?
Do they detect that Block 1 no longer exists and then reverse the transaction to A and B's wallet? Or do they use other means? Maybe they just take the hit and lose the 10 BTC from their profits?