Charging for citizenship

What if a country charged for citizenship? not only for those entering the country after birth, but also for those being born within the country. Assuming the primary purpose of this money is to be used as a safety net for a citizens retirement or indigence. 

For example, lets say one citizenship costs $20,000. At a 5% annually compounded interest rate over 60 years the return on that investment is close to $375,000. 

Questions that come to mind: Is that enough to retire on? What about in 60 years? Would this reduce unwanted pregnancies? Are there ethical implications (besides the obvious)? Would this create “black market births”? Could that be overcome? Would there be any place for exceptions? What might those be? Who would determine the cost of citizenship? Could this be done on a sliding scale? Would this create predatory lending practices or could this be exploited by others? What would be the penalty of not paying this money? Who would be responsible for collecting? How would that look? Would there be any considerable benefit to doing so? who would control this money and would there be restrictions on who could spend it? how it was spent? when it was payed out? what would happen to those that died before collecting it? what if a person left the country and decided to live elsewhere? what if a person committed a crime and civil penalties were levied against them? how would this impact the class system? 

What, in general, might this type of system look like and what could its potential benefit be to a nationstate, to an individual, to a society as a whole? what would the stick and carrot look like? 

I’d love to know the answers.