Skip to content

mab-xyz/verifiable-audits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Verifiable Smart Contract Audits

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 Audit Integrity Problem

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

The Authentication Problem

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

The Version Mismatch Problem

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

The Dependency Hell Problem

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

Core Principles for Verifiable Audits

Verifiability

  • Code verification: Complete audit trail of contract source code
  • Signature verification: Cryptographic signatures from audit firms
  • Result verification: On-chain storage of audit findings

Transparency

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.

Technical Architecture

Components

  • 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

Verification Process

  1. Audit firm reviews contract code
  2. Generates checksums of contract and dependencies
  3. Signs checksums with private key
  4. Publishes audits on-chain
  5. Users verify signatures against known auditor public keys

Benefits

  • 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

About

High Integrity for Smart Contract Audits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors