I wanted to buy some mini marshmallows recently, so I went on Amazon. Perhaps because of their resemblance to packing material—light, bulky, ubiquitous—I figured they’d be cheap. But when I found the most popular brand, not only did the marshmallows cost twice what I’d pay at my local store, the price had skyrocketed overnight.

Just beneath the placid surface of a typical product page on Amazon lies an unseen world, a system where third-party vendors can sell products alongside Amazon’s own goods. It’s like a stock market, complete with day traders, code-slinging quants, artificial-intelligence algorithms and, yes, flash crashes.

Amazon gave people and companies the ability to sell on Amazon.com in 2000, and it has since grown into a juggernaut, representing 49% of the goods Amazon ships. Amazon doesn’t break out numbers for the portion of its business driven by independent sellers, but that translates to tens of billions in revenue a year. Out of more than 2 million registered sellers, 100,000 each sold more than $100,000 in goods in the past year, Peter Faricy, Amazon’s vice president in charge of the division that includes outside sellers, said at a conference last week.

It’s clear, after talking to sellers and the software companies that empower them, that the biggest of these vendors are growing into sophisticated retailers in their own right. The top few hundred use pricing algorithms to battle with one another for the coveted “Buy Box,” which designates the default seller of an item. It’s the Amazon equivalent of a No. 1 ranking on Google search, and a tremendous driver of sales.

To see what all this means for the consumer, download the Chrome extension Keepa, which will show you the price history for any given item on Amazon. For the marshmallow listing I had been eyeing, the wild pricing gyrations resembled a penny stock during heavy trading.