Shares of GrubHub (NYSE:GRUB), the top food delivery service provider in America, rallied nearly 140% over the past 12 months as it repeatedly crushed analyst estimates with double-digit sales and earnings growth.

The stock often seemed too hot to handle. At $130, it trades at the time of this writing at nearly 70 times this year's earnings and 55 times next year's earnings. Despite the valuation, I recently started a small position in GrubHub for five simple reasons.

GrubHub's mobile app.

Image source: GrubHub.

1. It dominates the market

In the past, the bears often claimed that rival delivery services from Uber, DoorDash, Postmates, Square (NYSE: SQ), and Amazon (NASDAQ: AMZN) would throttle Grubhub's growth. However, research firm Second Measure claims that GrubHub still controls 50% of the U.S. food delivery market (as of March 2018).

Uber Eats ranks a distant second with a 21% share, followed by DoorDash with 15%, Postmates with 9% share, Caviar with 4%, and Amazon with just 1%. GrubHub dominates the food delivery market for two simple reasons: It has a first-mover's advantage, and it has gobbled up competing platforms -- like Eat24, MenuPages, Allmenus, DiningIn, and Delivered Dish -- over the past few years.

The U.S. online food delivery market is expected to grow from $20.2 billion this year to $29.3 billion in 2022, according to information gathered by Statista's. If GrubHub maintains its lead in this market and keeps consuming its smaller rivals, it could have plenty of room to grow.

2. An expanding ecosystem

In addition to scaling up, GrubHub is expanding its digital ecosystem to lock in more customers and cross-sell more services. That's why it recently acquired LevelUp, a Boston-based payments and loyalty services provider, for $390 million in cash.

GrubHub will integrate LevelUp's platform into its restaurants' point of sale (POS) systems. That move will help GrubHub tighten its grip on restaurants by bundling payment services and loyalty plans into its delivery services, which could make it a "one-stop shop" for adding digital and delivery options to traditional restaurants.

This strategy could help it counter Square's "Square for Restaurants," which merges the company's booking, payments, and Caviar deliveries onto a single platform. It could also prevent aggressive new challengers like Amazon from luring away its restaurants.

3. Solid sales growth

GrubHub gauges its growth with three core metrics: daily average grubs (orders), gross food sales, and active diners. All three metrics, along with its revenue growth, have been surging year over year, partly thanks to its acquisition of Yelp's (NYSE: YELP) Eat24 last October.

Metric

Q3 2017

Q4 2017

Q1 2018

Q2 2018

Daily average grubs

14%

34%

35%

35%

Gross food sales

18%

39%

39%

39%

Active diners

28%

77%

72%

70%

Revenue

32%

49%

49%

51%

YOY growth. Data source: GrubHub quarterly reports.

Analysts expect that momentum to continue, with 44% sales growth this year and 27% sales growth next year.

4. Robust earnings growth

Unlike many other high-growth tech companies, GrubHub also has a solid track record of bottom-line growth. Once again, the Yelp acquisition slightly distorts the year-over-year comparisons, but its non-GAAP (adjusted) numbers show a clear trend of accelerating earnings growth.

Metric

Q3 2017

Q4 2017

Q1 2018

Q2 2018

GAAP net income

(1%)

293%

74%

104%

Non-GAAP net income

23%

68%

88%

99%

Adjusted EBITDA

21%

45%

51%

61%

YOY change. Data source: GrubHub quarterly reports.

Wall Street expects GrubHub's non-GAAP earnings to rise 59% this year and another 25% next year.

5. Buyout potential

GrubHub's P/E ratios look high, but I think those multiples are justified by its leading position in food deliveries and its double-digit growth rates. Moreover, GrubHub's enterprise value of $11 billion makes it a potential takeover target for bigger tech companies that want to dominate the food delivery space.

A dinner tray icon on a smartphone.

Image source: Getty Images.

Amazon is often named as a potential suitor, since the e-commerce giant remains an underdog in food deliveries, and the integration of Whole Foods' groceries into GrubHub could be game-changing. I'd never buy a stock based on buyout buzz alone, but I wouldn't be surprised to see Amazon or another tech giant make a bid.

The bottom line

GrubHub isn't a stock for queasy investors, but I think it has room to run. It could certainly drop much lower during a market downturn, but I'm willing to buy more shares if that happens.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Leo Sun owns shares of Amazon, Grubhub, and Square. The Motley Fool owns shares of and recommends Amazon and Square. The Motley Fool has the following options: short September 2018 $80 calls on Square. The Motley Fool recommends Yelp. The Motley Fool has a disclosure policy.