Sub topic 11
Comparing the Paper with Code, Documentation, and Audits
Assume you understand blocks, transactions, wallets, and tokens. You should also be comfortable with percentages and simple arithmetic. This chapter focuses on verification: checking whether the running system matches the promises in its whitepaper.
A whitepaper describes intended behavior. Code defines behavior that nodes, contracts, or clients actually enforce. Documentation explains how people are expected to use the system. An audit reports what an auditor examined and which limitations remained. These sources answer different questions, so agreement between them must be tested rather than assumed.
Start with a versioned claim
Extract specific claims from the paper before opening the repository. Record each claim in a form that can be tested.
Examples include:
- “The block interval is 10 minutes.”
- “The validator set requires two-thirds agreement.”
- “The maximum supply is 1 billion tokens.”
- “Team tokens remain locked for 12 months.”
- “Users can withdraw funds without a trusted intermediary.”
For each claim, record the paper version, publication date, code repository, release tag, and commit hash. A repository can change after publication. Comparing a current implementation with an old paper may reveal a real design change, or only a version mismatch.
A useful comparison table looks like this:
| Claim | Evidence to inspect | Result |
|---|---|---|
| Maximum supply is 1 billion | Token contract and deployment state | Confirmed, disproved, or unclear |
| Validators need two-thirds agreement | Consensus code and configuration | Confirmed or qualified |
| Team tokens vest over 12 months | Token contract and allocation records | Confirmed, partial, or absent |
Inspect the implementation in layers
Begin with the public interface. Read contract functions, transaction formats, command-line options, and configuration files. Then follow the path into the implementation.
For a token supply claim, inspect:
- The minting function and its access control.
- Initial deployment or genesis allocation.
- Any burn, pause, upgrade, or migration functions.
- Administrative keys that can change supply.
- The current on-chain state.
The number in a constant is not enough. A contract may expose an apparent cap while an upgrade administrator can replace the contract. A “fixed supply” claim therefore needs both arithmetic evidence and control analysis.
For consensus claims, inspect how votes are counted, what stake or identity weight means, and what happens when messages are delayed or invalid. Documentation may describe the normal path while code handles exceptional paths differently.
A small script can catch arithmetic inconsistencies before deeper review:
# Values copied from a project's documented allocation.
allocation = {
"community": 40,
"team": 20,
"investors": 25,
"treasury": 15,
}
assert sum(allocation.values()) == 100
print("Allocation totals 100%")This test only checks the stated percentages. It does not prove that the deployed contract uses them.
Treat documentation as an operational specification
Documentation often contains details omitted from a concise whitepaper. Check network identifiers, supported wallets, withdrawal rules, upgrade procedures, and failure recovery. Try the documented commands on a test network or local instance.
Record whether each step:
- Works as written.
- Works only with undocumented assumptions.
- Fails.
- Produces a result different from the description.
A difference can be harmless documentation drift, but it can also expose an unusable feature or a hidden trust requirement.
Read audits by scope, not by reputation
An audit is evidence about a defined review, not a security certificate. Check:
- The exact repository commit or contract version reviewed.
- The files and functions included in scope.
- Whether economic, governance, deployment, and frontend risks were excluded.
- Findings, severity ratings, and remediation status.
- Whether the final code changed after the review.
An audit of a token contract does not validate a chain's consensus design. An audit that found no critical bugs does not establish that the economic model is sustainable.
Build an evidence trail
Use a claim-to-evidence matrix. Link each conclusion to a commit, contract address, configuration value, test result, or audit finding. Mark claims as confirmed, contradicted, qualified, or unverified.
The goal is not to prove that a project is safe. The goal is to state precisely what the available evidence supports and what remains unknown.
Exercise
An audit reviewed a token contract, but the paper promises censorship-resistant consensus. Is the consensus claim verified?
Show answer
No. The audit's scope does not cover the consensus mechanism, so the claim remains unverified until its code, configuration, and security assumptions are examined.