Russell G. Ryan, a former assistant director of enforcement at the Securities and Exchange Commission and former deputy chief of enforcement at the Financial Industry Regulatory Authority, is a partner with the law firm King & Spalding.

It’s time to admit that insider-trading “law” is irreparably broken. I used quotation marks because — hard to believe — there has never been an actual law that defines and prohibits insider trading. Yet thousands of nonviolent offenders have been incarcerated or otherwise penalized for this undefined crime, the amorphous contours of which have shifted repeatedly over the past 60 years at the whim of the Securities and Exchange Commission, federal prosecutors and federal courts. Congress is finally taking steps to address this anomaly.

What now passes for insider-trading law has been destined for chaos since its dubious birth by administrative fiat in 1961. Back then, the SEC and its new chairman, William L. Cary, were frustrated by the limited and relatively forgiving way that Congress, in the Securities Exchange Act of 1934, had addressed trading by corporate insiders.

Cary thought such trading should be more harshly punished as fraud. Instead of asking Congress to amend the law, though, the SEC bypassed the legislative branch entirely. The agency also didn’t bother to adopt a formal rule prohibiting insider trading, choosing instead to devise the new crime in the context of an otherwise forgettable administrative enforcement case. The SEC thereby circumvented the public-notice-and-comment requirements of the Administrative Procedure Act, which were designed to ensure informed regulation.

The SEC then cleverly announced this new crime in a settlement where the offending broker agreed to a mere 20-day suspension, and his firm — the now-defunct Cady, Roberts & Co. — was let off the hook entirely. These wrist slaps guaranteed that neither the broker nor the firm would care about, much less push back against, the SEC’s startling expansion of federal law in the settlement.

This administrative usurpation of legislative power was bad enough, but things got worse. Instead of reining in the SEC’s overreach, courts legitimized it — most notably in the 1968 case of SEC v. Texas Gulf Sulphur — and eventually allowed criminal prosecutors to incarcerate people for the unlegislated crime. Rather than step in with an explicit definition of insider trading, Congress simply armed the SEC, prosecutors and courts with immense power to punish it.

The inevitable result has been an abysmal lack of the predictability and fair notice required by the rule of law. Prosecutors and courts continually move the goalposts on a case-by-case basis with creative new theories of insider-trading liability, retroactively applying them to punish trading that often was not clearly illegal when it occurred. For example, late last year prosecutors persuaded a federal appeals court, in U.S. v. Blaszczak, to create yet another new theory that allows traders to be incarcerated under a rarely used provision of the Sarbanes Oxley Act of 2002 that was not previously understood to address insider trading at all, let alone vastly expand criminal liability. Ironically, the Blaszczak defendants were acquitted of all insider-trading counts that were based on the law as it was commonly understood at the time they traded.

After decades of similar administrative and judicial tinkering, insider-trading law has devolved into an amalgam of hair-splitting court opinions that attempt to distinguish illicit from innocent trading but more often sow confusion. Good-faith compliance with the law is difficult even for sophisticated traders with experienced lawyers, much less for unsophisticated mom-and-pop traders acting on their own. Many investors just play it ultra-safe and refrain from perfectly legal trades, while others are shocked to discover that they crossed a fuzzy line and face heavy fines or imprisonment for doing so.

Having abdicated its legislative duty for nearly six decades, Congress at last appears poised to act. Last month, amid the impeachment drama, an overwhelming bipartisan majority of the House voted 410 to 13 in favor of H.R. 2534, the Insider Trading Prohibition Act. The bill is far from perfect — among other things, it sweeps too broadly, gives prosecutors too much discretion and does not explicitly replace the dizzying assemblage of existing insider-trading decrees — but just about any legislative definition of insider trading would beat the prevailing muddle. Once the Senate has moved impeachment off its calendar, it would do the country an immense favor by improving upon the House bill and finally passing a law that clearly and fairly defines insider trading.

Whether you consider insider trading a heinous crime or a victimless offense that contributes to market efficiency, if people are going to be prosecuted for it, the least we should expect is that the law be written by actual lawmakers.

Read more: