As an online retailer, Overstock is in bad shape. It keeps losing money, and its sales growth is far behind Amazon.

But the company doesn't think that matters. Overstock is going all in on blockchain and cryptocurrencies.

Shares of Overstock (OSTK) surged more than 15% on Friday after the company announced an investment of almost $375 million from GSR Capital, a Hong Kong private equity firm.

Overstock wants to be more than just an also-ran in online retail. To jump-start growth, it is investing heavily in blockchain technology, the digital ledger that keeps records of transactions in virtual currencies.

The company has a cryptocurrency unit called tZERO as well as a subsidiary named Medici Ventures that invests in blockchain companies.

Riding the bitcoin wave

The dramatic rise in the price of bitcoin and other cryptocurrencies is a big reason Overstock is pushing forward with blockchain deals and de-emphasizing the retail business.

But that's not without risk. Shares of Overstock have been riding the bitcoin (XBT) wave for the past year. The stock has soared more than 130% over the past 12 months, but it has plunged nearly 30% in 2018.

Regulatory scrutiny is a concern, too. Overstock disclosed in March that the Securities and Exchange Commission is "conducting an investigation" into its plans to launch an initial coin offering, or ICO, for tZERO. Overstock said that it is cooperating with the SEC.

Still, the endorsement from GSR for Overstock's cryptobusiness is a big win. Specifically, GSR will invest $270 million in tZERO. The rest will be in shares of Overstock.

GSR also plans to buy $30 million in tZERO security tokens, a form of crypto investments backed by partial ownership of other assets such as stock and bonds.

Overstock said that the GSR deal values tZERO, which is 80% owned by Medici Ventures, at $1.5 billion. That's a little bit higher than Overstock's current market valuation.

GSR Capital said it was eager to work with tZERO to expand blockchain-enabled asset trading, including stocks, bonds and commodities.

Bullish on blockchain

In a letter to shareholders, Overstock CEO Patrick Byrne acknowledged that "recently an investor lamented to me that Overstock is among the most difficult-to-value stocks on Wall Street."

Byrne called that "regrettable" but stressed that the crypto-related units could justify a higher price. He wrote that it is "becoming increasingly important to elucidate the different parts of our business and their potential value."

Byrne also hinted in the shareholder letter that Overstock will start to spend less on its retail unit as a way to stem the company's overall losses.

"Given the rapidly growing value of our non-retail assets, we think shareholders are better served now by a cash-conservative strategy. I believe Overstock can focus on developing more non-traditional means of growth and profitability," he said.

Byrne added that the company is still looking for a possible buyer of the retail business, and that "discussions with potential buyers have progressed."

So it makes strategic sense for Overstock to move more heavily into crypto.

Tom Forte, an analyst with D.A. Davidson, thinks that its blockchain business should account for nearly 60% of the company's overall value. He has a buy rating on Overstock and raised his price target Friday to $112 a share Friday. That's nearly 150% higher than the current price.

Even as Overstock faces issues regarding its blockchain business and lackluster returns from online retail, the company is looking to expand into yet another market — real estate.

The company announced last month it was relaunching Houserie, a real estate property management site it bought in February.

The site will be geared toward landlords with services like background checks for potential tenants and rent payment management. Overstock said Houserie will become part of a broader O Real Estate platform that will launch in September and include more information for renting, buying and managing properties.