Curriculum·G203 Reading Audit Reports·about 30 min
Scope, findings, and severity
By the end of this lesson you can
- →Read an audit's findings table: severity, status, and whether each was fixed or acknowledged
- →Explain how KyberSwap was audited and still lost 48 million dollars to a precision bug in complex math
- →Compute why the hardest bugs to find are the ones in intricate arithmetic, not the obvious classes
- →Judge an audit by what its findings reveal about the reviewers' depth, not by the headline count
Graduate · enrolled learners
This lesson opens with KyberSwap Elastic, 22 November 2023.
- What happened
- KyberSwap Elastic used a concentrated-liquidity model, the same intricate tick-based math as other advanced exchanges. An attacker exploited a tick-boundary rounding flaw: by pushing a pool's price to a precise point at the edge of a liquidity range and back, they made the contract double-count liquidity, so a swap returned far more than it should. The margin that made it work was tiny, a check bypassed by less than a fraction of a trillionth, requiring exact calculation. The codebase had been audited before deployment, and the audits did not identify the flaw. About 48 million dollars was drained across six chains. The difficulty of auditing complex mathematical logic against an adversary with full access to the deployed code is the whole lesson.
- The decision point
- KyberSwap's users, if they read the audits, would have seen a codebase reviewed by professionals with findings addressed. What the audits did not contain was the one flaw that mattered, buried in tick-boundary arithmetic so intricate that finding it required the same precision the attacker used to exploit it. This is the limit of the findings table: it lists what the reviewers found, which is a function of where they looked and how deep, and the most dangerous bugs live in exactly the complex math that is hardest to review. Reading an audit's findings is not counting them; it is judging whether the reviewers went deep enough for the kind of code they were reviewing, and complex concentrated-liquidity math needs a depth few reviews reach.
- Recorded loss
- $48,000,000
What you will be able to answer
- →What did KyberSwap lose to, and had it been audited?
- →Why are complex-arithmetic bugs the hardest to find?
- →How do you judge an audit's findings?
- →What does acknowledged, not fixed mean?
Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.
It is free. We do not sell the list and there is nothing to buy at the end of it.
Sources and review
- https://blocksec.com/blog/yet-another-tragedy-of-precision-loss-an-in-depth-analysis-of-the-kyber-swap-incident-1
- https://www.halborn.com/blog/post/explained-the-kyberswap-hack-november-2023
- https://blog.kyberswap.com/post-mortem-kyberswap-elastic-exploit/
Confidence high·Volatility medium·Reviewed 2026-09-14·Owner unassigned
Contested
The KyberSwap loss is cited between about 47 and 54 million dollars across chains; 48 million is a representative figure. The precision-loss mechanism is consistent across analyses.
J302 owns concentrated-liquidity mechanics. This lesson uses KyberSwap to teach reading findings and severity, and the limits of auditing complex math. Keep the split.
