Rug pulls are the #1 risk for Solana traders. Here's how to detect them programmatically using the Solana RPC API.
1. Mint Authority Active
If the mint authority hasn't been revoked, the token creator can inflate supply infinitely.
const mintInfo = await connection.getParsedAccountInfo(mintPubkey);
const mintAuth = mintInfo.value?.data?.parsed?.info?.mintAuthority;
if (mintAuth) console.log('RED FLAG: Mint authority active');
2. Freeze Authority Active
Freeze authority lets the creator lock any wallet's tokens, preventing sales.
const freezeAuth = mintInfo.value?.data?.parsed?.info?.freezeAuthority;
if (freezeAuth) console.log('RED FLAG: Freeze authority active');
3. Top Holder Concentration
If one wallet holds >30% of supply (excluding liquidity pools), it's a dump risk.
Use getTokenLargestAccounts RPC method to check.
4. Low Liquidity
Check the token's liquidity pool size relative to market cap. If LP is <10% of market cap, exit liquidity is limited.
5. Mutable Metadata
If token metadata can be changed, the name and symbol can be swapped to impersonate legitimate tokens.
Automate It
- Free scan:
/scan <address>in @solscanitbot - Build your own: DeFi Toolkit (0.3 SOL) includes a standalone scanner
- Full bot: Source code (2 SOL) with scanning built in
Top comments (0)