This paper tries to explore some optimal funding policies for pension systems in a general equilibrium setting where funding affects returns on investment and wages through its impact on capital formation. This is done in the context of irregular demographic evolutions such as those expected in developed countries for the next century. Particular attention is given to the intergenerational welfare criterion which is used for designing optimal policies. It appears that funding receives low justification with a welfare criterion which assumes a high substitutability between consumptions of successive cohorts, implying a low concern for intergenerational equity. Funding is highly justified in the opposite case where a high level of consumption for some cohorts is not considered as a compensation for low consumption by others. However the optimal patterns of transfers and savings which are found in this latter case are not straightforward. Some simpler funding rules are explored in the last section of this paper, which show that non-optimal funding may imply, on the contrary, a high level of inequality between subsequent generations.