WHEN bankruptcy trustees were appointed over a hectic weekend late in 2008, there seemed no end to the losses caused by the collapse of Bernie Madoff’s Ponzi scheme. Cash in the bank was no more than $150m. But the losses have been less, and the assets available for compensation greater, than had been feared.

On February 22nd Irving Picard, the bankruptcy trustee overseeing the liquidation of Mr Madoff’s firm, announced that a fund set up to reimburse customers would make its ninth distribution, of $621m, bringing the total handed out so far to $11.4bn. Another $1.8bn is held in reserve for contested claims. This is on top of a separate distribution of $723m last November from a separate fund run by the Department of Justice. Another $3bn remains to be distributed in that fund and the bankruptcy trustees hold out hope that substantially more will be recovered and returned.

Mr Madoff, who will turn 80 in April, is serving a 150-year sentence in a North Carolina prison. At his trial former Madoff employees said they had created fake trades as early as the 1970s. The fraud was able to continue for so long because Mr Madoff had a remarkable ability to attract money and deflect regulators. It helped that some of his customers were non-profit organisations, which typically withdraw just a small share of their money each year. When the edifice collapsed clients lost homes and retirement savings. Some charities had to close their doors; others, though they survived, were thrown into convulsions. One of Mr Madoff’s sons later committed suicide, as did a son of David Friehling, his accountant. Mr Friehling had entrusted Mr Madoff with his savings and pleaded guilty to rubber-stamping the Madoff fund’s accounts.

Even working out the number of people who suffered losses has been tricky. The bankruptcy trustee received 17,000 claims, which were winnowed down to 2,300. The Justice Department received 66,000, reduced to 39,000. The difference is one of definitions—the bankruptcy trustee looks at direct account-holders, which may encompass many investors, whereas the Justice Department looks at individuals who lost money, even if they invested indirectly through a fund.

Each of the account-holders in the bankruptcy action have received at least $1.4m and in total, 64% of claims have been covered. Full satisfaction would require $4bn-5bn more, plus the money held in reserve. The Justice Department sent cheques to 25,000 in an initial distribution and will send more money to more people soon. But a full reimbursement would require perhaps another $10bn.

At times, the two funds have shared in settlements, including early in their work, with billions of dollars received from J.P. Morgan, where Mr Madoff had accounts, from the widow of one of his close associates and more recently from the estates of his two sons. But they have also drawn money from different sources. The proceeds of selling Mr Madoff’s home and art collection, for example, went to the Justice Department under the rules of forfeiture.

The bankruptcy trustees have operated by suing entities that may not have done anything illegal but whom they regard as having received inappropriate payouts—notably money that purported to be investment returns but was, under the Ponzi scheme, in reality simply another client’s money. This has been a vast operation, occupying up to 300 lawyers at one point, and now perhaps 100. The past year has been particularly successful, with $1.1bn recovered from three investment funds.

Efforts are under way to recover up to $5bn from overseas funds in several countries, including several offshore tax havens but also Britain, Ireland, Israel, Switzerland and Luxembourg. An appeal due to be heard later this year in the second circuit federal court in New York raises profound questions about the reach of American law into other countries and whether the trustees have the power to require money to be returned. More than 30 major law firms are involved in the case.

The total amount involved in the Madoff affair is now thought to be in the range of $25-30bn, not including lost returns which, given compounding, would more than double that amount. Someone familiar with the fund run on behalf of the Justice Department predicts that the distribution will be completed by the end of 2019. The bankruptcy trustee is working to an entirely different time-frame, with the current litigation possibly dragging on for another several years. The scam ran for decades. It is perhaps not surprising that it will take additional decades to bring this sorry tale to a close.