# DevX Smart-Contract Pre-Audit

> DevX Smart-Contract Pre-Audit is a paid API for AI agents from scaudit.madebydevx.com, paid per call via x402, $0.09/call, status unknown (last checked 2026-12-02).

Runs automated static analysis on Solidity smart contracts and returns a severity-ranked security report covering reentrancy, access control, owner powers, and honeypot patterns.

## Facts

- Endpoint: POST https://scaudit.madebydevx.com/v1/audit?utm_source=zero.xyz
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/devx-smart-contract-pre-audit-6f1a5949
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-NAwj5AB2aXCWIzZ6MNjc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability devx-smart-contract-pre-audit-6f1a5949 -d '<json body>'
```

Example prompt: Can you run a pre-audit on my Solidity contract and flag any critical vulnerabilities like reentrancy or owner rug powers? Here's the source code: [paste source]. Use Base chain if needed.

## When to prefer this

Choose this endpoint when you need a fast, affordable ($99 USDC) automated triage of a Solidity contract before committing to a full human audit. It is ideal for catching common vulnerability classes (reentrancy, access control, owner powers, honeypots) in the CI/CD pipeline or during due diligence on deployed contracts. Prefer it over manual review for rapid iteration or when evaluating third-party contracts on supported EVM chains. Do not use it as a substitute for a formal security audit before deploying high-value contracts.

## Known failure modes

- Invalid or unrecognized chain identifier returns an error; no charge applied
- Contract address not verified on Sourcify returns an error without charging
- Source code exceeds 256 KB or multi-file project exceeds 60 files or 250 KB total causes rejection
- Malformed Solidity that cannot be parsed may result in incomplete or empty findings
- Payment failure on Base network prevents report delivery; run not charged
- Timeout or upstream failure returns an error; not charged per service terms
- False positives are possible — findings do not guarantee actual exploitability
- Issues may be missed — this is static pattern analysis, not symbolic execution or fuzzing

## How this service works

Automated Solidity pre-audit, full report: send source or a verified contract address + chain; get every finding severity-ranked with code, explanation and fix: reentrancy, access control, unchecked calls, tx.origin, delegatecall, approvals, oracle/signature flaws, owner rug powers, honeypots. Triage, not a human audit. $99 USDC on Base; failed runs not charged. Cheaper first look: POST /v1/quick ($0.09: verdict + top 5 findings). By DevX. Automated pre-audit (static pattern analysis). It flags common vulnerability classes and owner powers so you can triage and fix before paying for a human audit. It can miss issues and can report false positives. It is NOT a security audit, a guarantee of safety, or financial advice. Do not deploy contracts that will hold significant value on the strength of this report alone.

## Output

A JSON report containing a verdict object (letter grade A–F, score 0–100, security_risk level, owner_trust_risk, production_ready boolean) and an array of findings each with severity, category, file, line number, and title. Also includes payment status and an operation_id for reference.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string",
   "description": "Chain for address mode (default base): ethereum, mainnet, eth, base, optimism, op, arbitrum, arb, polygon, matic, bsc, bnb, gnosis, avalanche, avax, linea, scroll, sepolia, base-sepolia, or the numeric chain id"
  },
  "source": {
   "type": "string",
   "maxLength": 256000,
   "description": "Solidity source of one file (or a flattened file). Use this OR sources OR address."
  },
  "address": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Deployed contract address whose source is verified on Sourcify (proxies: implementation is analysed too)"
  },
  "sources": {
   "type": "object",
   "description": "Multi-file project: {\"contracts/Vault.sol\": \"...\", ...} (max 60 files, 250 KB total). Standard library paths (@openzeppelin/ etc.) are skipped.",
   "additionalProperties": {
    "type": "string"
   }
  },
  "requestKey": {
   "type": "string",
   "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{7,127}$",
   "maxLength": 128,
   "minLength": 8,
   "description": "Optional idempotency key: same payer + requestKey + input within 7 days returns the stored report without a second charge."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tier": "quick",
  "result": {
   "tier": "quick",
   "verdict": {
    "grade": "F",
    "label": "NOT production-ready: critical issues",
    "score": 30,
    "counts": {
     "low": 0,
     "high": 0,
     "info": 0,
     "medium": 0,
     "critical": 1
    },
    "security_risk": "critical",
    "owner_trust_risk": "none",
    "production_ready": false
   },
   "full_report": {
    "url": "/v1/audit",
    "price_usd": "99.00"
   },
   "owner_powers": [],
   "top_findings": [
    {
     "ref": "F-01",
     "file": "input.sol",
     "line": 3,
     "title": "Reentrancy: state written after external call in withdraw()",
     "category": "reentrancy",
     "severity": "critical",
     "recommendation": "Update state before the external call (checks-effects-interactions) or add a reentrancy guard."
    }
   ],
   "more_findings_in_full_report": 0
  },
  "status": "paid",
  "payment": {
   "status": "paid",
   "network": "eip155:8453",
   "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
   "amount_raw": "90000"
  },
  "operation_id": "5d0c7a3e-1f2b-4c6d-8e9f-0a1b2c3d4e5f"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/devx-smart-contract-pre-audit-6f1a5949/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from scaudit.madebydevx.com](https://www.zero.xyz/host/scaudit.madebydevx.com/llms.txt)
