Repository navigation
v0.6.0: lenses read across files
A lens used to read one file. Modern protocols declare their state in a base contract and put a function's work in an internal helper one file up, which is why four of the seven targets in bench/MODERN.md were invisible to every lens. That file ended by naming this as the only change that would move the number, so this release makes it.
A run now builds the inheritance graph of its own files, and a function is read with the state and the internal helpers its contract actually has. Nothing wider: an unrelated contract's names stay out of scope, or every same-named local variable would look like a state write.
A second defect surfaced in the same work. The declaration reader stopped at the first closing bracket, so mapping(a => mapping(b => c)) was not a declaration at all and a balance keyed by two things was not state.
Measured on all three corpora, before and after, with the before files kept in bench/history:
- SmartBugs-curated: recall 62% to 63%, precision held at 49%.
- DeFiVulnLabs, held out: unchanged at 50% recall and 62% precision.
- Recent audit contests: four of the seven targets went from invisible to candidates. None is confirmed. All 28 confirmations were read by hand again and none is a bug the audits missed; the one that is not quite a false alarm is written up in bench/MODERN.md.
What stops those four candidates is now a design question rather than a defect. The second reading of the access pair keys on the name of the variable written, and modern code writes last_gauge and _validatorsMap, not feeRate. Loosening that to any state write would make the two lenses one lens, and a quorum of one is not a quorum. A genuinely different second reading is needed and is not designed yet.
75 tests.