You might not have noticed, but shares of online auction pioneer eBay (EBAY 1.32%) have sneakily trounced the Nasdaq Composite over the past three years.

In fact, eBay stock has soared an impressive 66% over this time period, versus a 40% gain by its benchmark index.

EBAY Chart

EBAY data by YCharts

Though that's an impressive performance, eBay probably doesn't offer investors the most upside among companies in the e-commerce space today. That's why this article will explore what makes MercadoLibre (MELI 3.09%) and Alibaba (BABA 0.59%) better potential investments.

MercadoLibre

Many investors will be unfamiliar with MercadoLibre, but it has been a Fool favorite for years.

The company operates an online auction and pure-play e-commerce platform that dominates its space over much of Latin America. Founded in 1999,  the company gained a powerful first-mover advantage throughout the region, which was at the time largely shunned by the likes of eBay and Amazon.com (AMZN 3.43%). It leveraged that advantage to build itself a lead that should allow it to continue to capture an ever-greater share of the region's significant long-term e-commerce growth potential.

More specifically, the company expects regional e-commerce sales nearly double from $49.8 billion last year to $79.8 billion by 2019 . Better still, even this 2019 projection is minuscule relative to the region's total annual retail sales of $1.8 trillion in 2015. Based on those figures, MercadoLibre has plenty of room for sales expansion that will drive continued shareholder returns for years to come.

Of course, this isn't to say MercadoLibre shares don't come with their fair share of risks as well. The regional politics and economies of Latin America often prove more volatile than those in developed countries. For example,  political turmoil and currency devaluations in Venezuela cost the company dearly in 2015,  and the recent economic upheaval in Brazil also created headwind through which the company has adeptly navigated. However, it remains a truly incredible growth stock, one whose long-term potential vastly exceeds that of eBay today.

A lady shops online, suggestive of the kind of growing e-commerce platforms operated by Mercadolibre and Alibaba.

Image Source: Getty Images

Alibaba

Like MercadoLibre, Alibaba stock has been on a tear of late. After struggling out of the gate after its highly publicized IPO, the Chinese e-commerce behemoth's impressive 86% gain over the past 12 months has its shares trading at new all-time highs.

BABA Chart

BABA data by YCharts

Alibaba is often compared to Amazon, but its business model actually more closely resembles that of eBay. It operates primarily as an online commerce platform, rather than as an online retailer. This important distinction means that Alibaba generates its revenues from fees it charges for use of its platform, rather than the markups it charges from selling products like most retailers.

This fee-based business model give Alibaba far higher gross margins than Amazon. For example, Alibaba's gross margin over the past 12 months stands at 62%, versus 35% for Amazon.  Better still -- and much like Amazon -- Alibaba is truly just beginning to realize its truly massive potential, both domestically and internationally.

According to research from eMarketer, total retail sales in China are estimated to grow from $4.8 trillion in 2016 to $7 trillion in 2020. For context, Alibaba's gross merchandise volume (GMV) -- a popular measure of the total dollar value of goods sold over a platform or service -- reached $547 billion in its fiscal 2016.  Equally important, Alibaba is starting to push beyond the Chinese market. The company generated just 10% of its sales from international markets in its most recently reported quarter.

Currently, consensus estimates call for Alibaba to increase its sales by 45.9% this year and 32.4% in 2018.  However, given the magnitude of its overall market opportunity, it doesn't seem unreasonable to expect Alibaba to be able to grow its revenues at above average rates for years to come.

The company's shares might appear unpalatably expensive, trading at 60-times their trailing 12-month EPS . Thankfully, the company continues to benefit from the scalability of in its business model, which should allow profit growth to outpace sales growth. Because of this, Alibaba's forward P/E of just 25 times 2018 earnings  better reflects the company's long-term opportunity. Due to its massive growth potential, Alibaba appears to be one of the more attractive stories in the e-commerce today.