BOSTON — East Boston Rep. Adrian Madaro was running late Tuesday morning to testify on legislation meant to address the frustrating congestion that plagues Boston’s highways and main city streets and roads because he was “stuck in traffic in the Sumner Tunnel surrounded by” cars from ride-hailing services such as Uber and Lyft.

Those ride-for-hire services, or transportation network companies (TNCs) as the state refers to them, have exploded in popularity and contribute to the congestion, especially single-passenger trips and trips that start or end with an empty car at the airport, Madaro said.

Once he got out of the tunnel and into the State House, Madaro was joined by Boston Rep. Jay Livingstone to pitch the Financial Services Committee on legislation (H 1039) that would change the fee structure for TNCs to generate new funding for public transit options and the communities that deal with the worst congestion.

“This situation and the fight over the roads, especially with respect to Boston, it’s really a negative feedback loop where people are discouraged with the time buses are taking to go anywhere so they’re using TNCs as and alternative to that, and that is causing buses to take even longer,” Livingstone said.

Madaro and Livingstone said the bill acknowledges that the 20 cent per TNC ride fee imposed by the Legislature in a 2016 law is insufficient and that the rigid fee structure is not flexible enough to truly mitigate the effects of TNCs.

“We now know that this fee is too low in proportion to the traffic and congestion effects these rideshares have on our city streets,” Madaro said. He added, “By switching from an outdated, low, flat fee to a dynamic percentage fee, we are more accurately accounting for the impact these rides have on our communities and our infrastructure.”

The bill would change the fee to be a percentage of the total ride cost calculated by distance and demand, Madaro said. The structure would differentiate between solo rides and pooled rides with multiple passengers by charging 6.25 percent for a solo ride and 4.25 percent for shared trips.

Madaro also filed a bill (H 1041) that would charge companies for every so-called “deadhead” ride — a ride-hailing vehicle trip taken with no passenger, contributing to congestion — at Logan International Airport.

From 2017 to 2018, the number of TNC trips increased 25 percent in Massachusetts to more than 81 million a year. The total number of rides grew across the state, but the growth was largely concentrated in the greater Boston urban core.

Boston Mayor Martin Walsh testified before the Financial Services Committee on Tuesday in support of another piece of legislation (H 1067/S 102) that would change the TNC fee structure.

The bill Walsh supported, filed by Boston Rep. Michael Moran and Winthrop Sen. Joseph Boncore, would change the TNC fee to be equal to 6.25 percent of the total ride cost for solo trips and 3 percent for shared rides. Half of the money generated from those fees would go to the city or town where the ride originated and the other half would go to the Commonwealth Transportation Fund and MassDevelopment.

Under the bill, TNC drivers who are on the road during peak travel times but do not have a passenger in the car would also be charged 20 cents per mile without a passenger.

“TNC’s should be contributing more to the public good, given the major impact they’re having on our streets. Look at the numbers: 42 million TNC rides started in Boston last year. That’s 115,000 every day. That’s more than one every second. Many of these rides happen during rush hour. And oftentimes, the pick-ups and drop-offs happen in a travel lane, including bus stops, bike lanes, and emergency vehicle areas,” Walsh said. “Increasing the assessment will help us ensure that the positives of this growing industry outweigh the negatives.”

Though the company did not testify in person on Tuesday, Uber said in a statement that it shares the goals of reducing congestion and limited greenhouse gas emissions but does not agree with the ways Walsh and others are seeking to accomplish those goals.

“We support the mayor’s goal of reducing congestion and want to continue to work with the city on innovative pilots like new pickup and dropoff zones,” Uber spokesperson Alix Anfang said in a statement. “However, rideshare vehicles represent a small fraction of cars in Boston and new taxes targeting rideshare customers punish Bostonians who don’t have a car while doing little to invest in much needed improvements to transit.”