A young man died suddenly in Colorado this year, leaving his family the burden of sorting out his estate. Little did they know their loved one had been investing in Bitcoin, the digital currency that cost as little as $13 in 2013 and recently climbed as high as $5,000.
The grieving family stood to inherit a small fortune—that is, if they could only find and access the cryptocurrency.
Bitcoins are a virtual form of money protected by unbreakable cryptography. This attribute makes it a secure way to store wealth but also creates the risk that when Bitcoin owners die, their digital fortune will be out of reach forever. That’s a major problem for the relatives of tech-savvy individuals who have invested in a market currently worth about $70 billion.
Bitcoins are stored in a virtual wallet. Each wallet uses a string of random characters called a “public key,” visible to anyone, as an address for sending and receiving the cryptocurrency. A separate “private key” allows the owner access to the wallet’s contents.
If a Bitcoin owner dies without passing on the private key, his heirs may discover his wallet only to realize that they will never gain access to the wealth inside. To prevent this, the owner simply has to ensure that someone gets a copy of the private key by writing it down, storing it on a flash memory drive, or entrusting it with a commercial service that manages them.
But some of these methods come with their own perils. Suzanne Walsh, a wills and estate attorney with Murtha Cullina, says executors and heirs may fail to recognize a private Bitcoin key for what it is and end up discarding it—hence the attraction of a commercial service.
Indeed, that’s the reason why the family of the Colorado man will likely be able to recover his Bitcoins, Walsh says. The family discovered the man invested in Bitcoin upon reviewing his bank account, which revealed debits to Coinbase, a popular wallet and exchange service. With documents in hand, the family approached the San Francisco company, which confirmed the existence of a wallet and is in the process of transferring its contents. (Other exchanges also have policies to transfer virtual currency to next of kin but are reluctant to discuss the issue for fear that fraudsters will use fake death claims to steal customers’ Bitcoins.)
But what if you don’t know about the existence of a deceased person’s Bitcoins?
Get Data Sheet, Fortune’s technology newsletter.
Henry Leibowitz, an attorney at Proskauer, says executors typically use tax filings as a way to locate assets. He likens the Bitcoin situation to a time when people died with stock certificates in shoe boxes—sometimes they would go unnoticed for decades until the corporation that issued them concluded that nobody would redeem them and turned them over to a state government’s unclaimed property division.
Finally, if the Bitcoins are not listed in a will, they are susceptible to what estate lawyers call “probate by truck”—where heirs walk off with property by claiming that “he would have wanted me to have it.” The difference is, instead of a favorite lamp or piece of jewelry, a relative might walk off with the private key to a Bitcoin wallet worth thousands or millions of dollars.
A version of this article appears in the Oct. 1, 2017 issue of Fortune with the headline “Breaking the Bitcoin Bank.”