In the heart of San Francisco, the gig economy reigns supreme. Walk into a grocery store, and a large number of shoppers you see are independent contractors for grocery-delivery start-up Instacart. Step outside, and cars with black-and-white Uber stickers or flashing Lyft dashboard lights are sitting, hazards on, blocking the bike lane as they wait for passengers. Cyclists zigzag around the cars, many hauling bags branded with various logos—Caviar, Postmates, Uber Eats—as they deliver food to customers around the city. You can stand on a street corner and count the number of gig-economy workers walking by, as I often do; sometimes it’s 2 out of every 10. On some corners, like the one near the Whole Foods on 4th and Harrison, I’ve counted 8 out of every 10.

The gig-economy ecosystem was supposed to represent the promised land, striking a harmonious egalitarian balance between supply and demand: consumers could off-load the drudgery of commuting or grocery shopping, while workers were set free from the Man. “Set your own schedule,” touts the Uber-driver Web site; “Be your own boss,” tempts Lyft; “Make an impact on people’s lives,” lures Instacart. These companies have been wildly successful: Uber, perhaps the most notorious, is also the most valuable start-up in the U.S., reportedly worth $72 billion. Lyft is valued at $11 billion, and grocery delivery start-up Instacart is valued at just over $4 billion. In recent months, however, a spate of lawsuits has highlighted an alarming by-product of the gig economy—a class of workers who aren’t protected by labor laws, or eligible for benefits provided to the rest of the nation’s workforce—evident even to those outside the bubble of Silicon Valley. A July report commissioned by the New York City Taxi and Limousine Commission found that 85 percent of New York City’s Uber, Lyft, Juno, and Via drivers earn less than $17.22 an hour. When the California Supreme Court ruled in May that delivery company Dynamex must treat its gig workers like full-time employees, Eve Wagner, an attorney who specializes in employment litigation, predicted to Wired, “The number of employment lawsuits is going to explode.”

Of course, the threads of this disillusionment are woven into the very structure that has made these start-ups so successful. A few weeks into my tenure at Uber, where I started as a software developer just a year after graduating from college, still blindly convinced I could make the world a better place, a co-worker sat down next to my desk. “There’s something you need to know,” she said in a low voice, “and I don’t want you to forget it. When you’re writing code, you need to think of the drivers. Never forget that these are real people who have no benefits, who have to live in this city, who depend on us to write responsible code. Remember that.” I didn’t understand what she meant until several weeks later, when I overheard two other engineers in the cafeteria discussing driver bonuses—specifically, ways to manipulate bonuses so that drivers could be “tricked” into working longer hours. Laughing, they compared the drivers to animals: “You need to dangle the carrot right in front of their face.” Shortly thereafter, a wave of price cuts hit drivers in the Bay Area. When I talked to the drivers, they described how Uber kept fares in a perfectly engineered sweet spot: just high enough for them to justify driving, but just low enough that not much more than their gas and maintenance expenses were covered.

Illustration by Ben Wiseman.

Those of us on the front lines of the gig economy were the first to spot and expose its flaws—two months after leaving Uber, I wrote a highly publicized account of my time there, describing the company’s toxic work environment in detail. Now, as Silicon Valley struggles to come to terms with its corrosive underpinnings, a new vein of disquiet has wormed its way into the Slack chats and happy-hour outings of low-level rank-and-file engineers, spurred by a question that seems to drown out everything else: What have we done? It’s a question that I, too, have been forced to grapple with as I notice how my job as a software engineer has changed the nature of work in general—and not necessarily for the better.

The risk, we agreed, is that the gig economy will become the only economy.

Gig-economy “platforms,” as they’re called, take their inspiration from software engineering, where the goal is to create modular, scalable software applications. To do this, engineers build small pieces of code that run concurrently, dividing a task into ever smaller pieces to conquer it more efficiently. Start-ups function in a similar way; tasks that used to make up a single job are broken down into the smallest possible code pieces, then partitioned so those pieces can be accomplished in parallel. It’s been a successful approach for start-ups for the same reason it’s a successful approach to writing code: it is perfectly, beautifully efficient. Across so-called platforms, there are no individuals—no bosses delegating tasks. Instead, various algorithms run on the platform, matching consumers with workers, riders with the nearest driver, and hungry customers with delivery people, telling them where to go, what to do, and how to do it. Constant needs and their quick solutions all hummingly, perpetually aligned.

By now it’s clear that these companies represent more than a trend. Though it’s difficult to accurately determine the size of the gig economy—estimates range from 0.7 to 34 percent of the national workforce—the number grows with each new start-up that figures out how to break down another basic task. There’s a relatively low risk associated with launching gig-economy companies, start-ups that can engage in “a kind of contract arbitrage” because they “aren’t bearing the corporate or societal cost, even as they reap fractional or full-time value from workers,” explains Seattle-based tech journalist Glenn Fleishman. Thanks to this buffer, they’re almost guaranteed to multiply. As the gig economy grows, so too does the danger that engineers, in attempting to build the most efficient systems, will chop and dice jobs into pieces so dehumanized that our legal system will no longer recognize them. And along with this comes an even more sinister possibility: jobs that would and should be recognizable—especially supervisory and management positions—will disappear altogether. If a software engineer can write a set of programs that breaks a job into smaller increments, and can follow it up with an algorithm that fills in as the supervisor, then the position itself can be programmed to redundancy.

A few months ago, a lunchtime conversation with several friends turned to the subject of the gig economy. We began to enumerate the potential causes of worker isplacement—things like artificial intelligence and robots, which are fast becoming a reality, expanding the purview of companies such as Google and Amazon. “The displacement is happening right under our noses,” said a woman sitting next to me, another former engineer. “Not in the future—it’s happening now.”

“What can we do about it?” someone asked. Another woman replied that the only way forward was for gig-economy workers to unionize, and the table broke out into serious debate. Yet even as we roundly condemned the tech world’s treatment of a vulnerable new class of worker, we knew the stakes were much higher: high enough to alter the future of work itself, to the detriment of all but a select few. “Most people,” I said, interrupting the hubbub, “don’t even see the problem unless they’re on the inside.” Everyone nodded. The risk, we agreed, is that the gig economy will become the only economy, swallowing up entire groups of employees who hold full-time jobs, and that it will, eventually, displace us all. The bigger risk, however, is that the only people who understand the looming threat are the ones enabling it.