---
name: webacy
description: Use when screening blockchain wallets for risk, analyzing smart
  contracts and tokens, monitoring transactions, detecting sanctions exposure,
  evaluating stablecoins and vaults, or building AI agents that need real-time
  onchain risk intelligence before making decisions.
metadata:
  mintlify-proj: webacy
  version: "1.0"
---

# Webacy Skill

## Product Summary

Webacy is a blockchain risk intelligence platform that provides real-time analysis of onchain entities—wallets, transactions, smart contracts, tokens, stablecoins, and vaults—across 12+ blockchains. Agents use Webacy to screen addresses for sanctions, malicious activity, and behavioral risk; simulate transactions before execution; analyze token security; and monitor assets for changes in risk. Access the API via REST endpoints at `https://api.webacy.com`, TypeScript SDK (`@webacy-xyz/sdk`), CLI, webhooks, or MCP server. Authenticate with an API key from [developers.webacy.co](https://developers.webacy.co/) or pay per request with x402 (USDC on Base). Primary docs: [https://docs.webacy.com](https://docs.webacy.com).

## When to Use

Reach for Webacy when:

- **Screening wallets before interaction** — Check if a deposit address, counterparty, or user wallet carries sanctions exposure, hack involvement, mixer activity, or other risk flags before processing funds or onboarding.
- **Pre-transaction validation** — Simulate a transaction before signing to detect if it would transfer to a risky recipient, approve a malicious contract, or interact with a honeypot token.
- **Token due diligence** — Analyze a token contract for security vulnerabilities, hidden taxes, rug pull indicators, or malicious functions before listing or trading.
- **Smart contract auditing** — Evaluate a contract for ownership risks, upgradeability, reentrancy, unchecked calls, and other structural or code-level issues.
- **Compliance workflows** — Check addresses against sanctions lists, detect mixer usage, trace fund flows from risky sources, or build automated AML policies.
- **Stablecoin and vault monitoring** — Monitor depeg risk, yield changes, TVL movements, or governance shifts in real time via webhooks.
- **AI agent decision-making** — Enable autonomous agents to evaluate risk before executing trades, approvals, or fund transfers; use x402 keyless payments for pay-as-you-go access.
- **Ongoing risk monitoring** — Set up webhooks to receive alerts when a monitored wallet's risk profile changes or a stablecoin depegs.

## Quick Reference

### API Base URL and Versioning

| Endpoint | URL |
|----------|-----|
| Production | `https://api.webacy.com` |
| Development | `https://api-development.webacy.com` |
| v2 (default) | No prefix: `/addresses/{address}`, `/contracts/{address}` |
| v3 | Prefix: `/v3/vaults/{address}`, `/v3/rwa/grades` |

**Never use `/api/` prefix** — requests to `/api/v3/...` return 403.

### Authentication Methods

| Method | Header | Use Case |
|--------|--------|----------|
| API Key | `x-api-key: YOUR_KEY` | Standard integration, managed keys |
| x402 Keyless | `x-webacy-entry: x402` + payment signature | Autonomous agents, pay-per-request |
| MCP Server | `x-api-key: YOUR_KEY` | Claude Code, Cursor, AI editors |

### Core Endpoints by Use Case

| Use Case | Endpoint | Response Time |
|----------|----------|----------------|
| Quick wallet risk | `GET /addresses/{address}/quick-profile` | ~200ms |
| Full wallet analysis | `GET /addresses/{address}` | ~500ms |
| Sanctions check | `GET /addresses/sanctioned/{address}` | ~100ms |
| Transaction simulation | `POST /scan/{fromAddress}/transactions` | ~1–3s (cold), ~50ms (cached) |
| Contract analysis | `GET /contracts/{address}` | ~1–2s |
| Token analysis | `GET /tokens/{address}` | ~2–8s |
| Holder analysis | `GET /holder-analysis/{address}` | ~2–5s |

### Risk Score Bands

| Score Range | Label | Action |
|-------------|-------|--------|
| 0–23 | Low Risk | Approve |
| 23.1–50 | Medium Risk | Review |
| 50.1–100 | High Risk | Block or escalate |

### Supported Chains

Ethereum (eth), Solana (sol), Base (base), BNB Smart Chain (bsc), Polygon (pol), Arbitrum (arb), Optimism (opt), Sui (sui), Stellar (stellar), Bitcoin (btc), Sei (sei), Hedera (hedera).

### SDK Installation

```bash
npm install @webacy-xyz/sdk
```

For specific functionality:
```bash
npm install @webacy-xyz/sdk-threat      # Addresses, contracts, sanctions
npm install @webacy-xyz/sdk-trading     # Holder analysis, sniper detection
```

### CLI Quick Commands

```bash
# Set API key
export WEBACY_API_KEY=your_key

# Analyze an address
webacy addresses analyze 0x742d35Cc6634C0532925a3b844Bc454e4438f44e --chain eth

# Check sanctions
webacy addresses check-sanctioned 0x742d35Cc6634C0532925a3b844Bc454e4438f44e --chain eth

# Analyze a contract
webacy contracts analyze 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --chain eth

# Simulate a transaction
webacy addresses scan-transaction 0xYourAddress --chain eth --raw 0x...
```

## Decision Guidance

### When to Use Quick Profile vs Full Analysis

| Scenario | Use | Why |
|----------|-----|-----|
| Real-time user interaction (deposit, swap) | `quick-profile` | ~200ms response, covers most risk signals |
| Compliance review or investigation | Full `/addresses/{address}` | Detailed breakdown, fund-flow exposure, all tags |
| High-volume screening | `quick-profile` + batch | Faster, lower cost; escalate to full if flagged |
| Pre-transaction check | `quick-profile` first, then simulate | Reject obvious risks fast, then validate transaction |

### When to Use REST API vs SDK vs CLI

| Scenario | Use | Why |
|----------|-----|-----|
| Backend service, production | REST API + SDK | Type-safe, retry logic, error handling built-in |
| Local testing, one-off checks | CLI | Fast, no code needed |
| AI agent, autonomous system | SDK + x402 keyless | Structured errors, automatic retries, pay-as-you-go |
| Webhook monitoring | REST webhooks | Event-driven, no polling, real-time alerts |

### When to Use API Key vs x402 Keyless

| Scenario | Use | Why |
|----------|-----|-----|
| Predictable volume, production app | API Key | Shared quota, lower per-request cost at scale |
| Autonomous agent, variable load | x402 Keyless | No key management, pay only for what you use |
| Development, testing | API Key (Demo tier) | Free tier available, simple setup |

## Workflow

### 1. Screen a Wallet for Risk

1. **Get your API key** — Sign up at [developers.webacy.co](https://developers.webacy.co/), generate a key, store it securely.
2. **Make the request** — Call `GET /addresses/{address}?chain=eth` with the `x-api-key` header.
3. **Check the overall risk** — Read `overallRisk` (0–100) and `riskScore` (Low/Medium/High).
4. **Review risk factors** — Inspect `issues[].tags[]` to understand why the score is elevated (e.g., `DPRK`, `HACK`, `mixer`).
5. **Trace fund flows (optional)** — Add `fund_flow_exposure=true` to check if the wallet was funded by risky sources; poll until `status: complete`.
6. **Take action** — Block, escalate, or approve based on your risk policy and the underlying signals.

### 2. Simulate a Transaction Before Signing

1. **Prepare the unsigned transaction** — Serialize it as a 0x hex string (use `ethers.Transaction.from({...}).unsignedSerialized` or equivalent).
2. **Call the simulation endpoint** — `POST /scan/{fromAddress}/transactions` with the serialized tx and chain ID.
3. **Inspect the simulation** — Check `simulation[].txData` for asset movements, `simulation[].counterpartyRisk` for recipient risk, `simulation[].assetRisk` for token risk.
4. **Display to user** — Show counterparty risk with color coding (high > 0 = warn or block), asset risk if high, function risk if present.
5. **Block or approve** — If `counterpartyRisk.high > 0` or `assetRisk.high > 0`, warn or block; otherwise allow.

### 3. Analyze a Token Before Listing or Trading

1. **Call the contract analysis endpoint** — `GET /contracts/{contractAddress}?chain=eth`.
2. **Check for honeypots** — If `isHoneypot: true`, block immediately.
3. **Review vulnerabilities** — Inspect `source_code_analysis.vulnerabilities[]` for critical issues.
4. **Check holder concentration** — Call `GET /holder-analysis/{address}` to see if top 10 holders control >80% (rug risk).
5. **Measure taxes** — Use `GET /trading-lite/{address}?chain=eth` to detect hidden buy/sell taxes.
6. **Make listing decision** — Approve if no honeypot, no critical vulns, holder distribution is healthy, and taxes are disclosed.

### 4. Set Up Real-Time Monitoring with Webhooks

1. **Create a webhook endpoint** — Build an HTTPS endpoint that receives POST requests and verifies the `X-Webhook-Signature` header (HMAC-SHA256).
2. **Create a subscription** — `POST /webhooks/subscriptions` with your endpoint URL and filters (e.g., `tiers: ["high"]`, `chains: ["eth"]`).
3. **Save the secret** — Store the `secret_key` from the response in your environment.
4. **Verify signatures** — On each webhook POST, verify the signature using the secret before processing.
5. **React to events** — Handle `DEPEG_TIER_CHANGE` or other event types and trigger your workflow (alert, de-risk, escalate).

### 5. Build an AI Agent with Risk Screening

1. **Install the SDK** — `npm install @webacy-xyz/sdk`.
2. **Initialize a ThreatClient** — `new ThreatClient({ apiKey: process.env.WEBACY_API_KEY, defaultChain: Chain.ETH })`.
3. **Screen before action** — Before executing a trade or approval, call `client.addresses.analyze(walletAddress)`.
4. **Check the score** — If `overallRisk > 50`, skip the action or escalate.
5. **Use x402 for keyless access** — For autonomous agents, use x402 payments instead of managing keys; the SDK handles the challenge-pay-retry loop.

## Common Gotchas

- **Never expose your API key** — Do not commit it to version control, include it in client-side code, or share it in logs. Use environment variables or a secrets manager.
- **Treat missing or stale data as unknown, not safe** — If `analyzed_at` is old, `stale: true` is present, or the endpoint returns an error, fail closed (block/escalate). Never assume an empty response means low risk.
- **Fund-flow exposure is opt-in and priced separately** — Add `fund_flow_exposure=true` only when needed; each poll is billed. Wait the full `retry_after_seconds` between polls and cap retries to ~8 attempts.
- **Empty simulation array is inconclusive** — If `simulation[]` is empty, the transaction either reverts or has no detectable asset movement. Treat it as unknown, not safe.
- **Batch endpoints for high volume** — Use batch methods (e.g., `POST /v3/vaults/grades/batch`) to screen multiple addresses in one request and reduce API calls.
- **Rate limits are per organization, not per key** — All keys share the same monthly quota and request rate. If you rotate keys, both count against the same limit.
- **Chain parameter is required** — Always specify `?chain=eth` (or the appropriate chain). Omitting it returns an error.
- **v3 endpoints use a different path prefix** — `/v3/vaults/{address}` is not `/vaults/{address}`. Check the docs for which version you need.
- **Retry logic for 429 errors** — For rate-limit 429s with `details.resetAt`, wait until that time before retrying. For 429s without `details`, use exponential backoff. For monthly quota exhaustion, upgrade your plan instead of retrying.
- **Transaction simulation requires unsigned serialized tx** — Do not send `to`, `data`, `value` fields separately; send the full serialized 0x hex string or a mined tx hash.

## Verification Checklist

Before submitting work with Webacy:

- [ ] **API key is secure** — Stored in environment variables, not in code or logs.
- [ ] **Chain parameter is correct** — Specified for every request (e.g., `?chain=eth`).
- [ ] **Risk score is interpreted correctly** — 0–23 = Low, 23.1–50 = Medium, 50.1–100 = High.
- [ ] **Stale data is handled** — Check `analyzed_at`, `stale`, or `generated_at` fields; fail closed if missing or old.
- [ ] **Error responses are handled** — Check HTTP status code before processing body; retry 429s and 503s with backoff; do not retry 401 or 400.
- [ ] **Fund-flow exposure polling is bounded** — Cap retries to ~8 attempts, wait full `retry_after_seconds`, stop if `unavailable`.
- [ ] **Transaction simulation is validated** — Check `simulation[].counterpartyRisk` and `simulation[].assetRisk` before approving; treat empty simulation as unknown.
- [ ] **Webhook signatures are verified** — HMAC-SHA256 verification passes before processing any webhook event.
- [ ] **Batch requests are used for high volume** — Multiple addresses screened in one call where available.
- [ ] **Rate limits are monitored** — Usage tracked via `/api-usage` endpoint; plan upgraded if approaching quota.

## Resources

- **Comprehensive page navigation** — [https://docs.webacy.com/llms.txt](https://docs.webacy.com/llms.txt)
- **Getting Started** — [https://docs.webacy.com/getting-started](https://docs.webacy.com/getting-started)
- **API Reference** — [https://docs.webacy.com/api-reference/introduction](https://docs.webacy.com/api-reference/introduction)
- **SDK Documentation** — [https://docs.webacy.com/sdk/introduction](https://docs.webacy.com/sdk/introduction)

---

> For additional documentation and navigation, see: https://docs.webacy.com/llms.txt