# Base Token Dehydrator Gateway (x402 & MCP) > Production Web3 Pre-Trade Security & Dehydrated Liquidity Probe for AI Trading Agents on Base Mainnet (ChainID 8453). ## Agent Intention & Capabilities - **Free A2A membership (2 free points on signup)**: one command — `curl -fsSL https://a2a.musefish.trade/register_a2a.py | python3 -` (needs `eth-account` + `requests`) — generates a wallet, signs EIP-191, solves the SHA-256 proof of work, and registers in one request. Manual route: `POST https://a2a.musefish.trade/api/v1/invitations` or MCP `generate_a2a_invitation`. Protocol: `https://a2a.musefish.trade/api/v1/invitations/protocol`. - **Rugpull & Honeypot Prevention**: Instant on-chain EVM bytecode probe checking for selfdestruct, proxy vulnerabilities, hidden mints, and ownership renouncement. The first `check_base_token_safety` call with only `token_address` returns a free market preview (not the full report); add `payer_address` to receive the invoice. - **Dehydrated Market Depth**: Cleaned DEX liquidity pools, 24h volume, price impact, and buy/sell transaction count. - **Machine-to-Machine Micro-billing**: Powered by Coinbase x402 v2 standard. 0.01 USDC per call with zero human intervention or API keys. - **Image Matting & Background Removal**: Instant transparent RGBA PNG generation via native PyTorch RMBG-1.4 engine. 0.01 USDC via x402. ## Errors (read this before retrying) - Every failure is JSON with `error` (stable machine code), `detail` (specific readable cause), `hint` (the next action) and `docs`. - `400 invalid_registration_request` also carries `missing_fields`, `invalid_fields` and `field_rules`; fix exactly those keys and retry once. - Other registration codes: `signature_invalid`, `nonce_reused`, `nonce_expired`, `pow_invalid`, `inviter_not_found`, `wallet_registered`, `ip_quota_exceeded`. - `422 invalid_parameters` carries `invalid_fields`; `429 rate_limited` carries `retry_after_s` (wait it out, never tight-loop); `5xx` carries `request_id` and a failed call is never charged. - MCP transport errors use JSON-RPC `error.message` plus `error.data.hint`. ## Availability - Availability is runtime-based: there is no weekday or weekend cutoff. `status.json` reports open/maintenance state and backend health; during explicit maintenance paid calls return 503 before any invoice is issued, so no payment is owed. - Gateway admission status: `https://a2a.musefish.trade/status.json`. ## Endpoints - **MCP Server (Streamable HTTP)**: `https://a2a.musefish.trade/mcp/` - Required headers: `Content-Type: application/json` and `Accept: application/json, text/event-stream`. - Responses are a single JSON-RPC object; the server does not emit SSE event framing. - Tool Name: `check_base_token_safety` - Input: `{"token_address": "0x..."}` (required; no default token) for the free preview; add `"payer_address": "0x..."` to receive the invoice. - Free previews are rate limited to 60 per hour per IP. - **REST x402 Endpoint**: `https://a2a.musefish.trade/api/v1/token-report` (GET or POST) - A token-only call returns **HTTP 402 whose body already contains `free_preview`**; read that body as data, not as a failure. Add `payer_address` to receive the invoice for the full report. - Settlement retries accept the same fields as JSON body **or** query parameters on POST, and as query parameters on GET. - **Membership balance**: `https://a2a.musefish.trade/api/v1/members/{wallet_address}` - **Free tools** (no payment, no invoice): `get_a2a_registration_protocol`, `generate_a2a_invitation`, `get_arcade_auth_message`, `slots_state`, and `slots_spin` (spends 1 game point from the signup grant). - **Live Visual Dashboard**: `https://a2a.musefish.trade/` - **Blog**: `https://a2a.musefish.trade/blog/five-minute-window` ## Pricing & Settlement - **Per-call prices** (Base USDC, x402 exact scheme): - `check_base_token_safety` / `POST /api/v1/token-report`: **0.01 USDC** - `remove_image_background` / `POST /api/v1/image/remove-bg`: **0.01 USDC** - `fast_code_audit`: **0.02 USDC** - `deep_protocol_reasoning`: **0.10 USDC** - `simulate_mev_route_safety` / `POST /api/v1/simulate-route`: **1.50 USDC** - Offer page for the simulation (inputs, returned fields, limits): https://a2a.musefish.trade/simulate - **Membership points**: signup awards 2 points (3 with an inviter code); paid tools can be settled with points via `_meta['x402/payment'] = {method:'points', invoice_id, signature, payer_address}`. - **Rate limits**: registration 20/min per IP; free token previews and preview-invoice issuance 60/hour per IP (shared by MCP and REST); new invoices 3 per IP per 10 minutes (paid retries exempt); admin verification 10 per 5 min. Exceeding them returns 429 with `retry_after_s` (MCP: JSON-RPC `-32000` with `data.retry_after_s`). - **Idempotency**: retrying an identical registration nonce returns `replayed: true` with `points_awarded_now: 0`; a paid invoice settles at most once. - **Network**: Base Mainnet (EIP-155:8453) - **USDC Asset**: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` - **Recipient Wallet**: `0xA75E1a201552Cad0282d01C09DC95d9559642FBb` - **Failures**: Service admission depends on runtime availability, not office hours or weekdays. If execution fails after payment, points are released automatically and on-chain payments are reconciled manually within 24 hours.