Sub topic 3
Measuring concentration: top-N share and Gini
This chapter assumes you can read simple Python, know what a wallet address is, and understand averages and percentiles. It covers two concentration measures, a supply-by-age view, and how to read these metrics together.
Top-N share
Top-N share is the fraction of total supply held by the N largest addresses. A top-10 share of 0.60 means the ten largest balances hold 60% of the supply. The measure is easy to compute, but it ignores everything below the cutoff.
Gini coefficient
The Gini coefficient summarizes how unequal a set of balances is. It ranges from 0, where every address holds the same amount, to values near 1, where almost all supply sits in very few addresses.
def top_n_share(balances, n):
total = sum(balances)
return sum(sorted(balances, reverse=True)[:n]) / total
def gini(balances):
xs = sorted(balances)
n = len(xs)
total = sum(xs)
weighted = sum(i * x for i, x in enumerate(xs, start=1))
return 2 * weighted / (n * total) - (n + 1) / n
balances = [10, 10, 10, 70]
print(top_n_share(balances, 2)) # 0.8
print(gini(balances)) # 0.45Supply by age and long-term holders
Supply-by-age views group coins by how long they have been stationary. Analysts often treat coins that have not moved for a year as held by long-term holders. The table below uses illustrative numbers, not real market data.
| Coins unmoved for | Share of supply |
|---|---|
| Less than 1 month | 22% |
| 1 to 12 months | 18% |
| 1 to 2 years | 15% |
| More than 2 years | 45% |
A large old-supply share may suggest holders are not selling. It may also mean coins are locked in custody, lost, or held by a single entity that splits its funds across many addresses.
Reading metrics together without overclaiming
Combine metrics only after checking each one. Common errors include:
- Treating a high top-N share as proof of manipulation, when it may reflect exchange custody.
- Comparing Gini values computed over different address sets or time windows.
- Reading a rise in active addresses as adoption without checking for spam or address splitting.
- Ignoring labeling error, since a single missed exchange label can change exchange flows substantially.
Use one consistent time window and label set across all metrics before comparing them.
Exercise
Using the balances [5, 5, 10, 80], what are the top-2 share and the Gini coefficient? Give both values.
Show answer
The top-2 share is (80 + 10) / 100 = 0.90. For the Gini, sorted balances are [5, 5, 10, 80], total is 100, and the weighted sum is 15 + 25 + 310 + 480 = 365. Then 2 365 / (4 100) - 5/4 = 1.825 - 1.25 = 0.575.