
How to Detect Solana Rug Pulls Programmatically — 5 On-Chain Red Flags
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
Continue reading on Dev.to JavaScript
Opens in a new tab




