Uber and Lyft's day of reckoning is here.

California senators are set to vote as early as Tuesday on Assembly Bill 5, a proposed law that would expand many employment protections to drivers while potentially wreaking havoc on the company's balance sheets.

The bill, which was proposed in 2018 by Assemblywoman Lorena Gonzalez, would codify a three-part test to determine a worker's status as either an employee or independent contractor.

That test was first written in a 2018 Supreme Court decision in the case involving Dynamex. The court said a worker is an employee unless the employer proves that:

(A): The worker is "free from the control and direction" of the company that hired them while they perform their work. (B): The worker is performing work that falls "outside the hiring entity's usual course or type of business." (C): The worker has their own independent business or trade beyond the job for which they were hired.

Uber and Lyft have been open about the ramifications to their businesses should the bill become law.

"It's also no secret that a change to the employment classification of ride-share drivers would pose a risk to our businesses," executives from both companies said in a June op-ed, echoing similar warnings from both companies' initial-public-offering filings earlier this year.

"Current employment laws, however, do not allow companies like ours to offer certain benefits without blurring the boundaries of employment and triggering a wave of litigation in which nobody wins," they said.

Wall Street agrees that things could be bad if the bill is passed. In California alone, reclassifying drivers as employees could cost Uber and Lyft $3,625 per driver each year, analysts at Barclays estimated. All the associated costs, including Medicare, FICA, and other payroll items, could total $290 million.

"Beyond higher wages, ride-hailing companies would be responsible for half (6.2%) of employees' Social Security and Medicare (1.45%) tax, as well as the costs for administering any employee benefits (e.g., health care and 401ks)," the bank's analysts said in a note to clients.

"With current driver earnings and incentives running at an estimated 78% and 76% of gross bookings for Uber and Lyft, respectively, a 25% increase in driver wage/benefit costs would essentially drive take rates to zero (absent rate increases to riders).

"We think an adverse ruling on the contract workforce issue would potentially bankrupt both Uber and Lyft," they said.

Both companies have maintained their commitment to higher pay and more benefits for drivers, so long as it's on their terms. Uber for the first time last week suggested a minimum wage of $21 per hour while drivers are on a trip, or about 63% of their time, in addition to a bargaining agreement. Lyft, meanwhile, sent push notifications to drivers saying that their flexibility could be on the hook if AB5 passes.

If AB5 gains final passage in the California state Senate and Assembly, it could land on Gov. Gavin Newsom's desk before the Legislature goes into recess on September 13. Newsom has indicated he would sign it into law.

Read more: Uber has proposed a new minimum wage for drivers after years of protests, but it comes with a catch

When trading opened Tuesday morning following the Labor Day holiday, Uber's and Lyft's stock prices were hit more than the market at large, falling some 5% and 6%, respectively, as investors feared the repercussions of the bill should it become law.

Gearing up for a $90 million fight

If the bill passes, Uber and Lyft will be joined by the delivery company DoorDash in their fight to have it replaced. Each of the three companies has pledged $30 million for a ballot initiative to exempt themselves from the proposed law, The New York Times reported.

"As a Plan B, we are reluctantly funding this initiative," Tony West, Uber's chief legal officer, told the paper. "This is not our first-choice option. We would much rather have a historic deal that is good for drivers, good for innovation, good for labor."

Gonzalez, the sponsor of AB5, called the proposed ballot measure "disgusting."

"If they have millions of dollars to put into a ballot initiative, why don't they pay their workers more?" Gonzalez told Politico, adding that the companies' stance amounted to "either you eat it or we're going to force-feed it to you. It's no different from Walmart."

Last week, 75 academics from top universities around the country wrote a letter in support of the bill, cautioning against further carve-outs for gig-economy companies like Uber, Lyft, and DoorDash.

"We oppose attempts to carve platform gig workers out of Dynamex and AB5," the group wrote, citing their own research in which they argue that people who work for the apps "are algorithmically controlled in the traditional ways that employees are controlled."

"They have very limited — if any — entrepreneurial potential; their hours and work are highly structured by the platform employer; they can be unilaterally terminated from their work; and most do not set their own prices."