Skip to content

Add onedollaraudit skill — $1 x402 smart contract audits - #590

Open
clawdbotatg wants to merge 1 commit into
BankrBot:mainfrom
clawdbotatg:feature/onedollaraudit-skill
Open

Add onedollaraudit skill — $1 x402 smart contract audits#590
clawdbotatg wants to merge 1 commit into
BankrBot:mainfrom
clawdbotatg:feature/onedollaraudit-skill

Conversation

@clawdbotatg

Copy link
Copy Markdown

What

Adds the onedollaraudit skill: smart contract security audits for $1 USDC via x402 on Base — no signup, no API key. The payment is the authorization.

Agents POST a contract address (verified on Basescan/Etherscan) or pasted Solidity source to https://leftclaw.services/api/audit, pay with a gasless EIP-3009 signature (@x402/fetch handles the 402 → sign → retry dance; the wallet needs ~$1 USDC on Base, no ETH), and get a jobId back. The written report — vulnerabilities, logic errors, access control issues, gas notes, with severity ratings and fix recommendations — lands asynchronously, most within the hour. Agents poll the free, unauthenticated JSON job API at https://onedollaraudit.com/api/jobs/<jobId> or register a callbackUrl in the POST body to get pushed the result.

The service is live in production — onedollaraudit.com is the front desk for LeftClaw Services' audit pipeline, jobs settle on-chain (LeftClawServicesV2 on Base), and the auditor is registered as agent #21548 on the ERC-8004 Identity Registry so agents can leave on-chain reviews after their audit.

What's in the PR

  • onedollaraudit/SKILL.md — frontmatter in house style (💵, homepage, requires.env: ["PRIVATE_KEY"]) plus the full working viem + @x402 TypeScript payment script, the polling/callback flow, x402 v2 header details, and usage rules (one contract per $1 job; descriptions are public on-chain; a serious first pass, not a substitute for a full manual audit on high-TVL systems)
  • onedollaraudit/catalog.json — schemaVersion 1, demo snippet, setup steps, standard install block
  • README.md — Available Skills row in alphabetical position (between onchainkit and opensea)

Canonical skill file (kept in sync): https://www.onedollaraudit.com/skill.md

New skill directory (SKILL.md + catalog.json) for One Dollar Audit /
LeftClaw Services: agents POST a contract address or Solidity source to
https://leftclaw.services/api/audit, pay $1 USDC via x402 (gasless
EIP-3009 on Base, no signup or API key), then poll the free JSON job API
at onedollaraudit.com/api/jobs/<jobId> (or register a callbackUrl) for
the written security report. Includes the full working viem + @x402
TypeScript payment script and adds the README Available Skills row in
alphabetical position.

@saltoriousSIG saltoriousSIG left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things to address!

  • The x402 wrapper signs whatever payment challenge the endpoint returns. Please require local validation of the exact host, Base chain, Base USDC contract, pinned payee, and maximum 1,000,000 raw-unit price; reject mismatches, alternate payment URLs, or unexpected facilitators. Show the terms and obtain final user confirmation before signing unless a local autopay policy and spend cap exist.

  • The paid POST lacks idempotency and ambiguous-failure handling. Add a stable idempotency key if supported, allow only one payment attempt per approved audit, forbid blind retries after timeouts or lost responses, and document recovery from the authorization or on-chain event before paying again.

  • The direct contract calls and ERC-8004 review can submit transactions without final confirmation or receipt validation. Require a preview of chain, contract, selector, arguments, token amount/value, spender, gas, and fees; then wait for a mined receipt and verify the expected event.

  • Submitted source and descriptions become public on-chain. Require explicit confirmation before publishing private source, unreleased contract details, repository material, or other sensitive data. Callback destinations should be user-approved, allowlisted HTTPS hosts, not arbitrary HTTP URLs.

  • Job responses, callbacks, reports, IPFS/HTML URLs, and remote skill content are untrusted. Explicitly prohibit following returned instructions, install commands, wallet actions, payment requests, or arbitrary links, and treat audit findings as advisory rather than proof of security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants