One way to earn strong returns over the long run is to invest in stocks that are leaders or pioneers (or both) in industries experiencing significant growth due to technological progress or other developments. That description applies to PayPal (PYPL 2.82%) and Fiverr (FVRR 2.21%) pretty well. The former is a well-established fintech specialist, while the latter is helping power the expanding gig economy. Although they have faced their challenges -- PayPal is down 19% this year, while Fiverr has dropped 26% -- these two stocks could deliver excellent returns over the long run.

Image source: Getty Images.
1. PayPal
PayPal's second-quarter results were in line with expectations, except for the 49% drop in free cash flow that led to its post-earnings dip. However, the fintech specialist did not change its free cash flow guidance for the fiscal year, so the market may have overreacted to what is likely a timing issue. Meanwhile, PayPal remains one of the most trusted brands in its niche and benefits from a deep ecosystem of users across individuals and businesses.
The company ended the second quarter with 438 million active accounts, representing a 2% year-over-year increase. PayPal reported a payment volume of $443.6 billion during the period, a 5% increase compared to the same period last year. Revenue also grew 5% year over year to $8.3 billion, while the company's non-GAAP (Generally Accepted Accounting Principles) net earnings per share (EPS) came in at $1.40, 18% higher than the year-ago period.

NASDAQ: PYPL
Key Data Points
PayPal's new CEO, Alex Chriss, has been working diligently to improve the company's profitability. He has also introduced some new potential growth opportunities for the company, including its advertising platform for businesses. While this initiative may take a while to pay off, the move makes sense considering PayPal is deeply entrenched in the payment ecosystem and is trusted by millions of consumers and businesses worldwide. PayPal's large ecosystem also grants it access to a considerable amount of data on consumers' purchasing habits and patterns, a valuable source of insights when crafting ad campaigns -- that's one of the factors that make the company's new ad business so promising.
Beyond that, PayPal should continue to benefit from the increased demand for digital payment methods, driven by several key shifts, including the ongoing growth of the e-commerce industry. Lastly, the company benefits from a network effect, which further strengthens its brand name and its moat. PayPal may be down this year, but the stock could rebound and still deliver excellent returns over the long term.
2. Fiverr
Some might think Fiverr's business is in trouble. The company's platform, which helps connect freelancers with businesses that need their services, is seeing a decline in buyers. Meanwhile, the rise of artificial intelligence (AI) seems to be threatening Fiverr's ecosystem, as many of the specialties on its platform could be replaced by AI, rendering the need to hire freelancers to handle these services obsolete. These factors partly explain Fiverr's poor performance this year, but there are some excellent signs, too. Most importantly, the company's financial results are strong.
Fiverr's second-quarter revenue increased by 14.8% year over year to $108.6 million. Yes, the company's active buyers declined by 10.9% year over year to 3.4 million, but spend per buyer was up to $318, 9.8% higher than at the same time last year.

NYSE: FVRR
Key Data Points
Fewer buyers isn't a significant problem as long as Fiverr is retaining those who spend a lot on the platform, and that's what the company appears to be doing. That's why its revenue -- and earnings -- are moving in the right direction. In the second period, Fiverr's non-GAAP EPS was $0.69, 19% higher than the year-ago period. What about the threat of AI? While it may reduce the need for some specialties, AI-related services themselves are on the rise. Some companies are spending actual fortunes hiring AI experts.
Smaller businesses that also see the value of the technology don't have that kind of money, so they turn to cheaper yet still qualified freelancers -- enter Fiverr, which helps connect these kinds of AI specialists with businesses. Sales from AI-related services are boosting revenue on the platform. Overall, Fiverr's underlying business is sound, and the future looks promising, considering the rapid rise of the gig economy, which offers convenience and flexibility to all those involved. Fiverr's shares remain attractive despite lagging the market this year.