Sub topic 9
Building a circulating supply model
This chapter assumes you have read the earlier chapters on supply metrics, emission schedules, allocations, and vesting. It also assumes you can read short Python functions. You will turn an allocation table and its vesting terms into a month-by-month circulating supply series. You will also learn where such models usually go wrong.
What the model is for
Circulating supply is the number of tokens that can trade today. It changes every month as vesting contracts release tokens, as the protocol emits new ones, and as burns remove them. A spreadsheet or script that tracks this number lets you answer three questions:
- How much supply is circulating now, and how much will be circulating in 6 or 12 months?
- How large is each upcoming release compared with what already circulates?
- Which months carry the largest supply growth?
The model is a sum over independent allocations, which keeps it simple:
circulating(t) = sum over allocations of unlocked(allocation, t)
+ cumulative emissions(t) - cumulative burns(t)Each allocation (team, investors, community, treasury) has its own function of time. You add the functions together.
Step 1: Collect the inputs
For each allocation you need five facts. Write them down before you write any code.
| Input | Meaning | Example |
|---|---|---|
| total | Tokens assigned to the allocation | 200 (million) |
| tge_pct | Percent released at the token generation event (TGE) | 0 |
| cliff | Months after TGE before anything more is released | 12 |
| linear | Months over which the remainder releases | 36 |
| unit | Time grain of the model | months |
Take these from the project's documentation, then check them on-chain, as a later chapter explains. Treat every unverified number as an assumption and label it as one.
Step 2: Write the unlock function
The function below follows one rule for each allocation. At the TGE, tge_pct of the total is released. Nothing more is released until the cliff ends. After the cliff, the rest is released in equal steps until cliff + linear months have passed. After that, everything is released.
allocations = [
{"name": "team", "total": 200, "tge_pct": 0, "cliff": 12, "linear": 36},
{"name": "investors", "total": 150, "tge_pct": 0, "cliff": 12, "linear": 24},
{"name": "community", "total": 400, "tge_pct": 10, "cliff": 0, "linear": 48},
{"name": "treasury", "total": 250, "tge_pct": 0, "cliff": 6, "linear": 36},
] # amounts in millions of tokens; cliff and linear in months
def unlocked(a, month):
tge = a["total"] * a["tge_pct"] / 100
if month < a["cliff"]:
return tge
if month >= a["cliff"] + a["linear"]:
return a["total"]
return tge + (a["total"] - tge) * (month - a["cliff"]) / a["linear"]
def circulating(month):
return sum(unlocked(a, month) for a in allocations)
for m in (11, 12, 13):
before, after = circulating(m - 1), circulating(m)
print(m, round(after, 1), f"{(after - before) / before:.1%} increase")Running it prints:
11 157.2 10.1% increase
12 171.7 9.2% increase
13 197.9 15.3% increaseThe 15.3% jump at month 13 appears because the team and investor allocations start releasing at the same time. Before that, only the community and treasury allocations release tokens. Supply grows by a few percent a month at first. In the first month after the cliffs end, it grows by about 15%.
Two details of this code matter:
- The
month < cliffcheck returns only the TGE amount. If the cliff is 0, the check never fires and linear release starts at once, which is correct for the community allocation. - At
month == cliff, the linear term is zero, so the linear part has released nothing yet. The first linear step appears one month later. Whether a real contract matches this convention is something you must check (see below).
Step 3: Choose the cliff convention
Projects describe cliffs in two ways, and they give different numbers.
- Smooth cliff. Nothing releases until the cliff date, then tokens accrue linearly from the start of the cliff period or from the cliff date. The code above starts accrual at the cliff date.
- Lump cliff. A fixed share, often 25% of the allocation, releases all at once on the cliff date. The rest releases linearly afterward.
The lump version has a much bigger first-month effect. The next block compares both for the team allocation.
def unlocked_smooth(total, tge_pct, cliff, linear, month):
tge = total * tge_pct / 100
if month < cliff:
return tge
if month >= cliff + linear:
return total
return tge + (total - tge) * (month - cliff) / linear
def unlocked_lump(total, tge_pct, cliff, lump_pct, linear, month):
tge = total * tge_pct / 100
lump = total * lump_pct / 100
if month < cliff:
return tge
if month >= cliff + linear:
return total
return tge + lump + (total - tge - lump) * (month - cliff) / linear
for m in (11, 12, 13, 24):
s = unlocked_smooth(200, 0, 12, 36, m)
l = unlocked_lump(200, 0, 12, 25, 36, m)
print(f"month {m}: smooth {s:.1f}, lump {l:.1f}")The output is:
month 11: smooth 0.0, lump 0.0
month 12: smooth 0.0, lump 50.0
month 13: smooth 5.6, lump 54.2
month 24: smooth 66.7, lump 100.0Both versions agree before month 12 and again at month 48, where the full 200 has been released. In between, the lump version releases 50 million tokens at once and stays ahead of the smooth version. Which one you use changes the size of the month-12 event from zero to 50 million tokens. Get this from the contract or the official terms. Do not guess.
Step 4: Add emissions and burns
Vesting only moves existing tokens from locked to liquid. Emissions create new tokens, and burns destroy them. Handle these as separate series so you can see each effect.
- Emissions such as staking rewards add to circulating supply as they are paid out. Model them as an extra allocation with a rate: a fixed amount per month, or a percentage of current supply.
- Burns subtract from circulating supply. Use a measured burn rate, or leave burns out of the base case and add them as a scenario.
- Net issuance is emissions minus burns. If burns exceed emissions in a month, circulating supply can fall even when no tokens are locked.
Keep the series separate in your data and add them only when you report totals. A reader can then tell whether growth comes from vesting or from inflation.
Step 5: Compare the result with total supply
Dividing circulating supply by total or maximum supply gives the share that is liquid. With the table above, month 6 gives 85 million of 1,000 million tokens, or 8.5%. A low share early on is normal, but it has consequences:
- A small float can make the market cap look small while the fully diluted valuation stays high.
- Each later release is large relative to what already trades, so growth rates are high.
- The growth rate falls over time. A model that shows the growth rate month by month shows when the pressure is highest.
Report growth as a percentage of circulating supply, not only in tokens. A 26 million token release means little until you compare it with the 172 million already trading. The next chapter does that comparison against trading volume.
Common errors
- Mixing units. If the cliff is in months and the duration is in days, the result is wrong without any error message. Use one unit throughout.
- Counting locked tokens as circulating. Some data sources count treasury tokens as circulating, and others do not. Decide on a definition and apply it to every allocation.
- Ignoring TGE unlocks. An allocation with 10% at TGE adds supply on day 0. Omitting it understates early supply.
- Forgetting that schedules vary. The team and investor schedules often differ. Give each its own cliff and duration.
- Using month steps for daily contracts. Many on-chain contracts release per second or per block. A monthly model is an approximation. It is fine for planning, but it can mislead if you need to know the exact day of a release.
- Floating-point rounding. Python floats are fine for estimates. On-chain contracts use integer division, which rounds down. When you compare your model with a contract, use integer math and expect small differences.
- Assuming the schedule cannot change. Governance can alter treasury schedules, and some vesting contracts are revocable. Note which allocations are fixed and which are not.
Checking the model
Run three sanity checks each time you build a model:
- Add up every allocation
total. It should equal the total (or maximum) supply, unless emissions supply the remainder. - Evaluate
circulatingat a month beyond all vesting periods. It should equal that sum. - Evaluate it at month 0 and compare it with the circulating supply that a data provider reports at launch. If the two differ, find out why before you continue.
Exercise
Using the four allocations in Step 2, what is circulating supply at month 6, and what share of the 1,000 million total is that?
Show answer
Only the community and treasury allocations can release anything by month 6. Community: 40 at TGE plus 360 × 6 / 48 = 45, so 85. Treasury: its cliff ends at month 6, so the linear part is 250 × 0 / 36 = 0. Team and investors are still inside their 12-month cliffs. Circulating supply is 85 million, which is 8.5% of 1,000 million.
Exercise
The team allocation of 200 million tokens uses a lump cliff of 25% at month 12, then linear release over 36 months. How many team tokens have been released at month 24?
Show answer
The lump is 200 × 25% = 50. The remaining 150 releases over 36 months. After 12 months of linear release, 150 × 12 / 36 = 50 more have been released. The total is 50 + 50 = 100 million tokens.