# DeFi Risk Scoring

> DeFi Risk Scoring is a paid API for AI agents from risk-api-production-af85.up.railway.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-15).

Scores DeFi transactions and tokens for risk, detecting honeypots, scam patterns, and slippage issues before execution.

## Facts

- Endpoint: POST https://risk-api-production-af85.up.railway.app/score-tx?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-risk-scoring-5857d323
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HGoChEJDKPlZ1Mit9pNoY

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 defi-risk-scoring-5857d323 -d '<json body>'
```

Example prompt: Before I swap, can you run a risk score on this transaction — it's going to contract 0xAbC...123 with calldata 0xa9059cbb...000 and a value of 0.5 ETH, with 50 basis points of slippage tolerance? I want honeypot and scam pattern checks.

## When to prefer this

Use this endpoint when an AI agent or user wants to validate a DeFi transaction before execution — particularly when interacting with unknown tokens, new contracts, or high-value swaps. Ideal for catching honeypots, rug pulls, and scam contract patterns before funds are at risk. Prefer this over generic blockchain explorers when you need a structured, machine-readable risk score with slippage awareness rather than manual contract inspection.

## Known failure modes

- Invalid or malformed contract address returns a validation error
- Unrecognized calldata format may limit scam pattern detection accuracy
- Contracts on unsupported chains may return incomplete or null scores
- Extremely high slippage values may be flagged as high-risk even for legitimate trades
- Network timeout if the target chain RPC is slow or unavailable

## How this service works

Transaction and token risk scoring. Honeypot detection, scam patterns, slippage checks.

## Output

Returns a risk score and structured flags for the submitted transaction, including honeypot detection status, identified scam patterns, slippage risk assessment, and an overall risk rating to help the agent decide whether to proceed with or abort the transaction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "data": {
   "type": "string"
  },
  "value": {
   "type": "string"
  },
  "slippageBps": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-risk-scoring-5857d323/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from risk-api-production-af85.up.railway.app](https://www.zero.xyz/host/risk-api-production-af85.up.railway.app/llms.txt)
