Skip to content

Optional pre-buy token safety gate for Base (free preview) #213

Closed as not planned

Description

@rezearcher

Hi, a practical add-on for a Base trading bot: a pre-trade token safety gate, so the bot skips honeypots and thin pools before it buys.

Free, no wallet, no key:

curl -s "https://x402-data-api.sigrunner.workers.dev/gate/swap/preview?token=weth"
# {"decision":"go|hold|block","verdict":"SAFE|CAUTION|AVOID","risk_score":..,"liquidity_usd":..,"impact_pct_of_pool":..,"flags":[..]}

Any Base ERC-20 address works on the preview, 3 checks a day per IP. For unlimited use, the same route over x402 is $0.008 per call in USDC on Base (GET /gate/swap?token=0x…&side=buy&notional_usd=250). It runs a honeypot/sellability simulation, admin-control checks and Uniswap v3 liquidity vs your trade size.

Drop-in guard:

import requests
r = requests.get("https://x402-data-api.sigrunner.workers.dev/gate/swap/preview", params={"token": addr}).json()
if r["decision"] != "go": skip(addr, r["reason"])

Happy to wire it in with a PR if you point me at the buy function. Feel free to close if not relevant.

Activity

  1. VickyXAI commented on Nov 3, 2026

    @VickyXAI
    Contributor

    Closing along with #214. Paid calls from Franklin go through the BlockRun gateway and its spend controls, so we won't wire a direct-to-vendor x402 endpoint into the agent. If you want to offer the token gate to Franklin users, listing it as a partner API on the BlockRun gateway is the way in. Thanks for the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions