Solidity review

AI Solidity review on your own model

Paste the contracts. Your model maps who can call what, compares sibling functions, checks every write site of each accounting invariant, and reports each way value or control is taken, with the lines that prove it and the strongest argument against it.

Opens the workbench with Solidity review selected. 1 hosted review per UTC day on your own key. No card.

ExampleExample output · invented contract

VerdictProve first

The share price follows the vault’s raw balance. A seed deposit would close it, and no deployment script was supplied.

  • 0Critical
  • 1High
  • 0Medium
  • 2Hardening
  • 3Checked safe
input-1/SaltmarshVault.solsha2563f9a61c07d2b…112 lines
F-1HighProven in source

A direct transfer moves the share price, and deposit accepts zero shares

  • input-1/SaltmarshVault.sol:44-50
  • input-1/SaltmarshVault.sol:58-60
Impact

The first depositor takes the next deposit in full. Bound: any deposit smaller than the balance donated to the vault.

Observed
  1. totalAssets() returns the vault’s raw token balance (lines 58-60). A plain transfer raises it.
  2. deposit divides by that balance at line 46 and rounds down. Nothing rejects shares == 0.
  3. The attacker deposits 1 unit into the empty vault for 1 share, then transfers 10,000 USDC to the vault.
  4. A victim deposits 9,999 USDC. 9_999e6 * 1 / (10_000e6 + 1) is 0 shares. The attacker redeems 1 share for the whole balance.
input-1/SaltmarshVault.sol44–50
function deposit(uint256 assets, address receiver) external returns (uint256 shares) {
    uint256 supply = totalSupply();
    shares = supply == 0 ? assets : (assets * supply) / totalAssets();
    asset.safeTransferFrom(msg.sender, address(this), assets);
    _mint(receiver, shares);
    emit Deposit(msg.sender, receiver, assets, shares);
}
Counterargument

The deployer seeds the vault in the deployment script, so it is never empty.

OpenNo deployment script was supplied. Lines 44-50 hold no minimum-share check and no dead shares.

Evidence gap
  • The deployment script, or the transaction of the first deposit.
Next

Run the test, then read the deployment script for a seed deposit.

What the Solidity review checks

The profile works through the contracts in a fixed order before it writes anything.

  1. Entry points

    Every external or public function that changes state: who can call it, whether it carries a reentrancy guard, and whether value moves in or out.

  2. Sibling diff

    Each function next to the others that do the same work. A modifier, pause check or checkpoint that one sibling has and another lacks is a finding.

  3. Invariants

    Conservation, ratio, ordering and bounds. For each one, every line that writes the variables involved. One write site that skips the update breaks it.

  4. Value flow and rounding

    Which way every division rounds and who gains, the first deposit into an empty pool, and direct transfers that move a price or a share ratio.

  5. Checkpoints and external calls

    Accumulators updated before a balance changes. State that is stale at the moment of each call, token transfer, hook or callback.

  6. Signatures, oracles, upgrades

    Nonce, deadline and chain id inside the signed data. Stale or movable prices. Initialisers callable twice and privileged setters left open.

What to paste in

The review judges the files you supply and names what it could not see.

  • The contracts in scope

    One file or a small set. Import them from GitHub at a pinned commit to keep line numbers exact.

  • Interfaces, libraries and tokens they callOptional

    A control that lives in an unsupplied file is reported as depending on that file.

  • ContextOptional

    The target, the commit, how the tokens behave, and whether privileged roles are in scope.

Up to 50 files, 120 KB per file, 240 KB and 20,000 lines in total. Paste, drop files, or import a repository, pull request or commit from GitHub at a pinned commit.

What comes back

One review in a fixed format, built to be checked against the source.

  • A verdict and a one-sentence headline.
  • A finding card per issue: severity, basis, location, impact and the path with concrete values.
  • The strongest counterargument to each finding, marked resolved or open.
  • The evidence gap: the one artefact still missing.
  • A fix and a test for each finding.
  • Entry points and Invariants tables, then Hardening and Checked-and-safe lists.
  • A packet with the SHA-256 manifest of every file reviewed.

The rest of the same review

The entry points and the invariants the profile mapped before it reported the finding above.

ExampleExample output · invented contract · SaltmarshVault

Entry points
FunctionLocationCallerGuardValue
depositLocationinput-1/SaltmarshVault.sol:44-50CalleranyoneGuardnoValuein
redeemLocationinput-1/SaltmarshVault.sol:62-71CalleranyoneGuardnoValueout
setFeeRecipientLocationinput-1/SaltmarshVault.sol:83-86CalleradminGuardnoValuenone
Invariants
PropertyStateWhere
Ratio: shares minted for a deposit are worth the assets paid inStateBrokenWhereF-1
Conservation: totalSupply equals the sum of balancesStateHoldsWhereinput-1/SaltmarshVault.sol:48
Bounds: redeem pays out no more than the caller’s shares are worthStateHoldsWhereinput-1/SaltmarshVault.sol:64-66

Questions

Which model runs the review?

The one you choose, on your own key: OpenRouter, Anthropic, OpenAI, Google Gemini, xAI, DeepSeek, Mistral or Groq. With a chat subscription, export the prompt, paste it into your chat app and paste the answer back. From a coding agent, prepare_review hands the same request to the agent’s own model over MCP.

Does it work for a bounty and for my own code?

Yes. In bounty mode the verdict is submit, rewrite-then-submit, prove-first, hold-duplicate or drop. In own-code mode it is fix-before-deploy or no-blocking-issues.

How does it treat admin-only bugs?

A bug that needs the owner or an admin to act against users is listed under Hardening. Say in Context that privileged roles are in scope and it is reported as a finding.

Where do my files go?

To the model provider you choose, through our server, for that one request. Bounty Operator does not store your files, prompts, keys or results. With an exported prompt they go from your browser to the chat app you paste into. The packet you download carries a SHA-256 manifest of every file reviewed.

Run a Solidity review on your contracts

Your model, your key, a line reference for every claim.

Opens the workbench with Solidity review selected. Free: 1 hosted review per UTC day. Operator: unlimited, US$10 per week.