Zeeka saysSTARKs are transparent (no trusted setup) and hash-based (post-quantum). They lay a computation out as an execution trace and prove a transition constraint vanishes across it.
STARKs trade SNARK-sized proofs for two big wins: no trusted setup (randomness comes from public hashing — "transparent") and hash-based security believed to resist quantum computers. A computation is written as an execution trace, a table whose rows are successive machine states, and correctness is captured by a transition constraint that must hold between consecutive rows.
Prove that the constraint vanishes across the whole trace (via FRI, next lesson) and you have proven the computation ran correctly. The demo builds a Fibonacci trace and checks the transition t[i+2] − t[i+1] − t[i] = 0 everywhere, then shows it breaks when one cell is tampered. STARKs power Starknet and many high-throughput provers.
Power-ups you unlock
Transparent: randomness comes from public hashing, no setup
Hash-based → believed post-quantum secure
Computation is laid out as a trace (a table of steps)
A transition constraint must hold between consecutive rows
Bigger proofs than SNARKs, but no setup and quantum-resistant
The Collision attacks — common mistakes
Assuming STARKs need a trusted setup (they do not)
Forgetting boundary constraints (the trace start/end conditions)
Confusing trace length with security level
Expecting SNARK-sized proofs — STARKs are bigger
Boss battleBuild a Fibonacci execution trace and show the transition constraint holds everywhere, then breaks when you tamper one cell.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre id="o"></pre>
<script>
// STARK: a TRACE plus a transition constraint that must vanish across it.
const F=97, mod=(n)=>((n%F)+F)%F;
const trace=[1,1]; for(let i=2;i<10;i++) trace.push(mod(trace[i-1]+trace[i-2])); // Fibonacci mod 97
const viol=(t)=>{ const v=[]; for(let i=0;i<t.length-2;i++) if(mod(t[i+2]-t[i+1]-t[i])!==0) v.push(i); return v; };
const bad=[...trace]; bad[5]=mod(bad[5]+1);
document.getElementById('o').textContent = [
'execution trace (Fibonacci mod 97): ' + trace.join(', '),
'transition t[i+2]−t[i+1]−t[i]=0 holds everywhere? ' + (viol(trace).length===0),
'tamper trace[5] → constraint violated at steps: [' + viol(bad).join(', ') + ']',
'STARK proves the trace satisfies the constraint — transparent, post-quantum'
].join('\n');
</script></body></html>