Skip to content

From the lab · Due diligence

ContractLens. Ask any smart contract what it can do to your money.

Retrieval over a contract's verified source: ask in plain English whether the owner can mint, freeze, change fees or upgrade, and get answers cited to the exact lines, with proxies followed to the code that actually runs.
Research prototype · Led by Maitreya Kulkarni

[ 01 ]Overview

What it is, and what it does.

Before buying a token, integrating a protocol or voting on a proposal, the question that matters is what the code allows, not what the website says. Answering it means reading dozens of files behind a proxy. Token scanners return yes-or-no flags with no reasons, and pasting code into a general chatbot loses the context and gives answers nobody can check.

ContractLens fetches every verified source file from Sourcify, with Etherscan as a fallback, across Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Avalanche and other EVM chains. It detects proxies and indexes the implementation that runs: USDC resolves from its proxy to a 23-file implementation. Code is chunked by structure (one chunk per function or modifier, plus a per-contract outline), deterministic detectors flag privileged functions, minting, blacklists, adjustable fees, upgrade hooks, delegatecall, selfdestruct and tx.origin, and hybrid retrieval merges vector and full-text search.

Every source line is passed to the model as its own citable block, so each claim in an answer maps to exact line numbers. Upload a whitepaper and each of its claims is marked consistent, contradicted or unverifiable against the code. Contract comments and documents are treated as hostile: instructions inside them are ignored, a detector flags text aimed at AI reviewers, and every reference in a report is checked against what the model was shown.

Its retrieval is measured. On its bundled demo token (20 questions) hybrid retrieval puts the answering chunk first 90 percent of the time and in the top five every time; on USDC's real source (15 questions) it is first 80 percent of the time and in the top five every time. Both suites are small, so they serve as regression guards rather than benchmarks. ContractLens speeds up due diligence; it is not an audit, and source code cannot show onchain state such as who holds the owner key today.

[ 02 ]Inside

How it works.

01

Follows proxies

Detects the proxy and indexes the implementation that actually runs, across the major EVM chains.
02

Cited to the line

Every claim links to the exact lines of verified source that support it.
03

Docs against code

Whitepaper claims marked consistent, contradicted or unverifiable, with evidence.
04

Detectors first

Deterministic checks for admin powers, minting, blacklists, fees and upgrade hooks that need no model or key.

Solidity · Retrieval · Citations · Sourcify · Due diligence

Start a build

Want something like it built for you?

A protocol to launch, a payment flow to ship, an asset to tokenize or a codebase to review before mainnet. Tell us where the money sits and we will tell you how we would protect it.

What happens next

  1. 01Tell us what you are buildingA short note or a 30-minute call: the product, the chain if you know it, and where the money sits.
  2. 02Hear back within 48 hoursEvery message is read by the team, not a filter.
  3. 03A first working sessionWe walk through the threat model and the admin powers with you, then propose a scope and a plan.