Ian Ayres is the William K. Townsend professor at Yale Law School.

As websites such as Cars.com and TrueCar have made car pricing more transparent, auto dealers have turned to boosting their profits with hidden fees on loans.

When a consumer chooses in-house financing with an auto dealer, the dealer sends the customer’s financial information to a lender and is told the rate that the customer qualifies for. But it’s legal for the dealer to turn around and charge the customer a higher interest rate. You might qualify for a 5.9 percent interest rate, but if the dealer can get you to agree to a loan at 11 percent, the lender will kick back more than $1,000 to the dealership as pure profit. This discretionary markup of the interest rate allows auto dealers to arbitrarily increase their fees.

An analysis by the independent online auto-loan marketplace Outside Financial has found that dealers are charging an average markup of $1,791 per loan. By contrast, in 2003, Vanderbilt University economist Mark Cohen estimated that 10 percent of loans to Nissan’s borrowers were marked up more than $1,600. Now the average loan is boosted more than that.

Anyone who considers purchasing a vehicle with dealer financing should worry about the fact that the government allows these concealed price hikes. But people of color are particularly vulnerable, given that they are historically discriminated against by the auto industry.

Economists have had evidence for decades that car dealers tend to charge minorities higher prices. A series of studies I authored and co-authored in the 1990s found that auto dealers consistently charge black consumers prices that are hundreds or thousands of dollars more than their offers to white shoppers. These inflated prices can more than double the dealer’s profits compared with selling the same vehicle to a similar white customer.

As dealers earn more and more profit from finance fees, the discriminatory practices appear to be at work there, too. In the past few years, Honda and Toyota have both settled lawsuits brought by the Consumer Financial Protection Bureau for more than $20 million because minority borrowers were charged higher interest markups than equally qualified white borrowers. Neither company admitted wrongdoing.

The CFPB and other government agencies should be on the lookout for ways to better curtail dealership lending abuses. Yet instead of stepping up enforcement and protecting customers, the CFPB has rolled back rules on discriminatory lending practices and decreased enforcement of existing protections. Just last year, the Senate used the Congressional Review Act to overturn a CFPB rule that explicitly banned auto lenders from charging discriminatory fees on the basis of race.

California is one of only a handful of states to have experimented with capping the amount by which dealerships can mark up their loans. For loans with the standard repayment term of five years, a California dealership can mark up the interest rate by only 2.5 percentage points. Other states would do well to adopt similar caps.

To help assure that markups are reasonable, auto dealers should be required to engage the free market. If an auto-finance contract would earn the dealership profits over, say, $1,000, the dealership should be obliged to offer the consumer the option of having the loan auctioned on an open-access lending site such as Lending Tree. That way, bidders in the open market, and not sales agents in a back room, can determine the fair interest rate.

At a minimum, borrowers should be told how much their loan is being marked up, how much the dealer stands to profit and how that compares with average markup profit at that dealership. There’s no good reason dealerships should be allowed to shroud their loan profits. If customers were actually informed about the markup fees in their contracts, they could then decide whether to shop around for a different loan.

Savvy consumers have long understood that it is almost always better to borrow independently, but regulators have the ability to make sure all car buyers get a fair deal, no matter where they shop for financing. Capping interest markups and better harnessing market competition can protect consumers while still ensuring that dealers can earn a reasonable return for connecting customers to financing.

Read more: