Four months ago, Grubhub (GRUB) agreed to an all-stock merger with its European peer Just Eat Takeaway (JTKWY 4.85%), which had recently been formed by a merger between two other food delivery platforms, Just Eat in the U.K. and Takeaway in the Netherlands.

At the time, I noted the merger could solve Grubhub's biggest problems: its dependence on the saturated U.S. market, its decelerating growth, and its rising expenses. I also told investors to hold on to their shares of Grubhub instead of selling the stock, since the deal pegged Grubhub's stock to Just Eat Takeaway's.

Grubhub's stock has rallied over 40% since the deal was announced, and I believe it still has room to run before Just Eat Takeaway closes the deal.

A deliveryman checks his smartphone.

Image source: Getty Images.

What were the terms of the deal?

The upcoming merger will be an all-stock deal in which each Grubhub share will be traded for 0.671 shares of Just Eat Takeaway. When the deal was announced, it valued Grubhub at $75.15 per share, based on Just Eat's previous closing price of 98.60 euros.

Just Eat's stock initially dipped after the announcement, but it rebounded and closed at 108.85 euros on Oct. 19. The euro also slightly rose against the dollar over the past four months. As a result, Just Eat's offer now values Grubhub at $86.17 per share.

The merger is expected to close in the first quarter of 2021, and Grubhub investors will own 30% of the new company. Until that happens, Grubhub's stock will likely trade in tandem with Just Eat Takeaway's stock.

Why did Just Eat Takeaway's stock rally?

Just Eat Takeaway's revenue surged 44% year over year to 1 billion euros ($1.2 billion) in the first half of 2020. Much of that growth was attributed to restaurant closures and stay-at-home measures during the pandemic.

Its orders rose 32% to 257 million, more than doubling in Germany and rising at double-digit rates across the UK, Canada, the Netherlands, and the rest of the world. Its average order value grew 8% to 22.20 euros ($26.21).

The company remains unprofitable, but its adjusted EBITDA rose 133% to 177 million euros ($209 million) as it dialed back its discounts and vouchers in competitive markets like the UK.

In its latest trading update, which didn't reveal any revenue or EBITDA figures, Just Eat said its third-quarter orders rose 46% year over year -- accelerating its year-to-date order growth rate to 37%. That growth was led by a significant acceleration in its orders in Canada, which nearly doubled year over year during the third quarter.

Once again, the ongoing COVID-19 pandemic lit a fire under Just Eat's business, and its recent resurgence across Europe indicates its orders will continue rising for the foreseeable future.

How will Grubhub complement Just Eat Takeaway's growth?

Grubhub's revenue rose 27% year-over-year to $822 million in the first half of 2020. At the end of the second quarter, its number of active diners rose 35% to 27.5 million, its daily average grubs (orders) grew 32%, and its gross food sales surged 59% to $2.3 billion.

Grubhub's mobile app.

Image source: Grubhub.

Like Just Eat, Grubhub's top-line growth was buoyed by restaurant closures and stay-at-home measures. But its adjusted EBITDA plunged 68% to $34.3 million as it spent more money on safety measures and offered discounts to fend off DoorDash and Uber (UBER -0.89%) Eats.

Just Eat plans to merge Grubhub with its rapidly growing Canadian business. The merger could significantly reduce Grubhub's expenses by eliminating redundancies, increasing its scale, and boosting its pricing power.

Just Eat could also help Grubhub undercut DoorDash and Uber Eats by subsidizing its growth with its European operations, or amplify Grubhub's recent partnership with Lyft (LYFT -3.47%) with fresh marketing campaigns.

Combining Just Eat Takeaway and Grubhub will create the world's largest online food delivery platform outside of China. That scale could make the new company a compelling investment for growth-oriented investors.

The road ahead

On its own, Grubhub was a poor investment. However, Just Eat Takeaway's growth indicates the food delivery business model can work after economies of scale kick in, and merging with Grubhub will create the industry's first multinational powerhouse. Therefore, I believe Grubhub's stock could still climb higher before Just Eat Takeaway seals the deal and swaps its shares with U.S. investors.