Judge Colleen McMahon said the deal with Madoff’s customers meets the standards for final approval and provides “substantial and immediate” benefits to his victims. The judge also awarded $18 million in legal fees to the law firms representing the plaintiffs.

JPMorgan, Madoff’s primary bank for more than 20 years, has agreed to pay a total of $2.25 billion to Madoff-related cases, including a $1.7 billion civil settlement with the U.S. government and $325 million settlement with Irving Picard, the trustee liquidating Madoff’s former company, Reuters reports.

Madoff, who lost an estimated $17.3 billion of customers’ investments, is serving a 150-year prison term.