Sub topic 6
Inflation and deflation in game economies
This chapter assumes you know what sources and sinks are and can read short Python snippets. It builds on the previous chapter, which covered balancing inflow and outflow.
What the terms mean in a game
In a real economy, inflation is a rise in the general price level. Most games use fixed shop prices, so prices rarely move. What changes is purchasing power: how much play time a unit of currency represents.
- Inflation means currency piles up faster than players can spend it usefully. A 1,000-coin sword that once took three hours to afford now takes ten minutes, so the coin buys less meaning.
- Deflation means currency becomes scarce relative to what players want. Prices feel out of reach, and players hoard or stop spending.
In games with player trading, prices do move, and you can measure inflation directly as a price index. In games with fixed prices, you detect it from balances and flows.
The mechanism: stock, inflow, outflow
The total currency held by players is the stock. Each day, the stock changes by inflow minus outflow. If sources add more than sinks remove, the stock grows. If sinks remove more, the stock shrinks.
The shape of the sink matters as much as its size.
- A fixed sink removes the same amount each day, no matter how rich the player is. If it is smaller than income, the balance grows without limit.
- A proportional sink removes a share of the balance, such as a repair cost or fee. It removes more as the balance grows, so the balance settles at an equilibrium.
For income I per day and a sink that takes a share r of the balance after each day's earnings, the balance settles at I * (1 - r) / r. For I = 100 and r = 0.10, that is 900.
def simulate(days, income_per_day, sink_rate=0.0, fixed_sink=0.0, start=0.0):
"""Track one player's balance under a proportional and a fixed sink."""
balance = start
history = []
for _ in range(days):
balance += income_per_day
balance -= balance * sink_rate
balance = max(0.0, balance - fixed_sink)
history.append(round(balance, 2))
return history
def equilibrium(income, rate):
return income * (1 - rate) / rate
print("proportional:", simulate(60, 100, sink_rate=0.10)[-1]) # about 898, near 900
print("fixed (80/day):", simulate(60, 100, fixed_sink=80)[-1]) # 1200 and still rising
print("fixed (120/day):", simulate(60, 100, fixed_sink=120)[-1]) # 0.0, pinned at the floor
print("predicted:", equilibrium(100, 0.10)) # 900.0The three runs show three behaviors:
- A proportional sink gives a stable balance.
- A fixed sink below income gives unbounded growth, which is inflation.
- A fixed sink above income gives a balance pinned at zero, which is deflation.
The floor at zero (max(0.0, ...)) matters. A player cannot go below zero, so a sink that is too large either stops working or blocks purchases. Players feel that as a wall, not as a gentle slowdown.
Why inflation usually happens
Few designers choose inflation. It builds up from causes like these.
- Sinks saturate. Players buy every item they want. After that, the shop sink stops working while income continues.
- Earning rates rise over time. Higher-level zones pay more, and new events add rewards. Prices for old items stay fixed.
- Veterans out-earn the sinks. The sinks were tuned for a median player, but the top 5% earn many times more.
- Duplication or exploit bugs. These create currency outside the designed sources.
- Player pricing. In a trading economy, sellers raise prices as buyers get richer.
Deflation has its own causes:
- Sinks are too aggressive, such as high repair costs or taxes.
- A new-player experience that pays too little.
- Currency is lost when players leave and their balances become inactive.
- A hard cap on earning combined with growing prices.
A deflating economy can look healthy in the stock numbers, because the currency is simply stuck in idle accounts. Check active balances, not total balances.
Measuring it
Total supply alone misleads. A single whale holding 90% of the currency pushes the mean up while most players are poor. Track several metrics together.
| Metric | What it tells you | Inflation sign | Deflation sign |
|---|---|---|---|
| Net flow (earned minus spent) | Direction of the stock | Persistently positive | Persistently negative |
| Sink ratio (spent / earned) | How much of the inflow is removed | Well below 1 | Close to or above 1 |
| Median balance | What a typical player holds | Rising over weeks | Falling toward zero |
| Mean to median ratio | Concentration of wealth | Very high | Low or unstable |
| Time to afford a reference item | Purchasing power | Shrinking | Growing |
| Price index (trading games) | Actual market prices | Rising | Falling |
from statistics import mean, median
def economy_health(balances, earned_today, spent_today):
avg = mean(balances)
mid = median(balances)
return {
"mean": avg,
"median": mid,
"mean_to_median": round(avg / mid, 2),
"sink_ratio": round(spent_today / earned_today, 2),
"net_flow": earned_today - spent_today,
}
print(economy_health([100, 150, 200, 300, 9250], earned_today=5000, spent_today=3500))For these inputs, the mean is 2,000 and the median is 200, so the mean to median ratio is 10. The sink ratio is 0.7 and net flow is +1,500. Together these say that the supply is growing and a few accounts hold most of it. The mean alone would have hidden the second fact.
Watch trends, not single days. A weekend event can make one day's net flow spike without any structural problem.
Responses
Match the fix to the cause. Raising prices everywhere is rarely the right first move, because it punishes players who are not rich.
| Problem | Cause | Response |
|---|---|---|
| Inflation from saturated shops | Players own everything | Add repeatable sinks, such as consumables, upgrades with rising cost, and cosmetics |
| Inflation from a rich top tier | Fixed sinks do not scale | Add proportional sinks, such as fees, taxes, or costs tied to level |
| Inflation from rising rewards | Reward creep | Cap or scale rewards, and review every new source against the sink budget |
| Inflation from an exploit | Duplication or loops | Fix the bug, audit the ledger, and roll back affected balances |
| Deflation from heavy sinks | Costs too high | Reduce sink rates or add an earning route for new players |
| Deflation from inactive accounts | Currency idle in dormant wallets | Measure active balances only, and consider limited-time reward events |
Edge cases
- Slow inflation is easy to miss. A 1% weekly surplus looks harmless, but over a year it compounds to a large stock. Review long-run trends.
- Dormant accounts still hold currency. If those players return, their balances re-enter the economy under new prices. Consider that when you rebalance.
- Currency conversion leaks. If one currency can be exchanged for another, inflation in one spreads to the other. The conversion chapter covers this.
- Player-driven prices overshoot. In trading games, expectations drive prices, so a small surplus can cause a large price jump. Sinks such as listing fees dampen this.
- Some inflation is acceptable. A mild rise in income as players progress is normal, as long as new content offers new things to spend on.
Exercise
A player earns 200 coins per day. A sink removes 25% of the balance after each day's earnings. (a) What balance does the player settle at? (b) If you replaced the sink with a fixed charge of 40 coins per day, what happens to the balance, and which problem is that?
Show answer
(a) Use I (1 - r) / r = 200 0.75 / 0.25 = 600 coins. (b) The fixed charge of 40 is smaller than the income of 200, so the balance rises by 160 coins per day without limit. That is inflation. A fixed sink only stabilizes the balance if it equals or exceeds income, and if it exceeds income, the balance falls to zero, which is deflation.
Exercise
Your telemetry shows total currency supply rising 3% per week, but the median balance is falling. What two things do these numbers suggest, and what metric would you check next?
Show answer
Currency is concentrating in a small group of accounts, such as veterans, exploiters, or traders, while typical players are getting poorer. The economy may be inflating for the top tier and deflating for everyone else. Check the mean to median ratio and the balance distribution by player segment, and look at the sources of the top accounts' income to rule out an exploit.