It's been almost a decade since bitcoin and its underlying blockchain distributed ledger technology were born, planting the seed for the cryptocurrency mania that began in 2017. Blockchain allows for transactions to be recorded without a central trusted authority. Any process that involves many parties and middlemen could potentially be made more efficient. Payments is what bitcoin aims to solve, but that's just one of many possible applications.

Like any exciting technology, the hype is probably out ahead of what blockchain can realistically accomplish. Who could have guessed that there would be a mania around a type of database? But here we are.

A coin with a B on the face, against a background of a chart.

Image source: Getty Images.

How to bet on blockchain

There are two main ways to bet on blockchain. You could buy cryptocurrencies, like bitcoin or Ethereum. The value of bitcoin shot up in 2017 from about $1,000 to over $13,000. Ethereum rocketed from less than $10 to over $700. This strategy certainly worked last year.

But by buying cryptocurrencies, you're not betting on blockchain itself. Instead, you're betting on a specific application of blockchain. For your investment to work out in the long run -- and I use the term investment loosely here because cryptocurrencies have no intrinsic value -- you must be right about blockchain living up to the hype and about cryptocurrency someday becoming useful for anything other than speculation. Blockchain can succeed, becoming a widely used technology in a variety of applications, and these cryptocurrencies could still be worth nothing.

The second way to bet on blockchain is by investing in companies using the technology. You need to tread carefully here. A number of companies in the past few months have goosed their shares by announcing blockchain initiatives or simply changing their names. These so-called "bitcoin stocks," like Riot Blockchain and Xunlei Limited, have ridden the speculative cryptocurrency frenzy to massive gains. One look at the fundamentals, however, should be enough to convince you to stay away.

Investing in a company using blockchain is a better option than buying cryptocurrency, but you need to pick the right company. Blockchain may not turn out to be a transformative technology. It's been nearly 10 years, after all, and there's still not a clear-cut case of blockchain proving to be a dramatically better option than the status quo. If you invest in a company going all-in on blockchain, you're exposing yourself to the risk of near-total loss.

That's why International Business Machines (IBM 0.04%), the century-old technology company, is the safest way to bet on blockchain. If blockchain lives up to the hype, investors benefit from IBM's various blockchain initiatives. If it doesn't, IBM's other bets, like cloud computing and artificial intelligence, can still drive growth, and its various legacy businesses can still produce exceptional profits. You'd be giving up the explosive upside of the other options, but also the ruinous downside.

The leading blockchain company

IBM has worked with over 400 clients to implement blockchain applications. Notable examples include a deal with seven major European banks to build a blockchain-based platform for trade finance, a collaboration with shipping giant Maersk to use blockchain to make the transport and logistics industries more efficient, and a partnership with global food companies including Kroger and Unilever to explore the use of blockchain for tracking the global food supply chain.

At this point, given that many of these efforts are still in their early stages, blockchain is probably not producing a huge amount of revenue for IBM, at least not directly. Speaking to Bloomberg, VP of technology for IBM Blockchain Jerry Cuomo pointed out some indirect benefits: "Our sales team loves blockchain because a customer that is buying blockchain rarely walks out of the store with just blockchain. They walk out with multiple things in their cart."

IBM's vast base of existing customers, which includes 97% of the world's largest banks, 83% of the world's largest communications service providers, and 80% of global retailers, gives the company a key advantage. IBM can leverage these relationships, some decades-long, to sell new technologies like blockchain.

Even if blockchain turns out to be a dud, a footnote in tech history rather than a revolution, IBM has other avenues for growth. The company's cloud business is at a $15.8 billion annual revenue run rate, growing by 25% year over year during the third quarter. IBM's "strategic imperatives," the name the company uses for its growth business, accounted for 45% of total revenue over the past 12 months, growing at a double-digit rate.

On top of that, IBM may be the cheapest blockchain stock available. The company expects to produce at least $13.80 in adjusted earnings for 2017, putting the price-to-earnings ratio barely above 11. The S&P 500, for comparison, trades for nearly 26 times trailing-12-month earnings. And let's not forget about IBM's 3.9% dividend yield and its 22-year history of raising that dividend.

Buying into a mania is a road to ruin. The only safe way to bet on blockchain is to invest in a company that is not entirely dependent on the technology succeeding. IBM fits the bill, exposing investors to some upside if its blockchain business takes off, but little downside if it doesn't. Buying IBM stock won't be as exciting as watching the price of bitcoin careen up and down, but long-term investing isn't supposed to be a thrill ride.