You lose them.
In bankruptcy, we list all of your assets and then exempt (protect) them. Most assets, like $3,000 of equity in your car, or 100% of your 401k, or all of your clothing on your back are protected under state or federal bankruptcy exemptions. However, some assets are not protected.
For example, here in Utah, you can protect 3 firearms. So if your have 4 shotguns, then one of them is not protected, and there is a chance that the bankruptcy trustee will want to liquidate it (sell it) and use the proceeds to pay your creditors.
Bitcoins are a kind of investment, but not one protected under our exemptions. So let’s say that you bought 3 bitcoins a couple of years back for $1,000. Now they’re just sitting in your bitcoin wallet somewhere in the internet ether. When we list your assets prior to filing bankruptcy, we will have to list those at their current fair market value. As of today, it looks like bitcoins are selling for about $7,000 u.s.d. (See https://www.coindesk.com/price/ ). In other words, your internet bitcoins could sell today for 3 x 7,000 = $21,000.
When we file bankruptcy, the bk trustee will most likely ask you to liquidate those, give him the proceeds, and he’ll use them to pay off your creditors. Now that’s in a chapter 7. If you file a chapter 13, the bk trustee won’t make you sell them, but he’ll demand that you pay at least $21,000 back to your unsecured creditors over a 5 year chapter 13 plan.
Either way, you lost the value of those bitcoins to your creditors.
You might think that there is no way for the bk trustee to track your bitcoin ownership, and you may be right. However, the truth has a funny way of coming out. Angry exes will always pop up at the wrong time. The bk trustee may be looking at your bank statements and ask you what that $100 transaction was at www.coinbase.com last month when you decided to dabble in ethereum and litecoins. There is always an electronic or paper trail. Besides, you really should be honest because it’s just not worth the fraud charges and denial of your bk discharge.
So in essence, if your bitcoins have any value on the date of filing your bankruptcy, then you will probably lose them.