<p>Coins don't really move "off-chain", in the described case you would send money to an address at Coinbase that is associated with your friend's account. As Coinbase manages their customers' accounts for them, he would see on his account page that his balance increased, but he wouldn't be in control of the private key associated with the address.</p>

<p>Now to "move coins off-chain", means that only the accounted values were updated, while no coins actually moved on the blockchain. Just as if a bank is wiring money from one of their own customers to another own customer, they wouldn't take the money from the vault then put it back, no they would just update the two accounts involved.</p>

<p>In the case of Coinbase it would work like this:</p>

<p>1) Coinbase internal accounting:<br>
rageofreason: 1BTC<br>
friend: 0.5BTC  </p>

<p>2) rageofreason sends friend 0.4BTC</p>

<p>3) Coinbase internal accounting:<br>
rageofreason: 0.6BTC<br>
friend: 0.9BTC</p>

<p>They just update the accounts, no actual bitcoins were moved. Now, when friend closes his Coinbase account he will want them to send the 0.9BTC to an address directly under his control. That moment, bitcoins will move on the chain, as they actually need to be moved to that address instead of just updating balances in the internal accounting of Coinbase.</p>

CC BY-SA 3.0
2014-12-08T19:43:41.157Z
2014-12-08T19:43:41.157Z
Murch
<blockquote>
  <p>Do I first need to transfer some BTC to a public bitcoin address owned by the wallet provider?</p>
</blockquote>

<p>Yes.</p>

<blockquote>
  <p>Is it simply that (assuming I'm correct above) the wallet provider knows my balance off-chain and will make a transfer to my address on-chain?</p>
</blockquote>

<p>Yes.</p>

<blockquote>
  <p>I've searched in vain, but not been able to find a detailed explanation of how off-chain transactions work.</p>
</blockquote>

<p>That's because there are multiple ways of doing it. The simplest way of doing this is to run a service that keeps a database of users, and records how much Bitcoin each one has. From the point of view of the blockchain, there's one big pile of Bitcoins, and only the service needs to keep track of whose Bitcoins are whose.</p>

<p>Another way of doing it is track who owns which Bitcoins with a distributed database, like Open Transactions or Ripple. This lessens the demand on you to keep the database secure and backed up, but is more complicated.</p>

CC BY-SA 3.0
2014-12-08T19:47:08.813Z
2014-12-08T19:47:08.813Z
Nick ODell
<p>I've searched in vain, but not been able to find a <em>detailed</em> explanation of how off-chain transactions work.</p>

<ol>
<li><p>If I have some BTC on the public blockchain and I want to transfer some of it to someone's wallet off-chain (e.g. we're both using Coinbase) what actually happens? Do I first need to transfer some BTC to a public bitcoin address owned by the wallet provider? This would be akin to Ripple's gateway model I think. If I didn't do this I could double spend (1 tx off-chain and another on-chain), right?</p></li>
<li><p>How do I get back on-chain? Is it simply that (assuming I'm correct above) the wallet provider knows my balance off-chain and will make a transfer to my address on-chain? </p></li>
</ol>

<off-chain>
How do off-chain transactions get back on-chain?
rageofreason
# How do off-chain transactions get back on-chain?

(Asked by: username_0 on 2014-12-08)

I've searched in vain, but not been able to find a *detailed* explanation of how off-chain transactions work.

1. If I have some BTC on the public blockchain and I want to transfer some of it to someone's wallet off-chain (e.g. we're both using Coinbase) what actually happens? Do I first need to transfer some BTC to a public bitcoin address owned by the wallet provider? This would be akin to Ripple's gateway model I think. If I didn't do this I could double spend (1 tx off-chain and another on-chain), right?
2. How do I get back on-chain? Is it simply that (assuming I'm correct above) the wallet provider knows my balance off-chain and will make a transfer to my address on-chain?

**Tags:** off-chain


---

## 2 answers

### Answer by username_1 on 2014-12-08. Score: 6

Coins don't really move "off-chain", in the described case you would send money to an address at Coinbase that is associated with your friend's account. As Coinbase manages their customers' accounts for them, he would see on his account page that his balance increased, but he wouldn't be in control of the private key associated with the address.

Now to "move coins off-chain", means that only the accounted values were updated, while no coins actually moved on the blockchain. Just as if a bank is wiring money from one of their own customers to another own customer, they wouldn't take the money from the vault then put it back, no they would just update the two accounts involved.

In the case of Coinbase it would work like this:

1) Coinbase internal accounting:  
username_0: 1BTC  
friend: 0.5BTC

2) username_0 sends friend 0.4BTC

3) Coinbase internal accounting:  
username_0: 0.6BTC  
friend: 0.9BTC

They just update the accounts, no actual bitcoins were moved. Now, when friend closes his Coinbase account he will want them to send the 0.9BTC to an address directly under his control. That moment, bitcoins will move on the chain, as they actually need to be moved to that address instead of just updating balances in the internal accounting of Coinbase.


---

### Answer by username_2 on 2014-12-08. Score: 3

> Do I first need to transfer some BTC to a public bitcoin address owned by the wallet provider?

Yes.

> Is it simply that (assuming I'm correct above) the wallet provider knows my balance off-chain and will make a transfer to my address on-chain?

Yes.

> I've searched in vain, but not been able to find a detailed explanation of how off-chain transactions work.

That's because there are multiple ways of doing it. The simplest way of doing this is to run a service that keeps a database of users, and records how much Bitcoin each one has. From the point of view of the blockchain, there's one big pile of Bitcoins, and only the service needs to keep track of whose Bitcoins are whose.

Another way of doing it is track who owns which Bitcoins with a distributed database, like Open Transactions or Ripple. This lessens the demand on you to keep the database secure and backed up, but is more complicated.


---

