Verifiable smart contract audits represent a paradigm shift in blockchain security, enabling cryptographic verification of audit authenticity, sources, and results through on-chain transparency mechanisms.
The current state of smart contract audits is fragmented and unreliable, creating significant security risks:
- some audits do not give the checksums of audited code
- this checksum / Git commit has disappeared or is not available
- The contract actually depends on other smart contracts
Example: Assume a DeFi protocol claims to have a "CertiK audit" on their website. Users later discover:
- The PDF was fabricated - CertiK never audited the contract
- The contract address on the fake report didn't match the deployed contract
- The scam results in $2M in lost user funds
Example: A popular yield farming protocol displays an audit report from Trail of Bits:
- The audit covers contract git commit
1234abcd - The deployed contract is actually
5678efgh(different version) - Changes were made post-audit without disclosure
- Users assume they're interacting with audited code, but they're not
Example: An audited lending protocol integrates:
- An unaudited price oracle (vulnerable to manipulation)
- A third-party token contract (later found to have a backdoor)
- The main contract is audited, but the dependencies are not
- Code verification: Complete audit trail of contract source code
- Signature verification: Cryptographic signatures from audit firms
- Result verification: On-chain storage of audit findings
Audit firms sign checksums of:
- Smart contract source code
- Smart contract bytecode
- Smart contract dependencies (code for reployed dependencies, addresses for on-chain dependencies)
- Audit reports
These signatures are published on-chain for public verification.
- Contract Registry: On-chain storage of contract checksums, with decentralized access (IPFS)
- Audit Registry: Signed audit reports and findings, with decentralized access (IPFS)
- Signature Verification: Cryptographic proof of auditor identity
- Audit firm reviews contract code
- Generates checksums of contract and dependencies
- Signs checksums with private key
- Publishes audits on-chain
- Users verify signatures against known auditor public keys
- Trust minimization: No reliance on centralized databases
- Immutability: Audit records cannot be altered
- Accessibility: Anyone can verify audit authenticity
- Accountability: Auditors cryptographically bound to their work