zkLend — 2025 Backtest
Attacker exploited floor division rounding in safe_decimal_math library when withdrawing from a wstETH market. By first inflating the lending_accumulator via a flash loan donation to the empty pool, each subsequent withdrawal burned only 1 zToken while receiving disproportionate underlying assets. $9.5M drained across multiple transactions.
What Hindenrank Would Have Said
As of January 1, 2025
“zkLend rates C- as of January 2025. The protocol is well-audited but the EraLend incident (July 2023) established a known exploit class for ZK-rollup lending protocols using accumulator-based interest models. Neither audit specifically checked for empty-market accumulator inflation attacks. The C- grade reflects elevated-but-not-critical risk — the protocol would need a targeted exploit to be compromised.”
Scenario Predicted the Failure Mode
The C- grade (52/100) did not cross the D+ threshold for a high-risk flag. However, our collapse scenario analysis predicted the exact failure mode that occurred.
Flagged by dimensions: Mechanism Novelty, Interaction Severity, Oracle Surface, Documentation Quality
One or more collapse scenarios directly matched the actual failure mode.
Top Risks Identified
- 1.Cairo VM integer arithmetic uses floor division in safe_decimal_math — precision loss in accumulator math not flagged by any audit
- 2.EraLend (July 2023) was exploited via the same accumulator + flash loan + rounding combination on zkSync; similar design present in zkLend
- 3.Dual oracle system (Chainlink + Pragma) with undocumented staleness checks and fallback logic
- 4.Team holds full admin control with no timelock or DAO governance implemented yet
- 5.Empty market initialization creates attack surface for accumulator inflation attacks
Collapse Scenarios
Empty Market Accumulator Inflation Attack
ModerateAttacker identifies a newly-listed or low-liquidity asset market where the lending_accumulator can be inflated via flash loan donation, then exploits safe_decimal_math floor division to withdraw more than deposited.
EraLend (July 25, 2023, zkSync): Attacker used read-only reentrancy to manipulate reserve values and exploit rounding in the accumulator model, draining $3.4M. The same attacker cluster would later target zkLend.
Oracle Failure During StarkNet Network Stress
ModerateStarkNet experiences network congestion or outage during a volatile market period; Pragma oracle updates lag significantly behind real prices; undercollateralized positions build up before liquidators can act.
Multiple lending protocols experienced oracle failures during high volatility (e.g., Compound USDC oracle manipulation in 2021 causing $89M in liquidations). StarkNet's novel architecture may have higher oracle latency risks than Ethereum mainnet.
See how today's protocols score
The same 8-dimension rubric applied to 672+ live protocols.