When Uber introduced upfront pricing in the US last year, its system of charging riders a fixed price when they book a ride, it also decoupled driver earnings from what passengers paid. The price that Uber charges to riders is its best guess at what a trip will cost; the sum it pays drivers is a metered rate based on time and distance.

The trouble was that Uber hadn’t actually told drivers (or, really, anyone) that it was doing this, and they started to get suspicious. Quartz repeatedly asked Uber about the parameters it set for upfront pricing—and whether it was using the difference between what a rider paid and a driver earned to improve its margins—and received various unsatisfying, mostly off-the-record responses. But last week, in an interview with Bloomberg, Uber finally revealed a bit more about how its pricing model actually works:

The new fare system is called “route-based pricing,” and it charges customers based on what it predicts they’re willing to pay. It’s a break from the past, when Uber calculated fares using a combination of mileage, time and multipliers based on geographic demand. Daniel Graf, Uber’s head of product, said the company applies machine-learning techniques to estimate how much groups of customers are willing to shell out for a ride. Uber calculates riders’ propensity for paying a higher price for a particular route at a certain time of day. For instance, someone traveling from a wealthy neighborhood to another tony spot might be asked to pay more than another person heading to a poorer part of town, even if demand, traffic and distance are the same.

Economists describe this system of charging people based on their willingness or ability to pay, rather than a flat rate, “price discrimination.” Unlike other forms of discrimination, it’s not necessarily considered bad. The basic idea is that consumers have a certain amount they are willing to pay for any given thing, and companies have a certain price that they charge. The difference between what the company charges and the customer will pay is called, in econ lingo, the “consumer surplus.”

“In most markets, there’s only one price. But if Uber knows exactly how much each consumer is willing to pay, they can charge accordingly,” Dan Svirsky, an economics graduate student at Harvard who is researching the earnings of Uber drivers, said in an email. “That allows them to take all the consumer surplus and transfer it to themselves. This may seem unfair or annoying, but we don’t think of it as inefficient.”

Of course, how economists see the world and how most people see it are not the same, and most people are not fond of price discrimination. Amazon was criticized in the early 2000s for offering goods at lower prices to people it identified as new customers. Dell has received flack for selling the same laptop at different prices for home users, small businesses, and large companies. Airlines are chronically being scrutinized for their efforts to jack up prices.

The typical Uber rider will likely not be happy to learn that their prices are being determined not by time or distance, but by the company’s best guess at how much they’ll pay before switching to Lyft or another mode of transportation. To be fair, the data isn’t that granular yet—Uber told Bloomberg it’s based on “groups of customers” rather than individuals—but the trend is clearly in that direction.

Uber’s pricing has gone through several iterations over the last eight years. In the beginning, Uber charged passengers based simply on time and distance, much like a taxi meter. In 2011, it introduced surge pricing, its signature practice of letting rates rise with demand. Last year, the company replaced this system, which was still ultimately based on time and distance, with an “upfront” pricing model that asks riders to agree to a price when they book a ride, but pays drivers based on minutes and miles.

Quartz’s Allison Schrager, an economist, says price discrimination should in theory increase Uber’s customer base by charging less to lower income passengers who might normally find Uber’s fares too high, and more to higher income people who can afford the extra cost. Decoupling driver earnings from rider payments also means Uber can keep prices low in lower-income neighborhoods without worrying that drivers will avoid those pickups because they pay too little. “This can be better for drivers because it is less risk and richer riders subsidize poor,” she said.

Marshall Steinbaum, a senior economist at the Roosevelt Institute, a liberal American think tank, said there’s reason to be cautious. “Efficient and good do not mean the same thing,” he said. “In a world in which every customer pays precisely what they’re willing to pay for a ride, the customers as a whole are no better off than they are in a world where Uber doesn’t exist.” He added: “Uber has been trying to set this mechanism up for its entire existence.”