MercadoLibre (MELI 3.09%) and Amazon (AMZN 3.43%) are two of the best-performing stocks of the last decade.

Both have benefited from strong tailwinds in e-commerce to dominate their respective geographies. For MercadoLibre that's Latin America, and for Amazon its North America and Europe. The chart below shows how the two stocks have performed over the last decade.

MELI Chart

MELI data by YCharts

As you can see, both stocks have trounced the S&P 500 since 2014. They've beaten the market by an even wider margin over their complete histories.

MercadoLibre and Amazon have found success on the stock market by following similar playbooks.

A woman shopping online.

Image source: Getty Images.

How MercadoLibre is like Amazon

MercadoLibre was founded in 1999, just a few years after Amazon, and founder Marcos Galperin saw an opportunity for e-commerce in Latin America. Galperin was particularly impressed by eBay, which was an important early competitor to Amazon in e-commerce at the time, and believed there was an opening for a similar company south of the U.S.

Like Amazon, MercadoLibre grew quickly from the start, gaining 15,000 users in its first three months, which came during the peak of the dot-com boom.

A key acquisition of a company owned by eBay in 2001 gave MercadoLibre a boost. As part of the deal, eBay took a stake in the budding Latin American e-commerce company. It also agreed to share best practices with MercadoLibre, as well as vowing not to compete in Latin America itself for five years.

Amazon rapidly expanded from a direct online retailer by adding a third-party marketplace and expanded into new product categories. MercadoLibre made a similar move that changed the trajectory of the business.

The company added Mercado Pago, its fintech solution, in 2003, seeing a need among Latin America's large unbanked population. Mercado Pago reached $90 million in gross merchandise volume, or 8% of its total, in 2006, and the Latin American company began to layer more products onto its e-commerce business.

Unlike Amazon, MercadoLibre started as a third-party marketplace and later added its first-party e-commerce business. However, each company recognized the advantage of owning its own logistics and delivery service, which was called Mercado Envios at MercadoLibre. That move has given both companies a competitive advantage, lowering delivery costs and improving delivery speeds.

The Latin American company even has a loyalty program called Meli+ that's similar to Amazon Prime, and MercadoLibre has also launched advertising, a business that is now driving more than $40 billion in revenue annually at Amazon.

One key difference

Though Amazon might be best known for its e-commerce business, most of the company's profit comes from its cloud computing business, Amazon Web Services, and MercadoLibre is unlikely to get into cloud infrastructure.

However, MercadoLibre doesn't need to do that, as the company is successfully ramping up profit margins and seeing strong revenue growth from its e-commerce and fintech businesses. Similarly, Amazon lacks the kind of juggernaut fintech business that Mercado Pago has become for MercadoLibre.

Why MercadoLibre can be the next Amazon

No other company has succeeded with the Amazon playbook more than MercadoLibre, as the combination of interconnected e-commerce-related businesses creates barriers to entry and competitive advantages, locking customers in and driving profits through ancillary revenue streams like advertising.

Meanwhile, MercadoLibre's growth has helped block out competition, including from Amazon and Sea Limited's Shopee.

MercadoLibre, which currently trades at a market cap of $88 billion, is unlikely to ever approach Amazon's market value, which is now well over $1 trillion. However, MercadoLibre is growing significantly faster than Amazon, and looks likely to maintain that momentum, as it's at an earlier stage of its growth than Amazon.

Given its recent track record of outperformance against Amazon, MercadoLibre looks likely to continue to deliver outstanding returns as it follows in Amazon's footsteps.