Sub topic 12
Verifying schedules against on-chain data
This chapter assumes you have read the earlier chapters on allocation tables, vesting, and unlock events. You should also be able to read short Python functions and know what a block explorer is. A project's documentation states a vesting schedule, but the chain records what the contracts actually do. This chapter shows how to compare the two.
What on-chain verification can and cannot prove
A published schedule is a claim. Verification checks whether the claim matches state that anyone can read. Four questions need answers:
- Do the tokens exist where the project says they are?
- Do the contract's parameters (start, cliff, duration, amount) match the stated terms?
- Can anyone change those parameters or take the tokens out early?
- Have tokens already left the contract, and did the releases follow the schedule?
On-chain data can prove what a contract will do. It cannot prove who controls a beneficiary address. A wallet labeled "team" on an explorer may be a guess by the labeler. Treat labels as leads and treat contract code and balances as evidence.
The verification workflow
Step 1: collect addresses from more than one source
Start with addresses the project publishes in its documentation. Then confirm them from a second source. The token contract's own creation transaction and its early Transfer events show where the initial mint went. An address that appears only in a marketing page is weak evidence. An address that received a large share of the initial mint, and is cited in the docs, is strong evidence.
Many tokens live on several chains. Check which chain the vesting contracts are on. Check whether the bridged supply on other chains is counted in circulating supply.
Step 2: confirm the token's basic numbers
Read these from the token contract:
totalSupply()anddecimals(). Raw values are integers, and a token with 18 decimals stores 1 token as10**18. Forgetting this is the most common arithmetic error.- Whether a
mintfunction exists and who may call it. A "fixed" maximum supply is only fixed if no one can mint. - Whether the token is a proxy, meaning its logic can be swapped by an admin.
Step 3: read the vesting contract
Many projects use a standard vesting contract. OpenZeppelin's VestingWallet is one example. Its public getters include start(), duration(), released(token), and vestedAmount(token, timestamp). The cliff variant adds cliff(). Other projects use streaming protocols or a custom contract. Their function names differ, so read the verified source code on the explorer before you trust any getter's name.
| What to read | Where | Red flag |
|---|---|---|
| Token balance of the vesting contract | `balanceOf(contract)` on the token | Lower than the allocation, so the schedule is underfunded |
| Start, cliff, end | Contract getters or storage | Cliff or duration shorter than claimed |
| Released amount | `released()` or `TokensReleased` events | Releases before the cliff date |
| Owner or admin | `owner()`, roles, proxy admin | A single externally owned account can change terms |
| Revocation | A `revoke` or `cancel` function | Tokens return to the team when they are revoked |
| Upgradeability | Proxy pattern, `upgradeTo` | Logic can change after you verified it |
Time units matter here. Contracts store seconds, and "12 months" in a document may mean 360 days, 365 days, or a calendar offset. Allow a tolerance when you compare.
Step 4: compare parameters to the claim in code
The script below takes the claimed terms and the values read from chain. It reports each mismatch and the amount vested at a chosen time. The vesting formula uses integer division, as the contracts do. The on-chain numbers are hard-coded so you can run it without a network connection. In real use you would fill them from an RPC call or an explorer export.
from dataclasses import dataclass
DAY = 86_400
MONTH = 30.4375 * DAY # average month in seconds
DECIMALS = 18
@dataclass
class Claim:
name: str
total: int # whole tokens
cliff_months: float
duration_months: float
@dataclass
class OnChain:
start: int # unix seconds
cliff_end: int
end: int
balance_raw: int # still held by the contract
released_raw: int # already paid out
def vested_raw(c, now):
total = c.balance_raw + c.released_raw
if now < c.cliff_end:
return 0
if now >= c.end:
return total
return total * (now - c.start) // (c.end - c.start)
def check(claim, c, now, tol=0.25):
issues = []
funded = (c.balance_raw + c.released_raw) / 10**DECIMALS
if abs(funded - claim.total) > claim.total * 0.001:
issues.append(f"funded {funded:,.0f} vs claimed {claim.total:,.0f}")
cliff = (c.cliff_end - c.start) / MONTH
if abs(cliff - claim.cliff_months) > tol:
issues.append(f"cliff {cliff:.1f} months on-chain vs {claim.cliff_months:g} claimed")
dur = (c.end - c.start) / MONTH
if abs(dur - claim.duration_months) > tol:
issues.append(f"duration {dur:.1f} months on-chain vs {claim.duration_months:g} claimed")
return issues, vested_raw(c, now) / 10**DECIMALS
start = 1_700_000_000
now = start + 400 * DAY
cases = [
(Claim("team", 200_000_000, 12, 48),
OnChain(start, start + 365 * DAY, start + 1461 * DAY,
200_000_000 * 10**DECIMALS, 0)),
(Claim("investors", 150_000_000, 12, 36),
OnChain(start, start + 182 * DAY, start + 1096 * DAY,
120_000_000 * 10**DECIMALS, 0)),
]
for claim, chain in cases:
issues, vested = check(claim, chain, now)
print(f"{claim.name}: vested {vested:,.0f} tokens" + ("" if issues else ", no issues"))
for issue in issues:
print(" -", issue)The expected output is:
team: vested 54,757,016 tokens, no issues
investors: vested 43,795,620 tokens
- funded 120,000,000 vs claimed 150,000,000
- cliff 6.0 months on-chain vs 12 claimedThe investor contract holds 30 million tokens fewer than the table says. Its cliff also ends six months early, so those investors can sell sooner than the documentation implies. Either finding changes the supply model you built earlier.
Step 5: check who can change the rules
A schedule that matches today can be different tomorrow. Look at three things:
- Ownership. If a vesting contract has an
owner, find out whether it is a multisig, a timelock, or a single key. A timelock delays changes so the public can see them first. - Upgradeability. On a proxy, the verified code at the proxy address may show only a thin wrapper. Read the implementation address and the admin address.
- Revocation and clawback. Revocable grants are common for employee vesting. They are a risk when the beneficiary is a large investor, and also when revoked tokens go to a wallet that can sell them.
Step 6: replay what already happened
Past events show whether the schedule is being followed. Filter the token's Transfer events where from is the vesting contract. For OpenZeppelin-style contracts you can also read ERC20Released events. Check each release against the formula:
- No release should occur before the cliff end.
- Cumulative releases should not exceed
vestedAmountat that block's timestamp. - Large transfers from a vesting address to an exchange deposit address are a sign of an imminent sale. Exchange labels are guesses, so confirm the address with several sources.
This replay also gives you a measured number: the actual tokens released so far. Add it to the circulating supply model as a check on the formula.
Step 7: reconcile circulating supply
Use the checked balances to estimate circulating supply yourself:
circulating = totalSupply
- balances in vesting contracts
- balances in locked treasury or escrow
- burned tokens (balance of the burn address)Compare your figure to the one on aggregator sites. Differences usually come from one of these:
- The aggregator counts the treasury or an unvested team wallet as circulating, or omits it.
- The aggregator reads a number the project reports and does not update it.
- Supply on other chains is double-counted, or missing.
- Rebasing or reflection tokens change balances without
Transferevents, so event replay will not add up.
Common errors
- Decimals mistakes. Dividing by
10**18for a token with 6 decimals makes a balance look a trillion times smaller than it is. - Using the current balance as the total. After some releases, the balance is the unvested remainder. Total allocation is the balance plus the released amount, as in the script.
- Treating a wallet as locked because it is quiet. A multisig that has not moved tokens is not a lock. Only a contract that enforces the schedule restricts spending.
- Missing a second contract. An allocation may be split across several vesting contracts per beneficiary. Sum them all.
- Trusting block timestamps to the second. For schedules that run months or years, the error is irrelevant. For an unlock "at 00:00 UTC", check the actual timestamp stored.
- Confusing "start" with the token launch. A vesting start may precede the token generation event, or a contract may start later. The cliff is measured from the contract's own
start.
Decision criteria
Use these results when you evaluate a design in the final checklist chapter:
- Terms match on chain and the owner is a timelock or multisig with no upgrade path: treat the schedule as reliable.
- Terms match but an admin can change them: treat the schedule as a promise only.
- Terms differ from the claim: use the on-chain terms in your supply model and note the discrepancy.
- Tokens are not in any contract: assume they are free to move.
Exercise
A vesting contract for a 100 million token team grant (18 decimals) shows balanceOf equal to 60 1024 raw units and released equal to 10 10**24 raw units. How many tokens were funded in total, and what is the problem?
Show answer
Funded total is balance plus released: 60 million + 10 million = 70 million tokens. The contract is underfunded by 30 million tokens against the 100 million claim. Using the balance alone (60 million) would also be wrong, since 10 million already left the contract.
Exercise
A project says its investors have a "12-month cliff". The vesting contract has start = 1,700,000,000 and cliff end = 1,715,552,000. Is the claim accurate, and what tolerance would you use?
Show answer
The difference is 15,552,000 seconds, which is 180 days, or about 5.9 months. The cliff is six months and the claim is wrong by about half. Because months vary in length, a tolerance of a few days or about a quarter of a month is reasonable. A six-month gap is far outside that.