Sourcify

An open-source source-code verification service for Ethereum smart contracts.

Visit websiteOfficial site: sourcify.dev

Facts checked · Onchain tools

Sourcify verifies that deployed contract bytecode matches published source code, using Solidity metadata and its hash. Its docs separate an exact match, where the bytecode is identical including the metadata hash, from a match, where only the metadata hash differs.

Key facts

Kind
Source verification service
Languages
Solidity, Vyper and Yul
Match types
Exact Match and Match (formerly perfect and partial)
Openness
The docs say the complete stack is open source and the dataset is published

What it is

Sourcify’s documentation describes it as a “source-code verification service for Ethereum smart contracts”, supporting Solidity, Vyper and Yul. The docs say its complete stack is open source, that it publishes its verified dataset, and that it shares new verifications with other verifiers and through the Verifier Alliance. It offers APIs, npm libraries and self-hosting.

How it works

Sourcify recompiles published source files with the settings recorded in the Solidity metadata file and compares the result with the bytecode deployed at an address.

Exact Match (formerly “perfect match”) means the deployed bytecode is identical to the recompiled output, including the metadata hash. Any change to the source, even a comment, breaks it.

Match (formerly “partial match”) means everything matches except the appended metadata hash. Comments, variable names or source paths can differ. The docs say the old name made users think a contract was not verified.

In both cases, linked library addresses and immutable values can differ from the recompiled bytecode, because they are set at link or deploy time.

What to check

  • Whether a contract that holds funds is verified, and at which match level.
  • The library addresses and immutable values, which the match does not cover.
  • For a proxy, the implementation contract as well as the proxy.
  • Whether the verified source matches the commit hash in the audit report. Sourcify does not check this.

Risks to understand

  • A Match, as opposed to an Exact Match, means the metadata hash differs. Comments, variable names or source paths can differ from the deployed version even though the docs say the contract functions the same way.
  • Linked library addresses and immutable values can differ from the recompiled bytecode in both match types. Check them separately.
  • Verification proves deployed code matches some published source. It does not prove that source is the version an auditor reviewed.

Questions

What is the difference between an exact match and a match on Sourcify?
An exact match means the deployed bytecode is identical to the recompiled source including the metadata hash. A match means everything matches except the appended metadata hash, so comments, names or paths may differ.
Does a Sourcify match prove the contract was audited?
No. It shows that the deployed bytecode compiles from the published source. You still need to compare that source with the commit named in the audit report.

Sources

  1. Sourcify docs, introductionaccessed
  2. Sourcify docs, exact match versus matchaccessed

How this page works

“Visit website” always goes to the project’s official site and is never a referral link. Listings are not paid for. Facts come from the sources above and were last checked on the date at the top. If a figure could not be confirmed it is shown as “Not verified”, with no number. This page is educational and is not financial advice. Read the methodology.