Sub topic 9
Defining and Finding Large Holders
This chapter assumes you can read basic Python. You should also know what an address, a transaction and a token balance are. It also assumes you have seen the earlier chapters on UTXO and account models, address clustering and entity labeling. Here you turn those pieces into a working definition of a "large holder" and a repeatable way to find them.
What "large" means
"Whale" has no standard definition. Every analysis has to choose one, and the choice changes the result. There are four common ways to choose.
| Definition | Example rule | Strength | Weakness |
|---|---|---|---|
| Absolute balance | At least 1,000 BTC | Easy to explain and stable over time | Ignores the token's supply, so it is useless across assets |
| Share of supply | At least 0.1% of circulating supply | Works across assets | Depends on a supply figure that is itself uncertain |
| Rank | Top 100 holders | Always returns a fixed-size list | The cutoff balance can be tiny on a small token |
| Market impact | Balance larger than N days of trading volume | Ties "large" to what the holder could move | Needs reliable volume data, which varies by venue |
For tracking flows, share of supply or market impact usually fits best. Large relative to the market is what matters for price effects. A 500 ETH balance is large for a small governance token and trivial for ETH.
Whichever rule you pick, record it. A statement like "whales sold" is not reproducible unless you also say which threshold and which supply figure you used.
The unit is the entity, not the address
A ledger lists balances per address, but a person or organization often controls many addresses. If one holder splits 10,000 coins across 20 addresses of 500 each, an address-level threshold of 1,000 misses all of them. The holder is in fact one of the largest on the chain.
So the pipeline for finding large holders works on entities:
- Collect balances per address.
- Remove addresses that are not real holders.
- Merge addresses into entities, using clustering and labels.
- Apply the threshold to entity totals.
- Review the top of the list by hand.
Addresses that look like whales but are not
The biggest balances on most chains do not belong to investors. Step 2 of the pipeline removes these categories before ranking:
- Exchange wallets. Hot, warm and cold wallets hold customer funds. Treat them as a separate category, since they are the subject of flow analysis, not of holder analysis.
- Custodians and ETF vaults. These hold assets for many clients. A single address can represent thousands of owners.
- Smart contracts. Staking contracts, bridges, lending pools, wrapped-token contracts and DEX pools often top the holder list of an Ethereum token. They are balances in transit or in use, not a holder's conviction.
- Burn and mint addresses. The zero address and known "dead" addresses hold tokens that are out of circulation. In an event-log model, the mint source shows a negative running balance, which is an artifact.
- Treasury and team wallets. These are real holders, but their behavior differs from market participants. Keep them, with a label, instead of deleting them.
Excluding a category is a modeling choice. Labeling is better than deleting: keep a kind field on each entity (for example exchange, contract, custodian, individual_or_unknown) so you can decide per analysis.
Finding holders from transfers
If you cannot get a ready-made holder list, you can rebuild balances from transfers. This works well for account-model tokens, where the transfer events already carry sender, receiver and amount. The next section covers where the data comes from in practice.
The function below rebuilds balances, skips the mint address, merges addresses into entities, excludes unwanted entities and applies a share-of-supply threshold.
from collections import defaultdict
ZERO = "0x0"
def balances_from_transfers(transfers):
"""transfers: dicts with 'from', 'to', 'amount'. Mints come from ZERO."""
bal = defaultdict(int)
for t in transfers:
bal[t["from"]] -= t["amount"]
bal[t["to"]] += t["amount"]
return bal
def find_large_holders(balances, entity_of, excluded, min_share):
"""Return (entity, total, share) rows at or above min_share of supply.
entity_of: address -> entity name; unmapped addresses are their own entity.
excluded: set of entity names to leave out (exchanges, contracts, ...).
"""
supply = -balances.get(ZERO, 0) # total minted, since ZERO went negative
if supply <= 0:
return []
totals = defaultdict(int)
for addr, amount in balances.items():
if addr == ZERO or amount <= 0:
continue
totals[entity_of.get(addr, addr)] += amount
rows = [
(entity, total, round(total / supply, 3))
for entity, total in totals.items()
if entity not in excluded and total / supply >= min_share
]
return sorted(rows, key=lambda r: r[1], reverse=True)
transfers = [
{"from": ZERO, "to": "A", "amount": 1000},
{"from": ZERO, "to": "B", "amount": 500},
{"from": "A", "to": "B", "amount": 200},
{"from": "A", "to": "ex_hot", "amount": 300},
{"from": "B", "to": "C", "amount": 100},
{"from": ZERO, "to": "D", "amount": 50},
]
entity_of = {"A": "entity1", "C": "entity1", "ex_hot": "ExchangeA"}
balances = balances_from_transfers(transfers)
print(find_large_holders(balances, entity_of, {"ExchangeA"}, 0.10))Running it prints [('entity1', 600, 0.387), ('B', 600, 0.387)]. Entity entity1 combines addresses A (500) and C (100). Neither address alone would show it as the joint largest holder. The exchange hot wallet holds 300 but is excluded, and D holds 50, which is below the 10% threshold of 155.
The code makes several simplifying choices that real data will break:
- Amounts are integers, as token amounts are on chain (in the smallest unit). Convert to decimals only for display.
- Rebuilding from the full history is only correct if you start at the first block of the token. A partial window gives you changes, not balances.
- Tokens that rebase, charge transfer fees or burn on transfer do not conserve amounts through
Transferevents. Reading the balance directly from the contract is safer for those.
Where to get holder data
You have three practical routes, and each fits a different need.
- Replay events from a node. Fetch
Transferlogs and build balances as above. You control every step, but a busy token has millions of events, and you must handle chain reorganizations near the chain tip. - Query a node for current balances. Ask the contract for
balanceOfon candidate addresses. This is exact for the addresses you ask about but cannot tell you which addresses to ask about. - Use an explorer or analytics API. Holder-list endpoints return top holders directly. They are convenient, but you inherit their labels, their supply figure and their exclusion rules, which are often undocumented.
On UTXO chains such as Bitcoin, there is no per-address balance in the protocol. Balances are sums of unspent outputs, so you need a UTXO set (or an indexer that maintains one) and then group outputs by address. Clustering matters even more here, because wallets routinely spread funds over many addresses and use fresh change addresses.
Judging the result
A large-holder list is a hypothesis, so check it before using it.
- Sanity-check the top ten by hand. Look each one up on an explorer. Is it a contract? Does it have a label? Does it receive from and send to an exchange in a regular pattern?
- Check that shares add up. If the sum of all balances does not match supply, your window, your mint handling or your decimals are wrong.
- Look at balance age. An address that received its tokens yesterday from an exchange withdrawal is a different kind of holder from one that has not moved in three years. Keep the first and last activity timestamps next to each entity.
- Track uncertainty. Mark an entity as merged by a heuristic, by a published label or by a manual decision. Heuristic merges can be wrong, and a wrong merge inflates one entity and deletes another.
- Re-run on a schedule. Holder lists go stale. Threshold crossings are only meaningful when you compare against the same method on the previous run.
Choosing a threshold
Pick the threshold by looking at the distribution of balances, not by guessing. Sort entity totals and look for where the curve flattens. If the 50th holder has 0.02% of supply and the 200th has 0.004%, a 0.1% rule gives a short, focused list, and a 0.01% rule gives a long one that mostly contains noise. Alerts built on the list (a later chapter) will fire more often as the list grows, so the threshold also sets your alert volume.
For assets with a small circulating float, check whether the supply figure includes locked or vested tokens. A holder with 5% of total supply may have 30% of what is actually tradable.
Exercise
A token's holder list shows the largest address holds 22% of supply. List three checks you would run before calling this address a whale, and say what result of each would change your conclusion.
Show answer
(1) Check whether the address is a contract, such as a staking, bridge or wrapped-token contract. If it is, the balance belongs to many users, so it is not one whale. (2) Check labels and counterparties for an exchange or custodian. If it is one, the balance is customer funds and belongs in flow analysis. (3) Check the supply figure and whether the address holds locked or vested tokens. If the supply figure is too high, or the tokens are locked, the real share of tradable supply differs. Checking for other addresses controlled by the same entity could raise the figure further.
Exercise
In the code above, why does find_large_holders compute supply as -balances.get(ZERO, 0), and what goes wrong if you rebuild balances from only the last 30 days of transfers?
Show answer
Every mint is a transfer from ZERO, so ZERO's running balance is the negative of everything minted. Negating it gives total supply. With only the last 30 days of transfers, the result is net change over that window, not balances. Holders who did not move tokens in that window are missing. The supply figure would be only the amount minted in those 30 days. Shares would then be wrong.