The Dodd-Frank Act celebrated its fourth birthday last week, but the House GOP did not come to the party. On July 21, the Republican staff of the House Committee on Financial Services issued a report—called “Failing to End ‘Too Big to Fail’ ”—thundering that the act has sowed the seeds for another round of bailouts by encouraging banks to grow too big to fail. The zillion-page statute has spawned 208 regulations, with at least 190 more to come. Not even liberals have shown much enthusiasm for it. Everyone seems to agree that the law has failed to ensure no bailouts will ever take place again and that the blizzard of regulations is questionable.

But the act, while imperfect, was a significant achievement, and the House report’s criticisms are seriously muddled. The report denies that deregulation of the financial industry caused the financial crisis but then blames regulators for weakening rules that limited what risks banks could take. So it both criticizes regulation but argues that regulation was insufficient.

The report’s main complaint is that the Dodd-Frank Act institutionalizes a government commitment to rescue firms hit by financial panic. The report quotes President Obama’s statement that “Because of this law, the American people will never again be asked to foot the bill for Wall Street’s mistakes,” and then complains that Dodd-Frank does nothing of the sort—that it does not stop the government from bailing out firms, and in some ways makes it easier to do.

But a no-bailouts goal is foolish. The government’s power to make emergency loans during a financial panic is essential. In the best case, the knowledge that the government will intervene can stop panics from starting in the first place. But if not, only government intervention can prevent a financial panic from shutting down the economy. It’s true that the government backstop gives banks perverse incentives to take risks and grow too large. But that’s why those hundreds of rules are necessary.

For all its complexity, Dodd-Frank reflects a commonplace government function: to provide aid to the public in case of emergency. Suppose a bad rainstorm causes a river to overflow its banks and flood a city. Everyone agrees that the government should send in emergency personnel to rescue people and give them shelter until the waters recede. Most people believe that the government should also lend a hand as people rebuild.

Knowing that the government will come to their aid in a flood, people are liable to be overly casual about the risks they face. They might build their houses too near the river and fail to take precautions like evacuating on rainy days. This risky behavior, if left unchecked, raises the costs of rescue and rebuilding should the flood occur. To discourage this risk-taking, the government issues regulations requiring people to build their houses a certain distance from the river, use reinforced walls, and take other precautions.

This familiar logic applies to financial regulation, except that in a financial crisis, there is too little liquidity rather than too much. While people like to blame banks for the financial crisis—and indeed, many banks that did act irresponsibly have been punished by the government—most financial institutions followed the rules. The problem is that the rules were not strict enough to block banks from lending too much

The emergency personnel in a financial panic do not arrive in boats but sit at the Fed’s discount window and dole out loans. Solvent banks suddenly find themselves with too little cash to give to depositors or other short-term lenders who want to withdraw their money or refuse to roll over their loans. Without emergency loans, banks must sell off assets at low fire-sale prices. An otherwise solvent institution goes bankrupt. Temporary loans from the government allow them to hold onto their assets until they can sell them at their true value.

This is exactly what happened during the financial crisis of 2007-08, and it’s why the government actually made billions of dollars in profit on the loans—a fact that is doomed never to penetrate the public consciousness because of the popular hostility to bailouts. The vital role of the government as lender of last resort, however, has been known for at least two centuries. The Fed was given this power in 1913, not 2010. European central banks have possessed it even longer.

It’s true that the emergency-loan backstop encourages risky behavior. Just as people will build too closely to the river unless ordered not to, banks will issue risky loans unless the government blocks them. This is why regulation is necessary. But doesn’t the GOP have a point that regulators have gone too far? Are 398 rules—each of which can run dozens or even hundreds of pages—really necessary?

Probably. Bank regulation is tricky. Banks are complex institutions that constantly figure out new ways to make money. Regulators can identify and shut down one source of risk only to find, like the sorcerer’s apprentice, that the prohibited activity has resurrected itself as a multitude of similar risk-taking behaviors. And a single activity that is risky in one context may reduce risk in another. Dodd-Frank created the Volcker Rule, which bars banks from engaging in “proprietary trading”—buying and selling securities in the hope of making a profit. But banks can often reduce their risk exposure by trading. The Volcker Rule creates a loophole for such transactions, but it’s hard to know whether the loophole is too large or too small.

The best way to regulate bank risk is to require banks to hold sufficient capital. This means that a bank shouldn’t borrow too much relative to the value of its assets. Imagine, for example, that a bank borrows $99 million and owns $100 million in assets like loans. If a few of those loans go sour, the bank will be insolvent, and the taxpayer will pay the bill. If the bank has borrowed only $90 million, then shareholders take the hit when borrowers default. Capital regulations create a ceiling on borrowing: The bank may be permitted to borrow $90 million, but not $99 million.

Regulators have always paid attention to bank capital. In the past few decades, regulation of capital has become central. The big question is how much capital banks should be required to hold. One percent is too low, but is 10 percent the right amount? Twenty percent? More?

In principle, the answer is simple. When banks are required to hold capital, they can’t borrow as much as they would otherwise, which means they must forgo some loans or opportunities for profit. Or they must raise capital by issuing equity, which can be costly. But the risk and severity of a financial crisis goes down. The regulator’s challenge is to raise capital requirements enough to minimize this risk but not so much as to choke off economic growth.

No one knows what the proper level of capital is. The current rules require banks to maintain capital levels in the 6­­–8 percent range. A recent book by two economists, Anat Admati and Martin Hellwig, proposes 25–30 percent. Eugene Fama, the recent Nobel laureate, and no fan of regulation, has suggested a figure as high as 50 percent. These economists are skeptical that it costs banks much to raise equity rather than borrow money. So requiring banks to hold lots of capital is a small price to pay to minimize the risk of a financial crisis that could cost the economy trillions of dollars.

Whatever the right capital requirement is, everyone understands that the rules before the financial crisis were too generous to banks. Indeed, there is evidence that the capital requirements did not cause banks to curtail lending at all. In the wake of the financial crisis, regulators have raised capital requirements. They did not need Dodd-Frank to do so—they already possessed that authority—but the statute gave them the political push they needed.

So we have a safer and more stable financial system than we did before the crisis. Given that capital requirements are still pretty low—only slightly higher than they were before the crisis—it’s most unlikely that the price in terms of forgone economic growth has been too high. It’s more likely that capital requirements should be raised even further—that regulation so far has not been strict enough.