Sub topic 11
Comparing the Paper with Code, Documentation, and Audits
A whitepaper describes what a project intends to build. The code, the documentation, and any security audits show what exists. This chapter covers how to compare them and what to conclude from the gaps.
This chapter assumes you have read the earlier chapters on the mechanism, the security model, and tokenomics. You should already have a list of the paper's claims and parameters. You should also be able to read simple Python and skim a public code repository, even if you do not know the project's language well.
Why the paper alone is not enough
A paper can say anything, because nothing forces it to match the software. Three kinds of gap are common:
- The paper is ahead of the code. Features are described in the present tense but are not built, or are planned for a later phase.
- The code is ahead of the paper. Parameters, admin powers, or fee rules have changed since the paper was written, and the paper was never updated.
- The code contradicts the paper. A claimed property, such as a fixed supply or a decentralized validator set, does not hold in the deployed system.
The first is normal for early projects, as long as the paper says so. The second is a documentation problem. The third matters most, because the paper is the document that investors and users relied on.
Step 1: Build a claims table
Start from the claims you extracted earlier and give each one a row. Keep only claims that can be checked. "Fast and secure" cannot be checked. "Blocks every 2 seconds" and "no single party can mint tokens" can.
| Claim from paper | Where the paper states it | Where to check | Status |
|---|---|---|---|
| Maximum supply of 1,000,000,000 | Section 5 | Token contract, mint function | Unchecked |
| 100 validators | Section 4.2 | Chain config, genesis file | Unchecked |
| 21-day unbonding period | Section 4.3 | Staking module constants | Unchecked |
| Team tokens vest over 4 years | Section 5.2 | Vesting contract | Unchecked |
| Upgrades need a community vote | Section 6 | Proxy admin, timelock | Unchecked |
The fourth column starts as "Unchecked" and ends as one of four values: Matches, Differs, Not found, or Cannot verify (for example, closed-source code).
Step 2: Locate the implementation
Finding the right code is half the work. Look in this order:
- The official repository. Follow links from the project's own website, not from a search result or a social media post, because fake repositories exist. Check that the organization name matches on both the site and the repository.
- Deployed addresses. For smart contract platforms, find the contract addresses the project publishes. Open them in a block explorer and check whether the source is verified, meaning the explorer has confirmed that the published source compiles to the deployed bytecode.
- Release tags and build instructions. The default branch may differ from what runs in production. Look for tagged releases and note which version you read.
- Commit history. A repository whose only commits arrived in a single upload, or that has no activity for a year, tells you something about maturity. So does a history that shows steady work by several authors.
If the code is closed source, mark the related claims "Cannot verify". Do not mark them "Matches" because the paper says so. Ask whether the project gives a reason, and whether an auditor had access.
Step 3: Check parameters directly
Many claims reduce to a constant or a configuration value. Search for the parameter by name, by value, or by the formula in the paper. For example, search for MAX_SUPPLY, unbonding, epoch, blockTime, or the number itself.
When the paper gives a formula, such as a halving schedule or a fee split, reimplement it and compare the output with the code's behavior. The supply-cap script from the earlier chapter is an example of this.
You can keep the comparison in a small script so it is repeatable and easy to share. The values below are hypothetical.
# Compare parameters stated in a whitepaper with values found in the code.
# All numbers are hypothetical.
paper_claims = {
"block_interval_seconds": 2,
"max_supply": 1_000_000_000,
"validator_count": 100,
"unbonding_days": 21,
"team_vesting_months": 48,
}
code_values = {
"block_interval_seconds": 2,
"max_supply": 1_000_000_000,
"validator_count": 21,
"unbonding_days": 7,
# team_vesting_months was not found in the code
}
for name, claimed in paper_claims.items():
found = code_values.get(name)
if found is None:
status = "NOT FOUND"
elif found == claimed:
status = "MATCHES"
else:
status = f"DIFFERS (code: {found})"
print(f"{name:<24} paper: {claimed:<14,} {status}")The output shows two matches, two differences, and one parameter that could not be found. The two differences are important because both weaken the security story. A 21-validator set is much easier to collude in than a 100-validator set. A 7-day unbonding period gives less time to punish misbehavior than a 21-day one.
The "not found" row needs a follow-up. The vesting may live in a separate contract, an off-chain legal agreement, or nowhere.
Step 4: Check powers, not only parameters
Whitepapers describe how the system behaves when everyone follows the rules. Code also shows who can change the rules. Look for these privileged capabilities:
- Mint or burn functions, and who may call them.
- Pause or freeze functions, which can stop transfers or block specific addresses.
- Upgradeable proxies. If the contract is behind a proxy, the owner can replace its logic. Find the admin address and see whether it is a single key, a multisignature wallet (several keys must approve), or a timelock (changes are delayed so users can exit).
- Fee setters, which can change fees after launch.
- Blacklists or allowlists, which can restrict who may transfer.
Then compare these powers with the governance claims in the paper. If the paper says "fully decentralized and immutable" but one externally owned account can upgrade the contract instantly, that is a Differs row, and a significant one.
Step 5: Read the documentation as a third source
Documentation sits between the paper and the code. It is usually updated more often than the paper and describes behavior more concretely. Use it in two ways.
First, check consistency. If the developer docs describe a 7-day unbonding period while the paper says 21 days, one of them is stale. The code decides which. Record all three values.
Second, look for caveats that appear in docs but not in the paper. Developer docs often include phrases such as "not yet implemented", "testnet only", "centralized sequencer for now", or "admin key will be removed in a later version". These phrases describe the real state of the system. When they are absent from the paper, the paper may be overselling.
Also compare dates. A paper from three years ago that has never been revised, next to a codebase with hundreds of changes since, should make you suspect drift.
Step 6: Read audits critically
An audit is a security review of a defined piece of code at a defined time, performed by a third party. It is useful evidence but easy to over-read. Check these points:
- Scope. Which contracts or modules were reviewed? Audits often cover only the core contracts, not the bridge, the oracle, or the admin tooling.
- Commit or version. The audit names the exact code reviewed. Compare it with the deployed version. Code changed after the audit is unaudited code.
- Findings and their status. Each finding is usually marked fixed, acknowledged, or unresolved. "Acknowledged" often means the team chose not to fix it. Read the high and critical findings in full.
- Who paid and who performed it. Audits are commissioned by the project. Judge the auditor's reputation and whether the report is published in full, not only as a badge or a one-line summary.
- What it did not cover. Most audits exclude economic design, governance risk, and off-chain components. A clean audit says nothing about whether the tokenomics are sound.
Putting the sources together
Each source answers a different question, and each can be wrong in a different way.
Weighing the gaps
Not every gap is equally serious. Sort each difference by two questions: how much does it change the risk to a user, and could it be an honest lag?
| Finding | Typical reading |
|---|---|
| Feature described but marked "planned" in docs | Normal for early projects, if the paper says so |
| Parameter differs, and the code is more conservative | Likely a documentation lag; ask for an update |
| Parameter differs, and the code is weaker on security | Serious; the paper overstates protection |
| Admin powers contradict the paper's decentralization claim | Serious; a trust assumption is hidden |
| Code deployed differs from the audited version | Serious; the audit may not apply |
| Source code closed with no explanation | Claims remain unverified; lower your confidence |
Record your reasoning, not only the verdict. The next chapters build on these notes, especially the red flags and the final write-up.
Common mistakes
- Reading the wrong repository. Forks and copies exist. Verify the link from the official site.
- Trusting a verified-source badge too much. It shows that the source matches the bytecode. It does not show that the code does what the paper promises.
- Reading only the happy path. Look at the admin and emergency functions as well.
- Ignoring time. Note the date of the paper, the code version, and the audit. Gaps between them are findings.
- Treating "Not found" as "Differs". You may have searched in the wrong place. Say what you searched and ask the team before you conclude.
Exercise
A paper claims "no one can change the token supply after launch". In the contract you find a function mint(address to, uint256 amount) restricted to an owner address. The owner is a single externally owned account. An audit report from last year says "no critical findings" and lists a contract commit that is two versions older than the one deployed. What status would you give the supply claim, and what three pieces of evidence support it?
Show answer
Mark it "Differs". First, the code contains a mint function, so supply can be changed, which contradicts the paper. Second, a single externally owned account controls it, so there is no multisig or timelock limiting that power. Third, the audit does not cover the deployed version, so its "no critical findings" cannot be applied to the current code. A fair note would also say you have not seen whether the owner has renounced the role elsewhere, so check the on-chain owner address and the transaction history before finalizing.