Add Kokosh plugin (wallet-hygiene audit via x402)#148
Conversation
Kokosh is a wallet-hygiene sentinel agent for Base mainnet: tracks token/Permit2 allowance exposure and flags scam-airdrop tokens by name/URL/homoglyph heuristics, with a paid /audit report ($0.01 USDC via x402). - integration: http-api, chains: [base], risk: [irreversible] - Documents a real smart-account-signature incompatibility with x402's exact scheme (Base MCP's default smart wallet returns an ERC-1271/6492 signature, but standard USDC transferWithAuthorization only accepts raw ecrecover) rather than glossing over it — hand-verified working end to end with an EOA signer, not yet verified with a smart wallet. - Adds `wallet-hygiene` to the shared tag vocabulary (net-new tag). Self-reviewed against the plugin spec with the plugin-review skill; report at https://github.com/Kajko25/kokosh/blob/main/docs/base-mcp-plugin/kokosh-review.md
🟡 Heimdall Review Status
|
…works Live-tested paying this plugin's own /audit endpoint from a Coinbase Smart Wallet (Base Account) via Base MCP's native initiate_x402_request / complete_x402_request tools. It settled successfully. Root cause: USDC's transferWithAuthorization bytes-signature overload (selector 0xcf092995) validates through a SignatureChecker that accepts ERC-1271/6492 contract-wallet signatures, unlike the classic (v,r,s) overload (0xe3ee160e) this caveat originally assumed. Kokosh's facilitator (CDP-hosted, via @coinbase/x402) uses the bytes overload, so the smart-wallet failure mode does not apply here. Softened the blanket "will fail" language accordingly and noted that Base MCP's native x402 tools are the better default path when available. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Update: live-tested this plugin's smart-wallet caveat against real mainnet settlement. Paid this exact Updated the plugin's "Smart-wallet caveat" section to reflect this and to recommend Base MCP's native x402 tools over the plugin's manual |
Summary
/auditreport ($0.01 USDC via x402).integration: http-api,chains: [base],risk: [irreversible].wallet-hygiene) to the shared vocabulary inplugin-spec.md, per Contribution Scope.Notable finding
## Submissiondocuments a real compatibility gap rather than a happy-path-only flow: Base MCP's default wallet is a smart contract account, whosesign()returns an ERC-1271/6492-shaped signature. Standard USDCtransferWithAuthorization(used by x402'sexactscheme) verifies with plainecrecoveronly, so it will reject that signature. The plugin was hand-verified working end-to-end (real mainnet USDC settlement) with an EOA signer, and explicitly instructs the agent to stop rather than submit a payment authorization likely to fail settlement when the active wallet is a smart contract. Flagging for maintainers in case this is relevant to other x402-paying plugins.Self-review
Ran the
plugin-reviewskill against the current spec before opening this PR — verdict 🟡 approve with minor changes (both addressed: file relocated to the correct path,wallet-hygienetag flagged/added). Full report: https://github.com/Kajko25/kokosh/blob/main/docs/base-mcp-plugin/kokosh-review.mdTest plan
integration,shell,auth,risk)/audit,/exposure,/drops,/healthzendpoints live-tested against the deployed agent (https://kokosh-agent.vercel.app)