Interestingly, many madoff victims had paid tons of federal gains taxes on the fictional gains and were unable to get the money back from the government.
Ultimately the US government is the party that gained the most financially from Madoff's scheme!
That's true for the numbers used when reporting on Bernie Madoff's Ponzi scheme. Much of the $50B was fictional gains.
There were even clawbacks on the gains of those who withdrew before the collapse.