"Ten to 15 years from now, I think China can be eBay's largest market on a global basis." So declared Meg Whitman grandly back in 2004. At the time, she was the chief executive of eBay, the U.S. e-commerce pioneer. Things did not work out as planned. Local competition proved so fierce and nimble, in contrast to eBay's managers, that the company was forced to beat a humiliating retreat.

The local leading the charge was Jack Ma, a schoolteacher who founded Alibaba at his apartment in Hangzhou, a city near Shanghai, in 1999. The original Alibaba website connected small manufacturers at home with commercial buyers overseas. But Ma sensed early on that the real prize would be serving China's rising middle classes. So he formed Taobao, a portal that consumers use to sell to one another, and added Tmall, a business-to-consumer, or B2C, site.

Alibaba's triumph has been breathtaking. The firm's portals control four-fifths of all e-commerce in China. Taobao is the country's leading e-commerce website, and Tmall leads the B2C market. The firm's sales exceeded $5.7 billion last year on Singles' Day, a marketing event held annually on Nov. 11. Measured by the value of goods sold on its platforms, Alibaba is bigger than eBay and Amazon combined.

Ma may soon best Silicon Valley rivals in another way: Alibaba could become the largest-ever initial public offering (IPO) in America. On May 6, after many months of speculation, Alibaba unveiled its prospectus to list in New York.

Pundits have been breathlessly predicting that this flotation could raise $15 billion to $20 billion, making it one of the biggest ever.

Still, the short-term outlook is dicey. The value of technology stocks listed in the U.S. has fallen by perhaps $150 billion since a peak in early March. Chinese stocks are out of favor, too. WH Group, a Chinese pork giant that last year acquired America's Smithfield Foods, another pork company, canceled its proposed $1.9 billion IPO in Hong Kong last month. And Sina Corp, which controls Weibo, a popular Chinese microblog, was forced to cut the size of Weibo's IPO in New York last month.

The dark mood explains why Alibaba has decided to offer merely a token amount at first — the prospectus says $1 billion — to test the waters. This will be raised in coming months as demand allows. The firm's bosses remember all too well that the overhyped IPO of Facebook two years ago initially flopped.

As is typical of IPO filings, Alibaba's prospectus outlines lots of risks. Regulatory uncertainty is one worry. For example, Chinese officials could interfere with AliPay, an online-payments system started by the firm that is vital to its success not only in e-commerce but also in Internet finance and other areas of expansion.

AliPay is currently not part of the group being floated in New York. It is held by a sister financial firm controlled by Ma and a handful of associates, having been spun out of Alibaba in 2010 without Yahoo's consent. Ma now plans to reduce his holding in AliPay from 46 percent to roughly 8 percent. This would allow the listed firm to reclaim a big stake in AliPay — if regulators permit a foreign entity (which Alibaba's Cayman-registered vehicle would be) to invest in the payment system, something they have not been keen on in the past.

These sorts of risk look manageable. The bigger worry is that the age of easy profits is over. Alibaba's dominance of Chinese e-commerce is an artifact of the era of the personal computer. But faster than in any other big market, China is moving to mobile commerce. It is already the world's largest market for smartphones. The firm says "an increasing percentage of our users are accessing our marketplaces through mobile devices, a trend that we expect to continue."

The snag? Mobile commerce is a wild new frontier in which Alibaba is but one player among many. It acknowledges this: "We face a number of challenges to successfully monetizing our mobile user traffic." For the first time, the Goliath is worried about disruptive rival entrepreneurs. At the same time it must continue to fight the war of the "three kingdoms" against two other giants of the local Internet: Baidu and Tencent.

In the past, they were content to milk their quasi-monopolies: Baidu dominated PC-based search, Tencent made a mint on online games and Alibaba got fat on e-commerce. But the rise of the mobile Internet has ended the truce. The heavyweights are now in a frenzied and costly contest to acquire innovators, spending billions to buy social-networking firms, apps, video portals and so on.

Copyright 2013 The Economist Newspaper Limited, London. All Rights Reserved. Reprinted with permission.