Notes / Audits and snapshots

sol_read.py refactor check (2026-09-17)

Audits and snapshots2026-09-17Chain: Solana

Source: chains/solana/data/sol_read_refactor_check_2026-09-17.md in the repository, rendered here without changes. Source file

scripts/sol_read.py originally ran main() unconditionally at module scope (no if __name__ == "__main__": guard), so nothing else in this project could import sol_read without it immediately crashing on sys.argv. Every decoder also lived inline in main()'s if/elif chain, duplicating the byte layouts if any other file needed the same reads.

Refactored into one function per account type (read_program, read_squadsv3, read_squads, read_klend_market, etc.), same byte offsets, same decode order, main() now just dispatches to them and prints. No logic changed.

Live re-verification after the refactor#

Ran the refactored CLI against Solana Mainnet Beta for every target used in 0 and compared to that file's already-recorded values:

CommandFieldMethodology test valueRefactored CLI outputMatch
program ... JUP6Lk...TaV4upgrade_authorityCvQZZ23q...tipQCvQZZ23qYDWF2RUpxYJ8y9K4skmuvYEEjH7fK58jtipQyes
squadsv3 ... 7ZyD...k8Sf 1threshold / n_keys / authority_14 / 7 / CvQZZ23q...tipQ4 / 7 / CvQZZ23qYDWF2RUpxYJ8y9K4skmuvYEEjH7fK58jtipQyes
keytype ... CvQZZ23q...tipQon_curve / ownerfalse / System (PDA)false / 11111111111111111111111111111111yes
program ... KLend2g3...boSyAYavgmjDupgrade_authorityGzFg...kzkWGzFgdRJXmawPhGeBsyRCDLx4jAKPsvbUqoqitzppkzkWyes
squads-vault - 6hhB...fQbM 0derived vaultGzFg...kzkW (exact match required)GzFgdRJXmawPhGeBsyRCDLx4jAKPsvbUqoqitzppkzkWyes
klend-market ... 7u3H...5PfFname / lending_market_owner / emergency_council / proposer_authority / global_adminSOL/BTC Market / 24Lj...ZMMT / 4VtJ...Ma57 / 6pwk...cEUv / A9rQ...exCZidentical (full values in claims)yes
squads ... 6hhB...fQbMthreshold / members / time_lock_s / config_authority5-of-10 / 86400 / default5 / 10 / 86400 / 11111...111 (default)yes

Every value matches exactly. The refactor is behavior-preserving; nothing about the underlying reads or formulas changed, only how the code is organized for reuse by chains/solana/scorers.py.

Not an audit, not investment advice. All notes ยท Back to the dashboard.