Our API called wrapped SOL a scam. Twice.
Our API called wrapped SOL a scam. Twice.
During live testing of our token risk API, the deep report came back for wrapped SOL, the most legitimate token on Solana, with this verdict:
{ "verdict": "avoid", "score": 100, "reasons": ["risk score 100"] }
Twice in a row. The third call, a minute later, returned allow with a score of 1. Same token, same code, three different answers within a minute. That pattern rules out bad logic and points at the network.
What the upstream actually said
Curling RugCheck directly for the WSOL mint returned a clean bill: score_normalised of 1, no risks, 30 DexScreener pairs, $25M liquidity. Our parsing was correct too. So the worker was not receiving that response at all. It was receiving failures, mapping them to null, and our fail-closed default turned null into 100, maximum risk.
The failures were HTTP 429s. RugCheck allows roughly 6 to 10 requests per second per IP with a bucket of about 3. Cloudflare Workers egress through IP ranges shared with thousands of other tenants, so that bucket is usually already empty when our request arrives. From a laptop with a fresh residential IP, everything passes. From the worker fleet, it flaps.
The fix, in two parts
First, retry 429s and 5xx twice with linear backoff, and return immediately on 404 so unknown mints never burn retry budget. That is the whole fetcher change.
Second, a design change the incident forced: unpaid callers now always meet the paywall, even when upstream comes back empty. Previously an empty upstream returned 404, which meant registry probes and agent frameworks saw "not found" instead of "payment required" on flaky minutes. The 404 truth is now reserved for presented payment, which is never charged when there is nothing to report.
After deploying, WSOL scored allow/1 three times in a row.
The lesson for paid APIs on serverless
Fail-closed is the right default for a safety product, but "unknown" has two very different causes: the token genuinely has no data, and your own fetch failed. Conflating them means you sell your cheapest verdict at your highest price with the lowest confidence. Distinguish transport failure from empty data at the fetch layer, retry the former, and only let the latter reach your scoring.
If you run an agent that screens Solana mints before sizing into them, the endpoint from this story is live at api.ogenalabs.com/api/token-risk, with three free deep reports a day and no API key. The docs have the OpenAPI spec and the curlable skill.