J.P. Morgan Chase is nearing a settlement with federal regulators over the bank's ties to convicted fraudster Bernie Madoff, reports The New York Times. The deal would involve penalties of up to $2 billion dollars and a rare criminal action. The government intends to use the money to compensate Madoff's victims.

For two decades before his arrest, Madoff had banked with J.P. Morgan — and apparently laundered up to $76 billion through the bank. Employees at the bank had raised concerns about Madoff's business. In 2006, a J.P. Morgan employee wrote after studying some of Mr. Madoff's trading records that "I do have a few concerns and questions," and expressed worry that Madoff would not disclose exactly which trades he had made. Madoff's company turned out to be an elaborate ponzi scheme that stole an estimated $18 billion from clients; it collapsed in 2008.

Is it fair to blame J.P. Morgan for the activities of Madoff? Do banks have a responsibility to know if their clients are involved in criminal activities? I think so — banks should have strong checks and balances to prevent fraud and money laundering, because if they don't then criminals like Madoff can get away with it for years and years. According to Robert Lenzner of Forbes, "J.P. Morgan never reported to the Treasury or the Federal Reserve a huge cache of checks going back and forth for seven years between Madoff's Investment Account 703 and Bank Customer Number One, belonging to real estate developer Norman Levy, who died in 2005."

By agreeing to pay the fine and the government's rebuke, J.P. Morgan is admitting a failure of oversight. But it's not as if J.P. Morgan is the only one to blame. Others on Wall Street had expressed concern about Madoff's business much earlier. In fact, the SEC Inspector General discovered no less then six "red flags" that should have been turned into investigations, but weren't.

There was financial analyst Harry Markopolos who warned the SEC in 2000 that Madoff's gains were impossible unless they were illegal. He was ignored. A lawyer at the SEC, Genevievette Walker-Lightfoot told her higher ups that Madoff needed questioning. She was told to halt her investigation into his affairs.

If the government regulators had done their job and cracked open Madoff's books when Markopolos had made his allegations or when Walker-Lightfoot had recommended further questioning, then the Madoff ponzi could have ended years before it did. According to the New York Daily News, Madoff himself said "it would've been easy for them to see" that he was running a Ponzi scheme, if they had bothered to check. "I was astonished," he said. "They never even looked at my stock records."

In the wake of the Madoff scandal, the SEC promised to clean up its act, and the head of its enforcement division, Linda Thomsen, resigned. But is that enough?

There's no doubt that J.P. Morgan deserve blame — after all, the bank profited from Madoff's money flowing through it. But probably not half as much blame as the regulators themselves, who have been caught sleeping at the wheel on multiple occasions.

Editor's note: This article has been revised since it was first published in order to more clearly include proper attribution to source material.