{"uid":"cap_oFGrtajM75Mb4ChGUgL_M","slug":"defi-shield-hazel-vercel-app-7de42b36","name":"DeFi Shield Pre-Trade Safety Check","description":"","url":"https://defi-shield-hazel.vercel.app/api/defi/pre-trade-check","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"properties":{"chain":{"type":"string","description":"Chain (default: base)"},"amount_usd":{"type":"number","description":"Trade size in USD for MEV/slippage analysis (default: 1000)"},"token_address":{"type":"string","description":"Token contract address (0x + 40 hex chars)"},"slippage_tolerance":{"type":"number","description":"Your planned slippage tolerance in %"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"chain":"base","amount_usd":1000,"token_address":"0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95","slippage_tolerance":0.5},"type":"http","method":"POST","bodyType":"json"}},"response":{"seal":{"chain":"base","token":"0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95","checks":["honeypot","contract","holders","liquidity","mev","goplus","deployer"],"savings":{"saved":"$0.22","message":"This safety check cost $0.10. Self-service equivalent: $0.32 (3 LLM calls). Saved $0.22.","youPaid":"$0.10","multiplier":"3x cheaper","selfServiceWouldCost":"$0.32"},"seal_id":"seal-1780702666048-ftt149","verdict":"CAUTION","version":"2.0","timestamp":"2026-06-05T23:37:46.048Z","confidence":50,"propagation":{"message":"Forward this seal to trading partners — verified safety benefits everyone","threatFeed":"/api/threats/feed","verifyEndpoint":"/api/seals?token=0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95&chain=base"},"carrierBenefit":{"shareWith":"/api/agent-verifications?wallet=<agent_wallet>","description":"Sharing this seal with counterparties proves due diligence","upgradePrice":"$2.50","upgradeEndpoint":"/api/defi/full-scan"},"deployerIntelligence":null},"chain":"base","checks":{"mev":{"risk_score":95,"recommended_slippage":49,"sandwich_probability":0.98,"trade_to_liquidity_ratio":1,"estimated_price_impact_pct":50},"holders":{"count":0,"risk_score":20,"whale_count":0,"top10_concentration":0},"contract":{"is_proxy":false,"verified":false,"risk_score":30,"contract_name":null,"admin_functions":0},"honeypot":{"signals":["source_not_verified"],"risk_score":30,"is_honeypot":false},"liquidity":{"total_usd":0,"risk_score":90,"pairs_found":0},"goplus_flags":[],"deployer_flags":[],"deployer_intelligence":null},"verdict":"CAUTION","riskMath":{"message":"Based on full analysis: 40.0% risk probability. On a $5,000 trade, expected loss without this check would be $1,920.","scenarioTable":[{"roi":"384x","checkCost":"$0.10","tradeSize":"$100","expectedLoss":"$38"},{"roi":"3,840x","checkCost":"$0.10","tradeSize":"$1,000","expectedLoss":"$384"},{"roi":"19,200x","checkCost":"$0.10","tradeSize":"$5,000","expectedLoss":"$1,920"},{"roi":"38,400x","checkCost":"$0.10","tradeSize":"$10,000","expectedLoss":"$3,840"},{"roi":"192,000x","checkCost":"$0.10","tradeSize":"$50,000","expectedLoss":"$19,200"}],"averageLossWhenRugged":"$1,920","estimatedRiskProbability":0.4},"amount_usd":1000,"scanned_at":"2026-06-05T23:37:46.048Z","token_name":"Unknown","savingsMath":{"message":"This analysis costs your agent ~$0.32 to do itself (3 LLM calls + orchestration). You paid $0.10. Saved $0.22 this call. At 20 checks/day: $4.40/day, $132/month in savings.","savedPerDay":"$4.40 (at 20 checks/day)","savedPerCheck":"$0.22","savedPerMonth":"$132","defiShieldCost":"$0.10","selfServiceCost":{"breakdown":"3 LLM calls (~24000 input tokens) + API orchestration + amortized dev time","devTimeCost":"$0.10","apiCallsCost":"$0.050","llmInferenceCost":"$0.162","totalSelfService":"$0.32"},"savingsMultiplier":"3.2x cheaper"},"overall_risk":50,"token_symbol":"???","token_address":"0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95","recommendations":["Contract source not verified — proceed with extreme caution","Very low liquidity ($0) — high slippage and exit risk","Trade size is large relative to pool — split into smaller trades","High sandwich attack risk — use private mempool or MEV protection","Your slippage tolerance (0.5%) may be too low — recommended: 49.00%"],"response_time_ms":442}},"exampleRequest":{"chain":"base","amount_usd":1000,"token_address":"0x833589fCD6eDb6E08f4c7C32D4f71b1566dA3C95","slippage_tolerance":0.5},"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_yDdFVx2WYSR7PKxIF5Ejy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Performs a comprehensive one-call pre-trade safety check on a token or contract, covering honeypot detection, contract risk, holder concentration, liquidity analysis, MEV exposure, and GoPlus security flags.","exampleAgentPrompt":"Before I swap into this token, run a full pre-trade safety check on contract address 0xAbCd...1234 on Ethereum — I want to know if it's a honeypot, the holder concentration, liquidity depth, MEV risk, and any GoPlus flags.","exampleUseCases":null,"resultDescription":"Returns a structured safety report including: honeypot detection result, contract risk indicators, holder concentration analysis, liquidity metrics, MEV exposure assessment, and aggregated GoPlus security flags — plus an overall safety verdict to inform the trade decision.","failureModes":["Invalid or non-existent contract address returns an error or empty result","Unsupported chain ID returns an error indicating the chain is not supported","GoPlus API unavailability may cause partial results or timeout","Unverified contracts may yield incomplete risk signals","Payment failure (x402) blocks the call entirely"],"whenToPreferThis":"Use this endpoint when an AI agent needs a single, comprehensive pre-trade safety check that aggregates multiple DeFi risk signals (honeypot, rug pull, MEV, GoPlus) in one call rather than querying multiple specialized APIs. Ideal for automated trading agents, portfolio managers, or DeFi assistants that need a fast go/no-go signal before executing a swap or investment.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:47:22.868Z","isFirstParty":false}