JPMorgan will pay $218 million to resolve class-action litigation and $325 million to resolve claims brought by the trustee, Irving Picard, who has estimated that the Ponzi scheme — the largest in history — cost investors over $17 billion. To date, he has recovered more than $10 billion for victims, including the JPMorgan settlement.

“The amount of the accord indicated there was a value to the claims and the compromise made good sense,” David Sheehan, a lawyer for Picard, said in a statement. “There is no guarantee Picard will win at the Supreme Court.”

According to a spokeswoman for the trustee liquidating Bernard L. Madoff Investment Securities LLC, Judge Stuart Bernstein approved the agreement, which was made public on January 7, the same day federal authorities announced the bank had agreed to pay over $2 billion to settle charges.

Madoff was a longtime client of the bank, which was accused of turning a blind eye to suspicious activity within his accounts that suggested fraud. Back in 2009, Madoff pleaded guilty and is now serving a 150-year sentence. Not to mention the fact that five of his former aides are on trial in New York federal court on charges that they helped Madoff perpetuate his scheme.

“The settlements are fair, reasonable and in the best interest of the Madoff estate,” Bernstein told Bloomberg. “The deals provide substantial benefit to victims.”

JPMorgan recorded about $20 billion of legal settlements in 2013, including $13 billion to resolve claims related to mortgages it packaged leading up to the financial crisis.

The liquidation case is Securities Investor Protection Corp. v. Bernard L. Madoff Investment Securities LLC, 08-bk-01789, U.S. Bankruptcy Court, Southern District of New York.

For more on JPMorgan Chase & Co. legal news, check out these articles:

JPMorgan’s CEO gets pay bump despite 2013 legal woes

How risky are JP Morgan’s litigation claims for 2014? Analysts weigh in

Should JPMorgan separate Jamie Dimon’s CEO and chairman roles?

JPMorgan Chase to pay $2.6 billion to resolve Madoff allegations