As Bitcoin rises in value, crypto stocks become more attractive investments along the way, benefiting from the rising popularity of cryptocurrency as a whole. But while there has been growth in the past for these types of stocks, they generally have struggled with profitability.

Two stocks, however, have been showing some significant progress on that front. Marathon Digital (MARA 2.21%) and Coinbase Global (COIN 5.68%) posted strong results lately, which featured not just strong growth but profitable operations as well. Are these safe crypto investments to add to your portfolio?

1. Marathon Digital

Marathon Digital is a leading crypto mining company that benefits directly from a higher price of Bitcoin. On Feb. 28, the company reported strong fourth-quarter results for the last three months of 2023, with revenue of $156.8 million up 452% year over year.

It was a record quarter for the company as Marathon produced 4,242 bitcoins, which is more than all that it generated in 2022. And Marathon continues to focus on higher production as it works on improving its hash rate and overall mining capacity.

Along with the stronger top-line results, Marathon also turned in a strong profit of $151.8 million, which was 97% of its revenue. A year ago, it incurred a net loss of $391.6 million.

The key reason for the improvement, however, was that it got a big boost from gains on digital assets, with those gains contributing $213.6 million, higher than revenue. A year earlier, the company didn't generate any gains, and it incurred impairment losses totaling $376 million.

Marathon Digital did have an improved quarter, but the stronger bottom line is a bit misleading and might not be sustainable. The company's cost of revenue during the period was $146.1 million (93% of revenue) and without that taking up a much smaller slice of the top line, it'll be difficult for the company to be able to stay profitable on a consistent basis.

As long as the price of Bitcoin continues rising, Marathon could be able to generate profit results. But investors shouldn't assume that to be a given since the cryptocurrency has proved to be very volatile in the past.

Although Marathon's stock is up 340% over the past 12 months, this is still too risky a stock for most investors to consider for their portfolios.

2. Coinbase Global

Coinbase Global operates a top cryptocurrency trading platform, so it can potentially be a safer investment than a mining company such as Marathon Digital, where the price of Bitcoin has a more direct impact on its business. With Coinbase, there just needs to be a greater level of interest and excitement in crypto.

Last year was a strong one for Coinbase as it entered new markets to grow its user base, and this included the launch of the Coinbase International Exchange. The company finished off the year strong, with fourth-quarter revenue totaling $953.8 million for the three-month period ending Dec. 31. That was 52% higher than the $629.1 million that Coinbase reported in the prior-year period. Net income of $273.4 million was also a big improvement from the $557 million loss it incurred a year earlier.

Asset impairment charges hurt the company's financials a year ago and had the reverse effect this past quarter, but large gains didn't propel Coinbase into profitability the way they did for Marathon Digital. The exchange has made improvements in its cost structure, bringing down technology and development spending along with general and administrative expenses, which helped improve the bottom line.

Shares of Coinbase are up 380% in the past 12 months since it has also benefited from greater bullishness in the crypto world. The company is in a good position to potentially remain profitable given its improved financials.

Since it's tied to crypto, there's always going to be a good amount of risk involved with this investment. Coinbase can, however, be one of the safer crypto investments you can hold in your portfolio. And so if you're bullish on crypto, this can make for a good growth stock.