If it is done the way government pension funds are funded, it works like this. You give extravagant promises in doling out pension perks based on extremely optimistic rates of returns on investing the pension funds, say a 15 to 20 percent return per year. Even though market realities return more like 1 to 5 percent return per year. And you continue telling everyone the low returns are an anomaly... year after year while promising lots of pension benefits. And that is how it becomes underfunded.
Close, the public masters get together with the Union bosses and create a slave contract granting themselves first rights to the fruits of labor of future generations. The courts,Congress,state legislatures All go along with this great plan of Involuntary Servitude uopn the Citizenry, because They are the beneficiaries.