How to check if a smart contract is legit
How to check if a smart contract is legit before you deposit: confirm the official address, verified source, upgrade rights, admin keys and audits.
A smart contract can have verified source code and a well-known auditor’s name on the project site, and still be a different contract from the one that was audited. To check if a smart contract is legit, confirm it is the project’s official address, that its source is verified, who can upgrade it and whether its audits cover the deployed code.
“Legit” here means the contract is what its project says it is. No check proves that code is safe. The steps below show whether the public claims around a contract hold up, using free tools, with a worked example on a Compound III market read on 30 November 2026.
What does it mean for a smart contract to be legit?
A legitimate smart contract, for due diligence purposes, is one whose address and code match what the project publishes, and whose control setup matches its disclosures. That definition can be tested. “Safe” cannot, because every review has limits.
The Security Alliance framework says external reviews are “not a certificate of safety”. Treat each step below as a test of one claim, and record the result whether it passes or fails.
Step 1: confirm the official contract address
Get the address from the project’s own documentation or its deployment files on its official GitHub, then confirm the app uses the same one. A perfect copy of a real contract at a different address is still the wrong contract.
Compound, for example, keeps its deployment addresses in its public repository. The roots.json file for the USDC market on Ethereum lists the Comet contract at 0xc3d688B66703497DAA19211EEdff47f25384cdc3. When the address in your wallet prompt matches the address in the project’s own files, you have a starting point.
Step 2: check that the source code is verified
Source verification is the process of recompiling a contract’s published source and confirming it produces the bytecode deployed at the address. ethereum.org puts the reason in one line: “the advertised contract code may be different from what runs on the blockchain.”
Check the address on Etherscan and on Sourcify. Sourcify distinguishes two results:
| Result | What Sourcify’s docs say it means |
|---|---|
| Exact match | Bytecode matches byte for byte, excluding libraries and immutables, and the metadata hash matches, so the source files are identical |
| Match | Bytecode matches, but the metadata hash differs or was not checked, so source files may differ in comments or names |
ethereum.org adds a warning: without an exact match, it is possible to insert malicious code that would not show in the verified source. A “match” is common and does not prove a problem. Record which one you found.
In the Compound example, Sourcify’s API returned an exact match for the cUSDCv3 proxy address and for its current implementation, as of 30 November 2026.
Step 3: find out if the contract can be upgraded
An upgradeable contract keeps its address while the code behind it can be replaced. Many DeFi contracts are built this way, so the question is who can upgrade and how fast.
Read the EIP-1967 implementation slot, or use Etherscan’s proxy check. Etherscan’s own proxy page warns that it does not verify whether the code in its “Read as Proxy” tab is what executes, so confirm the slot value yourself. Our guide to upgradeable smart contracts walks through the method on the same Compound market.
When the contract is a proxy, repeat Step 2 on the implementation address. A verified proxy in front of an unverified implementation tells you little.
Step 4: identify who controls the contract
Every privileged role, such as owner, admin, upgrader or pauser, belongs to an address. Find each one, decide whether it is a single key or a multisig, and check whether a delay applies.
- Read
owner()or the admin slot, and check role grants in the explorer logs. - If the holder has no code, it is a single private key.
- If it is a Safe, read its threshold and signers, as covered in our guide to multisig admin keys.
- If a timelock sits in the path, read its delay with the timelock controller guide.
In the Compound example, the upgrade path for the USDC market ends at a timelock with a 2-day delay, controlled by the Compound Governor contract.
Step 5: match the audits to the deployed code
An audit covers named files at one commit. Open each report from the auditor’s own site, note the commit and compare it with the deployed implementation. Our guide on how to read a smart-contract audit report covers the comparison in detail.
Then check whether a bug bounty is live and covers the contracts that hold funds. On Immunefi, the program’s Scope tab lists the assets in scope. The differences between audits, contests and bounties are covered in audit vs bug bounty vs contest.
Which warning signs are not proof of fraud?
Some findings call for caution without proving bad intent. Record them as open questions and avoid labelling a project on that basis alone.
| Finding | Why it is not proof by itself | What to do |
|---|---|---|
| Source verified as “match” and not “exact match” | Common when metadata files were not kept | Record it and read the verified code |
| Anonymous team | Publishing code without names is a choice some teams make | Give the control setup more weight |
| No audit for a recent upgrade | Reviews take time to publish | Note the gap and check again later |
| Admin is a single key | It may be temporary during launch | Record it and check whether a move to a multisig is announced |
A pattern of gaps matters more than any single one. A contract with unverified code and a single-key upgrader leaves you with nothing to check against.
What should you record before depositing?
A short record makes the check repeatable and lets you see when something changes. Write down the date and block for each item:
- Official address and the page or file it came from.
- Verification result for the proxy and the implementation.
- Upgrade path and the delay, if any.
- Admin type, threshold and signers.
- Audits matched to the deployed commit, and bounty scope.
Anything you could not confirm goes on the list as “not verified”. The due diligence checklists category collects the related guides.
Questions
- What does a verified contract mean on Etherscan?
- It means someone submitted source code and compiler settings that recompile to the bytecode at that address. It tells you what the code does. It says nothing about whether the code is safe or who controls it.
- Can a verified smart contract still be a scam?
- Yes. Verification makes the code readable. The code can still give an owner the power to upgrade it or move funds. Read the access control and the admin addresses after you confirm verification.
- What is the difference between an exact match and a match on Sourcify?
- Sourcify's docs say an exact match recompiles byte for byte with the same metadata hash, so the source files are identical to those deployed. A match recompiles to the same bytecode but the source files may differ, for example in comments.
- How do I find the official contract address of a DeFi protocol?
- Use the protocol's own documentation or its deployment files on its official GitHub, then confirm the same address appears in the app you connect to. Avoid copying addresses from search ads, replies or direct messages.
Sources
- ethereum.org, verifying smart contractsaccessed
- Sourcify docs, exact match versus matchaccessed
- Etherscan Information Center, proxy contractsaccessed
- Compound comet repo, mainnet USDC roots.json (Comet address)accessed
- Sourcify API, verification record for cUSDCv3 proxy 0xc3d688B66703497DAA19211EEdff47f25384cdc3 (as of 30 Nov 2026)accessed
- Sourcify API, verification record for implementation 0x0B07565A8ef48170e15918b251EbD95109B23255 (as of 30 Nov 2026)accessed
- Compound Timelock 0x6d903f6003cca6255D85CcA4D3B5E5146dC33925, delay() and admin() read via public RPC at block 26529398 (as of 30 Nov 2026)accessed
- Security Alliance, external security reviews frameworkaccessed