Wall Street bankers are taking home near-record bonuses, despite cries of overregulation.

The average bonus paid to securities industry employees in New York City soared 17% last year to $184,200, according to the New York State Comptroller's Office.

That's more than triple the national median household income of $59,039 in 2016, the most recent year for which statistics are available.

The payout on Wall Street is just shy of the record of $191,360 in 2006, just before the financial meltdown. The industry's total bonus pool climbed last year to $31.4 billion.

Pretax profits in the securities industry jumped 42%, after an increase of 21% in 2016. Profits are the highest since 2010, the year the Dodd-Frank financial reform law was enacted.

"The large increase in profitability over the past two years demonstrates that the industry can prosper with the regulation and consumer protections adopted after the financial crisis," New York State Comptroller Thomas DiNapoli said in a statement on Monday.

The number of Wall Street jobs dipped slightly last year, averaging 176,900. That's 6% below the pre-crisis high in 2007.

Related: Wall Street's head-spinning reaction to trade headlines

The strong bonus payouts come as Congress works to roll back parts of Dodd-Frank, which was put in place to prevent another crisis.

The Senate passed a bill earlier this month, with support from 17 Democrats, that would loosen regulations that community banks, regional lenders and mortgage companies complained about.

The legislation does not provide significant relief for the mega banks on Wall Street, including Goldman Sachs (GS), Citigroup (C) and Morgan Stanley (MS). But big banks have lobbied lawmakers to dial back stress tests and other regulations.

Wall Street's success is hugely important to the local and state economy. Nearly one in 10 jobs in New York City is directly or indirectly linked to the industry. Even though Wall Street accounts for less than 5% of the city's jobs, it makes up one-fifth of private sector wages.

But compensation systems can also cause problems at banks.

Bad incentives have been blamed for the shoddy mortgage underwriting standards and reckless bets by Wall Street that led to the 2008 crisis. More recently, overly aggressive sales goals were at the heart of the Wells Fargo (WFC) fake-accounts scandal.

New York Federal Reserve President Bill Dudley urged regulators and banks in a speech on Monday to focus on making sure incentive systems are sound.

"Bad incentives can lead to conduct that not only generates large risk exposures and market excess," Dudley said, "but also erodes trust and confidence in the financial system."