APY or UBI? Simulating Wealth Distribution and Inflation in Python

Updated 2025 Aug 25 by Likho (licho@firemail.cc)

For a long time, I believed money was a compensation for work provided. Therefore, someone who has no money or not enough can get some by working more or better.

Libre Currency without the jargon,1 https://vimeo.com/516365285

Before someone jumps to conclusions about “communism”, UBI is not completely alien to the current financial system.

Universal Basic Income (UBI) is an issuance algorithm for currency where each member is a co-creator of the currency, unconditionally earning a universal dividend.

This is different from

Fiat — dollars, euros, etc are created by the government taking a loan from the central bank.

Bitcoin — Bitcoins are generated by miners computing the next block in the bitcoin block chain; this is a emulation of precious metals mining in that the Earth’s crust carries a finite amount of metals.

This is also different from

Government welfare programs — these don’t change the relationship between the government and the central bank.

Although politicians have pitched a welfare program with the same combination of words, in this context, UBI does not exist to provide a basic living standard. The purpose of UBI is the issuance of currency based on the demand: the number of people and the amount of time that has passed.

Disclosure: I first wrote about a UBI cryptocurrency in 2023. I also use its market ğchange.

APY and UBI

Within the current financial system, a close analogue to Universal Basic Income is Annual Percentage Yield (APY).

To illustrate the difference between the current system and UBI, consider a basic economy where there are only three participants.

The total amount of money in this mock economy is 100 + 40 + 20 = 160.

Alice’s share of the total supply of money is 100/160 = 5/8 = 65.5%. Bob: 25% and Charlie: 12.5%.

Generally, the more money there in an account, the more money is paid each time as a dividend. The following table charts a simple model where each participant earns 5% of the principal over time.

name initial 1 2 3 share of wealth
0 Alice 100 105.0 110.25 115.7625 62.5
1 Bob 40 42.0 44.10 46.3050 25.0
2 Charlie 20 21.0 22.05 23.1525 12.5

(This chart lines up with results on an APY calculator if you give a term of 3 years.)

After 3 cycles, although the supply of money has grown, Alice’s share of wealth is still 65%. If Bob and Charlie wanted everyone to have an equal share of wealth, they would need to sell something to Alice.

With a linear relationship between the principal amount and the dividend, this model demonstrates the share of wealth is static over time if there are no exchanges between users. However, APY co-exists with APR.

As analogues to middle and lower class, Bob and Charlie might borrow from Alice for purchases such as a home or a car. Comparing the lenders who earn dividends and the borrowers who pay interest, the latter must trade time and energy for currency even though both of them are human and have a limited amount of time to live.

To contrast, here are the same initial conditions, but the UBI function is applied. The same three people will start with the same amount of money. Here they earn 10 units of currency each interval.

name initial 1 2 3
0 Alice 100 110 120 130
1 Bob 40 50 60 70
2 Charlie 20 30 40 50

At the end of t=3, the total supply of currency is 250 units. Alice’s wealth hasn’t been lost, but her share of the supply of currency has declined from 65% to 52%. Bob has the median wealth, yet his share has increased from 25% to 28%.

Just to continue the example, after t=999, even if no one trades anything Alice, Bob, and Charlie’s balances will look like [10090, 10030, 10010]. The share of wealth over time trends towards 33% (= 1/n, where n=3 in this example).

Inflation?

If everyone received x dollars each day (or month, year), wouldn’t that result in a lot of inflation?

The supply of currency will increase over time. Whether it is “a lot” is another story.

If the number of people in an economy is stable, then the growth in the supply of currency is linear. In the previous examples, 3 people received 10 units each; therefore, the total supply of currency increased each time by 30 units.

To contrast, under the central banking system that issues currency based on debt, the supply of currency grows exponentially. When the inflation of debt currency outpaces that of UBI depends on APY. In the given examples, inflation of debt currency surpases inflation of UBI before t=50.

Inflation is a common complaint, but inflation is not necessarily bad if the supply of currency meets the demand. If both the population and the supply of currency is increasing exponentially, then the evaluation of goods would more or less be stable. However, population growth can be logistic as the population meets carrying capacity.

The Code and Conclusion

Thanks for reading.

Hopefully, this dispels misconceptions about UBI as “communist”, a means to eradicate the middle class, or will result in worse inflation than before.

If you want to read the code that generated these charts and graphs, you can find it at:

https://git.32bit.cafe/likho/econ-demo

Note, the code doesn’t reflect real life 1:1. In real life, the central bank will raise or lower interest rates. Likewise, cryptocurrencies will implement UBI differently such as a relativistic unit or seasonal re-evaluation of the dividend.

Image Credits


  1. This is a good video, but she doesn’t explain inflation well.↩︎