“What exactly are they saying about us?”

The question from Apoorva Mehta, founder and CEO of Instacart, made sense. After all, I had recently returned from CES, the consumer electronics confab held annually in Las Vegas, where a number of tech execs had privately slammed the grocery delivery company, saying it could never turn profitable or justify its $2 billion valuation. In short, they felt it was the epitome of “peak unicorn.”

“They’re wrong,” Mehta responded. “Call me back in a month or two.”

That follow-up conversation took place last Friday, and also included the company’s top data scientist, Jeremy Stanley.

They say that Instacart is now “unit economic profitable” in ten of its markets, which means that it makes money on average orders in areas like Chicago, San Francisco, Atlanta, Denver, Los Angeles, Seattle and Washington, D.C. Moreover, those profits in high-volume areas mean that the entire company recently turned gross margin positive (which, it should be noted, is different than net margin positive, which would also include corporate costs like marketing and R&D).

Fortune also has obtained documents from a recent Instacart board meeting that shows the company generates a whopping $6.96 per order in Atlanta (3% of the company’s overall volume) and $4.29 per order in Chicago (Instacart’s largest urban market, with 14% of its volume). It continues to lose money in markets like New York City and Bay Area (which is distinct from San Francisco, where it earns $2.45 per order).

But the purpose of our talk wasn’t bragging rights, or even to correct market misconceptions. Instead, it was to explain how Instacart has begun to squeeze cash out of the notoriously low-margin grocery business.

‘Items per minute’

Instacart has three distinct revenue streams. First, it receives fees directly from customers, either in the form of delivery fees or monthly subscriptions. Second, many of the grocery retailers pay volume-related fees to Instacart. Third, Instacart has a number of consumer packaged goods partners who pay Instacart in exchange for promoting their products.

The company also has three primary costs per delivery: Payments to shoppers and/or deliverers (sometimes these tasks are split, sometimes not), credit card transaction fees and insurance.

Most of Instacart’s recent improvements have been on the cost side. For example, its increased volume allows the company to batch orders together so as to allow for more deliveries per hour. Instacart also has spent a lot of time mapping out its more popular stores, so that item collection more efficient. In fact, one of the company’s most-watched internal metrics is “items per minute,” or the number of items that a shopper can put in his or her cart every 60 seconds.

To be sure, “items per minute” is improved by having Instacart shoppers who are familiar with a particular store’s layout. But the company also must know when and where to place those shoppers. Or even if there isn’t enough volume to have the shopper and deliverer roles split, as the company just determined in Minneapolis (where it laid off the drivers).

“We’ve gotten much smarter at matching supply and demand, which has improved the efficiency of our fulfillment by 15% over the past five months,” says Jeremy Stanley, VP of data science. “What’s particularly tricky is making sure our shoppers aren’t waiting around while also not constraining a customer’s ability to place orders. So we track a counterbalance metric called ‘lost delivery,’ and have managed to keep that quite low.”

Stanley adds that he paid close attention to the recent AlphaGo victories over human Go champ Lee Sedol, and that he’s been surprised by how much AlphaGo’s ability to determine probabilities has reminded him of Instacart’s own algorithms.

“The first thing AlphaGo has to do is make a 19 x 19 grid, and every turn there are hundreds of possible moves. We have a similar challenge in that we have thousands of orders due, and we need to make predictions about how long it will take shoppers to pick, drive and deliver… Also, AlphaGo is recomputing after every single move, continuously reevaluating. We need to do the same.”

According to Mehta and Stanley, these efforts have increased Instacart’s delivery efficiency by 20% over the past five months, while decreasing late delivery incidents by 25%. In the long term, such savings should help Instacart decrease delivery fees, so that the service can be accessed by less affluent shoppers.

The issue of delivery fees is a bit thorny for Instacart right now, given a late 2015 decision to increase its per delivery fee from $3.99 to $5.99, and its annual subscription service from $99 to $149. It also recently cut pay for some of its in-store and delivery workers.

Mehta says that Instacart was profitable in San Francisco before the delivery fee hikes, and argues that it was largely done to offset a trend toward price parity. In other words, Instacart marks up the price of certain items at non-partner retailers but, as the majority of its volume has shifted to partners like Whole Foods Market WFM and Target TGT , it increased delivery fees to make up some of the revenue difference. He insists that, as volume (hopefully) continues to increase, delivery fees should eventually decrease.

Instacart declined to disclose current top-line figures, except to say that its revenue run rate ― i.e., hypothetical annualized revenue if you were to extrapolate from current sales ― has grown 6x since January 2015, when media reports put it just north of $100 million.

Expand the brand

One reason for some recent skepticism over Instacart’s fortunes is that the company has dramatically slowed down its hiring and market expansion over the past six months.

Mehta acknowledges the “pause,” which he said came after a period of rapid growth that didn’t allow for enough time to develop an adequate playbook around new market launches.

“One of the things we learned is that we don’t necessarily need a general manager in each market, and in some markets we don’t even need a management presence to launch,” Mehta explains. “In Houston, for example, we’re live but there is no official Instacart presence. Same thing in places like Portland (Ore.) and Boulder.”

Mehta says that the company is planning to ramp up expansion again in 2016, with eight new market launches (including already-announced plans for Baltimore and Orange County). Such moves could eat into profits―just as the “pause” has helped enable it―but Mehta argues that continued growth in large profitable areas like San Francisco should offset losses in new, and thus initially smaller, markets.

Instacart also wants to eventually offer customers a 30-minute delivery option, compared to its current one-hour minimum, and double the size of its 10-person data science team.

“We have some really well-funded competitors in this space, like Amazon AMZN , but grocery is simply not their focus and don’t necessarily realize how this particular market is about the long tail,” Mehta says. “As they’ve entered, it’s actually caused us to get a lot more calls from retailers.”

All about the “levers”

When Instacart raised $8.5 million in its first round of venture capital funding three years ago, it wasn’t terribly surprising. After all, nearly every industry vertical was getting its own version of Uber. What turned heads, however, was the participation of Sequoia Capital partner Michael Moritz, who had once invested in grocery delivery flame-out Webvan (where he also sat on the board).

Moritz felt that Instacart was different from Webvan not only because it used in-store shoppers rather than expensive warehouses, but also because it had several secret “levers” it could eventually pull in order to achieve profitability.

At the time, it felt a bit like someone trying to justify why he hadn’t learned from past mistakes. But, based on what Instacart is now saying about its performance, Moritz may have indeed been correct that Instacart isn’t Webvan 2.0.