Smart contracts and tokens logo

Smart Contract Auditor

$1.00 USDC per call · Smart contracts and tokens · POST /api/v1/audit-contract · Id contract-auditor

Source-level security review of Solidity: pass/warn/fail verdict, 0-100 risk score, severity-ranked findings with exact file:line, exploit scenario and a fix, plus a SARIF 2.1.0 log. Accepts raw code, a list of files, or an on-chain address (verified source is read from Sourcify). A deterministic detector pass (reentrancy ordering, tx.origin, delegatecall, unchecked calls, weak randomness, pre-0.8 arithmetic) runs beside one model review, and every model finding is checked against the source: its quoted snippet must exist and its line is corrected. A pre-audit triage, not a substitute for a manual audit; it cannot see deployed bytecode, off-chain components or economic assumptions, and not_checked lists what was missing.

What you get

A pre-audit triage pass catches the obvious reentrancy and access-control bugs before a manual audit, so paid auditor hours go to the hard problems. Not a replacement for that audit.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/audit-contract. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/audit-contract \
  -H 'content-type: application/json' \
  -d '{"code":"pragma solidity ^0.8.20;\ncontract Vault {\n  mapping(address => uint256) public balances;\n  function deposit() external payable { balances[msg.sender] += msg.value; }\n  function withdraw() external {\n    (bool ok, ) = msg.sender.call{value: balances[msg.sender]}(\"\");\n    require(ok);\n    balances[msg.sender] = 0;\n  }\n}","contractName":"Vault"}'

Input

FieldTypeRequiredDescription
codestring; length 1..100000noRaw Solidity source (one or more files concatenated). Provide exactly one of code, files or address.
contractNamestring; length 0..200noContract to focus on when several are present.
filesarray<object>; max 40 itemsnoAlternative to code: Solidity files with repository-relative paths. Findings report the file and line, and the SARIF log points at them.
addressstringnoAlternative to code: an on-chain contract address. Its verified source is read from Sourcify (no API key); unverified contracts return 404.
chainIdinteger; 1..2147483647noEVM chain id for address; default 1 (Ethereum mainnet).

Example request body

{
  "code": "pragma solidity ^0.8.20;\ncontract Vault {\n  mapping(address => uint256) public balances;\n  function deposit() external payable { balances[msg.sender] += msg.value; }\n  function withdraw() external {\n    (bool ok, ) = msg.sender.call{value: balances[msg.sender]}(\"\");\n    require(ok);\n    balances[msg.sender] = 0;\n  }\n}",
  "contractName": "Vault"
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
summarystringyes
overall_riskstring; one of "critical", "high", "medium", "low", "informational", "none"yes
findingsarray<object>yes
verdictstring; one of "fail", "warn", "pass", "inconclusive"yesfail: a critical or high finding of medium or high confidence. warn: other findings. pass: only informational notes or none (not proof of safety). inconclusive: no findings but part of the source was not reviewed.
verdict_reasonstringyes
risk_scoreintegeryes0-100, computed in code from finding severity and confidence.
statusstring; one of "complete", "partial"yespartial when files were left out of the review; the result is still signed and not_checked says what is missing.
next_stepstringyes
top_findingsarray<object>yes
sourceobjectyesWhere the source came from: kind (code, files, sourcify), file paths reviewed, and for Sourcify the address, chainId, match type, compiler and verification time.
sarifobjectyesSARIF 2.1.0 log, one result per finding at its file and line; uploads to GitHub code scanning as-is.
contract_namesarray<string>yesParsed from the source, not model-generated.
compiler_versionstringyesParsed pragma expression, or "unspecified".
not_checkedarray<string>yesWhat this review could not see; an empty findings list does not cover these.
severity_countsobjectyes
lines_of_codeintegeryes

Pay and connect

Available through: x402 (USDC on Base), MCP, RapidAPI.

Machine-readable