Sub topic 9
Measuring Concentration: Top-N Share and Gini
This chapter assumes you understand wallet addresses, token balances, transactions, and basic statistics. It also assumes that you can read simple Python. The goal is to measure how evenly a token’s supply is distributed across labeled balances.
A concentration metric describes ownership structure. It does not identify who controls an address unless you have reliable entity labels. One person may control many addresses, and one address may represent an exchange, custodian, smart contract, or many users.
What a balance distribution measures
Start with a snapshot of balances at one block or time:
| Address | Balance |
|---|---|
| A | 1 |
| B | 5 |
| C | 10 |
| D | 84 |
The total supply in this example is 100. Address D holds 84% of the listed supply, so ownership is highly concentrated.
A balance distribution is a set of balances associated with addresses or entities. The unit matters:
- Address-level distribution counts every address separately.
- Entity-level distribution combines addresses believed to belong to the same organization or owner.
- Circulating-supply distribution excludes balances such as burned tokens or some locked contracts.
- Total-supply distribution includes every balance recorded by the ledger.
These choices can produce very different results.
Top-N share
Top-N share is the fraction of supply held by the largest N balances:
\[ \text{Top-N share} = \frac{\text{sum of the N largest balances}}{\text{total measured supply}} \]
For the example above, the top two addresses hold \(84 + 10 = 94\) tokens. The top-two share is \(94 / 100 = 94\%\).
This metric is easy to explain, but the choice of N is important. Top one, top ten, top 100, and top one percent answer different questions. A top-10 value also depends on whether exchange wallets and protocol contracts are included.
A useful analysis reports the definition with the result, such as “top-10 address share of nonzero balances at block 2,000,000.” Without that context, the number is difficult to compare.
The Gini coefficient
The Gini coefficient summarizes inequality across all included balances:
- 0 means every included balance is equal.
- Higher values mean that more supply is held by fewer balances.
- A value near 1 indicates extreme concentration.
For sorted balances \(x1 \leq x2 \leq \dots \leq x_n\), one common formula is:
\[ G = \frac{2\sum{i=1}^{n} i xi}{n\sum{i=1}^{n}xi} - \frac{n+1}{n} \]
The coefficient is useful when you want to use the full distribution rather than choose a single cutoff. It still does not tell you whether large balances belong to one person, many customers of an exchange, or a protocol treasury.
def top_n_share(balances, n):
if not balances or n < 1:
raise ValueError("balances must be non-empty and n must be positive")
total = sum(balances)
if total <= 0 or n > len(balances):
raise ValueError("invalid total or n")
return sum(sorted(balances, reverse=True)[:n]) / total
def gini(balances):
if not balances or any(balance < 0 for balance in balances):
raise ValueError("balances must be non-empty and non-negative")
total = sum(balances)
if total == 0:
raise ValueError("total balance must be positive")
xs = sorted(balances)
n = len(xs)
weighted = sum(i * balance for i, balance in enumerate(xs, start=1))
return 2 * weighted / (n * total) - (n + 1) / n
balances = [1, 1, 2, 5, 10, 100, 881]
print(f"Top-two share: {top_n_share(balances, 2):.2%}")
print(f"Gini coefficient: {gini(balances):.3f}")The code treats each supplied balance as one observation. Zero-balance addresses should usually be excluded because including a large number of empty addresses changes the distribution without changing ownership of the supply. State this choice explicitly.
Entity labels and common errors
The largest source of error is confusing addresses with holders. An exchange may use one deposit address per customer, making a large user base look distributed across many addresses. Conversely, one organization may spread its holdings across several wallets and look less concentrated than it is.
Other common errors include:
- Counting liquidity pools, bridges, burn addresses, or vesting contracts as ordinary holders.
- Comparing top-10 shares when one dataset includes contracts and another excludes them.
- Comparing snapshots from different dates without accounting for unlocks, airdrops, or migrations.
- Using raw token units for one asset and normalized percentages for another.
- Treating a high Gini coefficient as proof of market manipulation.
A better report separates categories where labels are reliable. For example, report concentration among all addresses, then among externally owned accounts, and then among identified entities. Keep the same block selection, supply denominator, and balance filters across time.
Interpreting concentration with other metrics
Concentration becomes more informative when combined with holder age, transfer volume, and exchange flows. A high top-10 share with old, inactive balances suggests a different situation from a high share in recently funded exchange wallets. A falling Gini coefficient may reflect genuine distribution, or it may result from one holder splitting funds across many new addresses.
Use several time windows:
- A snapshot shows the current ownership structure.
- A time series shows whether concentration is rising or falling.
- Cohorts show whether large holders are long-term holders, recent buyers, or labeled entities.
Treat sharp changes as prompts for investigation. Check token migrations, contract upgrades, exchange wallet relabeling, and large internal transfers before assigning an economic interpretation.
Exercise
A token has balances [10, 10, 20, 60]. What are the top-two share and the Gini coefficient, and what limitation remains if the 60-token address is an exchange omnibus wallet?
Show answer
The top-two share is (60 + 20) / 100 = 80%. The Gini coefficient is 0.40 using the formula in this chapter. The result may overstate concentration among individual people because one exchange address can hold funds for many customers.