Sub topic 6
Security model: what must hold for the design to work
This chapter assumes you have read the earlier chapters on pinning down the problem and understanding the mechanism. You should know the basics of blocks, consensus, and signatures. Python is optional, but one worked example uses it.
A security model is the part of a whitepaper that says who can attack the system, what they are assumed able to do, and what the design promises in return. A strong paper states these things openly. A weak one says "secure" and moves on. Your job is to turn the paper's security claims into a list of conditions, then ask how likely each condition is to hold in the real world.
Security is a conditional statement
Every security claim has the form "if these assumptions hold, then this property holds." A claim without its "if" part cannot be tested. When a paper says "the network is secure against attacks," rewrite it in your notes as:
- Property: what is guaranteed (for example, a confirmed transaction is never reversed).
- Adversary: who is trying to break it, and with what resources.
- Assumptions: what must be true for the property to hold.
If you cannot fill in all three from the text, record that as a finding. Missing pieces are information.
| Element | Question to ask | Example answer from a paper |
|---|---|---|
| Property | What exactly is promised? | Safety: no two conflicting blocks are finalized |
| Adversary | Who attacks, and how strong are they? | Controls up to 30% of staked tokens |
| Network model | What does the paper assume about message delivery? | Messages arrive within a known time bound |
| Threshold | How much of the system may be dishonest? | Fewer than one third of validators |
| Trust | Which parties must you simply trust? | A multisig of five signers |
Safety and liveness
Papers often use two terms without defining them.
- Safety means nothing bad happens. For a blockchain, that usually means finalized history is not rewritten and no one spends the same coin twice.
- Liveness means something good eventually happens. Valid transactions are eventually included, and the chain keeps producing blocks.
A design can protect one while sacrificing the other. Many BFT-style protocols (Byzantine fault tolerant, meaning they tolerate nodes that behave arbitrarily) halt rather than finalize conflicting blocks when too many validators fail. That keeps safety and loses liveness. Check which property the paper guarantees under which conditions. A sentence such as "the chain is always available and never forks" should make you suspicious, because the impossibility results in distributed systems say you cannot have everything under every network condition.
The assumption types to look for
Honest-majority thresholds
Most consensus designs assume that some fraction of a scarce resource is controlled by honest participants. The resource is hash power in proof of work, or staked tokens in proof of stake. Note the exact threshold and what it applies to.
- Nakamoto-style chains are usually described as needing a majority of honest hash power. In practice, attacks such as selfish mining can pay off below 50%, and the real margin depends on network delay.
- Classical BFT protocols need fewer than one third faulty participants (n ≥ 3f + 1).
Ask whether the threshold is measured in nodes, stake, or hash power. Ask whether one entity can split its holdings across many identities. A threshold of "one third of validators" means little if validators are cheap to create.
Network assumptions
The paper should say how it models message delivery.
- Synchronous: every message arrives within a known bound. This is the easiest model to design for and the least realistic.
- Partially synchronous: the bound exists but is unknown, or holds only after some unknown time.
- Asynchronous: no bound at all.
If the proof relies on synchrony, an attacker who can delay messages, for example by disrupting routing between data centers, may break the guarantee. Look for how the paper handles network partitions.
Cryptographic assumptions
Standard assumptions include the collision resistance of the hash function and the hardness of the signature scheme's underlying problem. Established primitives such as SHA-256 or Ed25519 are a good sign. Treat these as warning signs instead:
- A custom hash function or signature scheme with no peer-reviewed analysis.
- A zero-knowledge system that needs a trusted setup (a one-time key generation ceremony whose secret must be destroyed) with no description of who ran it.
- Claims of "quantum-proof" security with no named scheme.
Trusted parties
Search the paper for words such as oracle, bridge, relayer, sequencer, guardian, committee, and admin. Each one is a place where the design asks you to trust someone. For every trusted party, record how many people control it, how they are chosen, and what the party could do if it were malicious. A system that is trustless on-chain but depends on a five-of-nine multisig for its bridge has a security level equal to that multisig.
Economic assumptions
Proof of stake and many token systems claim security through cost: attacking would be expensive, or the attacker would lose their stake. Test this directly.
- What does the attacker need to buy, and can they borrow it (for example, through flash loans or staking derivatives)?
- Is the penalty for misbehavior (slashing) automatic and actually enforced by the protocol?
- Is the cost of an attack larger than the possible gain? A chain securing billions in assets with a few million in stake is cheap to attack relative to the reward.
A worked example: checking a confirmation claim
Suppose a paper says "a transaction is final after six confirmations" and assumes the attacker controls a given fraction of the hash power. You can check this with the catch-up probability from Nakamoto's original Bitcoin paper. It gives the chance that an attacker with fraction q of the hash power ever overtakes an honest chain that is z blocks ahead.
from math import exp, factorial
def attacker_success(q, z):
"""Probability an attacker with hash-power share q catches up from z blocks behind."""
p = 1.0 - q
if q >= p:
return 1.0 # a majority attacker eventually wins
lam = z * (q / p)
total = 1.0
for k in range(z + 1):
poisson = exp(-lam) * lam**k / factorial(k)
total -= poisson * (1.0 - (q / p) ** (z - k))
return total
for q in (0.1, 0.3, 0.45):
row = ", ".join(f"z={z}: {attacker_success(q, z):.6f}" for z in (1, 6, 12))
print(f"q={q:.2f} -> {row}")For q = 0.10 and z = 5 the result is about 0.0009. For q = 0.30 and z = 5 it is about 0.177. So "six confirmations is safe" is a statement about a particular attacker size. If the paper's own adversary is 30%, the guarantee is much weaker than if it is 10%. The same number of confirmations does not mean the same security for a small chain, where renting 30% of the hash power may be cheap.
This calculation also leaves things out. It ignores network delay, selfish mining, and the cost of obtaining the hash power. Use it as a lower bound on how careful the paper must be, not as proof of safety.
Failure modes to check for
- Unstated assumptions. The proof works, but only because of a condition that appears nowhere in the text, such as "all validators are online."
- Assumptions that quietly contradict other chapters. The security section assumes decentralization, while the tokenomics section shows a few holders control most of the stake.
- Long-range and nothing-at-stake problems in proof of stake. Old validator keys can be used to build an alternate history cheaply, and validators may have no cost for voting on several forks. Good papers describe checkpoints, weak subjectivity, or slashing as defenses.
- Finality that is only probabilistic or only economic. Ask whether "final" means mathematically irreversible, or only expensive to reverse.
- Security by obscurity. "Our algorithm is proprietary" is not a security argument.
- Proofs for a simplified protocol. The paper proves security for a cleaned-up model, while the real system adds features such as upgrades, bridges, and smart contracts that the proof does not cover.
- Benchmarks substituted for proofs. A testnet that ran for months without incident shows nothing about a motivated attacker.
A working procedure
Apply it in this order:
- Collect every sentence that uses words such as secure, safe, trustless, final, immutable, or unstoppable.
- For each, write the property, the adversary, and the assumptions in your own words.
- Mark each assumption as stated or unstated, and as realistic, doubtful, or contradicted by another part of the paper.
- Find the weakest assumption. The overall security is no better than that one.
- Carry the open questions forward. The later chapters on checking the paper against the implementation, and on writing up your assessment, will use them.
Exercises
Exercise
A whitepaper claims its proof-of-stake chain "is secure as long as fewer than one third of validators are malicious." The chain has 100 validators, and anyone can register a new validator by staking a small amount. (a) What is the largest number of malicious validators the claim allows? (b) What further question about the threshold should you ask?
Show answer
(a) The condition is fewer than one third, so 33 malicious validators out of 100 is the most the claim covers (3 × 33 + 1 = 100, which satisfies n ≥ 3f + 1). With 34 malicious validators the guarantee no longer applies. (b) Ask whether the threshold counts validators or stake, and whether one entity can register many validators. If registration is cheap, an attacker could create enough identities to pass the one-third mark, so the real threshold depends on the cost of acquiring stake or identities, not on the validator count.
Exercise
Using the attacker_success function from this chapter, what does the output for q=0.30 and z=6 tell you, compared with q=0.10 and z=6? State what you would conclude about a paper that recommends six confirmations without naming the adversary's size.
Show answer
The output for q=0.30 is far larger than for q=0.10 at the same z, since the attacker's chance of catching up falls quickly as q shrinks. The conclusion is that "six confirmations" has no meaning without the adversary's share. A paper that recommends it without stating the assumed share leaves the main parameter of its security claim undefined, so you should record it as an unstated assumption.