Zeeka saysFRI is how STARKs prove a function is a low-degree polynomial: each round folds it into one of half the degree, until a constant remains — checked at a few random points.
The soundness of a STARK rests on proving that a committed function really is a low-degree polynomial. FRI (Fast Reed-Solomon Interactive Oracle Proof) does this by folding: split p(x) into its even and odd parts, p(x) = p_e(x²) + x·p_o(x²), then random-combine them into a new polynomial of half the degree. Repeat, and after log(d) rounds only a constant is left.
The verifier spot-checks consistency at a few random points each round — cheap, with no pairings and no trusted setup. The demo folds a degree-7 polynomial and shows the size drop 8 → 4 → 2 → 1. FRI is the engine that makes STARKs transparent and post-quantum.
Power-ups you unlock
Splits p(x) into even and odd parts: p_e(x²) + x·p_o(x²)
Random-combines them to halve the degree each round
After log(d) rounds only a constant is left
Verifier spot-checks consistency at random points
A cheap probabilistic low-degree test, no pairings
The Collision attacks — common mistakes
Skipping the random folding challenge (breaks soundness)
Too few query points → weak soundness
Confusing the folding rounds with the trace steps
Assuming FRI proves correctness — it proves low-degree-ness
Boss battleFold a degree-7 polynomial round by round and show the coefficient count goes 8 → 4 → 2 → 1.
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>
// FRI: prove low-degree by FOLDING — each round halves the degree.
const F=97, mod=(n)=>((n%F)+F)%F;
let coeffs=[3, 1, 4, 1, 5, 9, 2, 6]; // degree-7 polynomial (8 coeffs)
const sizes=[coeffs.length]; let r=5;
while(coeffs.length>1){
const even=coeffs.filter((_,i)=>i%2===0), odd=coeffs.filter((_,i)=>i%2===1);
coeffs = even.map((e,i)=> mod(e + r*odd[i])); // fold with random challenge r
sizes.push(coeffs.length); r=mod(r*7+1);
}
document.getElementById('o').textContent = [
'start: degree-7 polynomial (8 coefficients)',
'coefficient count per round: ' + sizes.join(' → '),
'each round halves the degree → log2(8) = 3 rounds to a constant',
'final constant = ' + coeffs[0],
'verifier checks a few random points per round → cheap low-degree test'
].join('\n');
</script></body></html>