The cryptocurrency boom has created a persistent shortage of high-end graphics cards. That has been a headache for gamers, who have to pay inflated prices for GPUs—if they can find them at all. But it has been a financial windfall to leading graphics card makers Nvidia and AMD.

On Thursday, Nvidia reported soaring profits for the fourth quarter of 2017—a period when rapidly rising prices for Ethereum and other cryptocurrencies was driving a boom in amateur cryptocurrency mining with graphics cards.

"Strong demand in the cryptocurrency market exceeded our expectations," Nvidia chief financial officer Colette Kress said in a call with analysts on Thursday.

Nvidia enjoyed revenue of $2.9 billion in the fourth quarter, which ended on January 28. That's a 10 percent increase over Nvidia's revenue in the third quarter. Nvidia's net income rose 33 percent to a record $1.1 billion.

Nvidia's products are popular in a wide range of markets, from driverless cars to data centers. So it would be a mistake to attribute all of these gains to the cryptocurrency boom. But in the Thursday call, Kress mentioned cryptocurrency miners as a significant source of demand and said that mining-related revenue has been on the rise.

In the same conference call, Nvidia CEO Jensen Huang acknowledged that gamers were suffering from GPU shortages. "We typically have between six to eight weeks of inventory in the channel," Huang said. "Globally right now the channel is relatively lean."

This, of course, is an epic understatement. As we reported last month, electronics retailers around the world had bare shelves where there should have been high-end graphics cards for sale. Shortages became so severe that used GPUs were being resold for hundreds of dollars above their suggested retail price.

"We're working really hard to get GPUs out into the marketplace for the gamers," Huang said.

AMD is making big profits, too

Nvidia's graphics card rival AMD is in a similar situation. The company reported its own financial results on January 30. Like Nvidia, AMD enjoyed surging revenues and profits last quarter, driven in part by miners snapping up graphics cards.

"We delivered our second straight quarter of record GPU revenue, with significantly improved average selling price and increased unit sales from a year ago," said AMD CEO Lisa Su in an investor call following the earnings release. She said that gaming and cryptocurrency mining both contributed to this strong demand.

Cryptocurrency mining is boosting the profits of graphics card makers, but both Nvidia and AMD are wary of becoming too dependent on demand from cryptocurrency miners.

"Our main focus remains on the core gaming market, as cryptocurrency trends will likely remain volatile," Kress said on Thursday.

If cryptocurrency values crash (and they're already down significantly in recent weeks ) then the graphics card shortage of recent months could rapidly become a graphics card glut. Not only would cryptocurrency-related demand dry up, but Nvidia could find its new cards competing with thousands of cheap and powerful used cards being unloaded by miners who can no longer turn a profit from mining.

So while Nvidia and AMD have been happy to see their products fly off the shelves in recent months, they've been reluctant to make big investments in manufacturing capacity to meet that surging demand. As a result, the graphics card shortage has dragged on for months—and it might drag on for months to come.