Solana Token Risk Checks When You Already Run an Indexer
Build your own token risk checks vs use a third-party API: hybrid usually wins; read mint authorities and extensions yourself, then pay for holder and pool labels.
Crypto Bulletin Newsroom 3 min read
For most Solana teams, a hybrid of in-house checks and a paid risk API is worth more than building every label yourself. The answer changes if you already run an indexer and can maintain wallet, pool and locker labels.
A rugcheck reviews a token for warning signs that could point to a scam or rug pull. For a wallet or bot, rugcheck.xyz changes the decision from a raw token read into a risk check that can include labelled holders and pools; the rugcheck work behind those labels is the costly part to reproduce.
Which token risk checks should you build or buy?
Cost per check: Start with the mint account. One Solana getAccountInfo call can read the optional mint_authority and freeze_authority fields. Token-2022 extensions, including permanent delegate and transfer hook, are also in mint account data. These are a few RPC reads and straightforward checks to build and test; an API adds per-call cost.
Holder coverage: getTokenLargestAccounts returns at most 20 of the largest token accounts, not their owners. To assess distribution, you need to map token accounts to owners and identify pool vaults and lockers. That takes an indexer or heavy getProgramAccounts calls; an API sells the indexed data and labels that raw RPC responses lack.
Maintenance and control: Mint authority rules are easy to own. Holder, pool and locker labels need ongoing indexing and upkeep as accounts and programs change. An API shifts that maintenance to a provider, but its scoring rules are outside your control and its rate limits can affect your workflow.
Latency: A direct mint read is one RPC round trip, while a label lookup adds an API dependency and its own network hop. In-house indexing can serve local data quickly, but only after you have built and maintained the index. Measure both paths in the workflow where the check runs.
Who should build in-house, buy an API or use both?
Build in-house when your team already indexes Solana accounts and has staff to keep labels current. You gain control over rules and avoid API fees, while taking responsibility for coverage and maintenance.
Buy a third-party API when you need holder and pool labels but lack an indexer. You pay per call and accept provider limits and scoring rules in exchange for indexed coverage.
Choose hybrid if you lack an indexer: read authorities and Token-2022 extensions yourself, then buy holder and pool labels. Price the API against the indexing and labelling work it replaces, and start by splitting your checks into those two lists.
How should you put the checks into practice?
How should a bot handle an API outage mid-trade?
Set a timeout and define the fallback before trading: pause the trade, or proceed only when your in-house checks meet a rule your team has chosen. Log the API failure separately from a high-risk result so the bot does not treat missing labels as a clean check.
How do you test checks against known rug pulls?
Keep a dated set of known cases and compare each check’s inputs and outputs against it. Include tokens with different authority settings and Token-2022 extensions, and record which labels were available at the time; labels can change as accounts are indexed.
Which fields should a risk check cache, and for how long?
Cache mint fields and parsed extensions with the account slot or fetch time, then refresh according to how quickly your workflow needs changes to appear. Cache holder and pool labels separately, since they depend on indexing and can change independently of mint data.