0xJosee.
HomeAboutProjectsBlogContact
0xJosee.

Full-stack developer specializing in Solana DeFi, blockchain engineering, and Web3 application development.

Navigation

HomeAboutProjectsBlogContact

Connect

© 2026 0xJosee. All rights reserved.
Back to Projects
Trading BotsApril 10, 2025

Memecoin Farmer

High-frequency memecoin trading bot with anti-rug protection, sentiment analysis, and rapid entry/exit logic. Built for the chaotic Solana memecoin ecosystem.

SolanaTradingMemecoinTypeScriptJitoPump.fun

The Memecoin Farmer is a high-frequency trading bot purpose-built for the volatile and adversarial Solana memecoin ecosystem. It monitors new token launches on platforms like Pump.fun, evaluates them against a scoring model that combines on-chain analysis with social sentiment data, and executes rapid buy/sell cycles when favorable conditions are detected. The bot includes multiple layers of anti-rug protection to avoid common scam vectors like honeypot contracts, ownership concentration, and liquidity removal attacks.

This project pushed the limits of what I thought was possible in terms of transaction speed on Solana. When you are competing against other bots for early entries on a new token, every millisecond matters and the difference between profit and loss often comes down to how quickly you can get your transaction included in a block.

Token Scoring Engine

At the heart of the bot is a multi-factor scoring system that evaluates newly launched tokens in real time. The scoring model analyzes on-chain data (liquidity depth, holder distribution, contract characteristics) alongside off-chain signals (Twitter mentions, Telegram activity, known wallet associations) to produce a confidence score that determines whether and how much to ape.

interface TokenScore {
  address: string
  liquidityScore: number // 0-100
  holderDistribution: number // 0-100
  socialSentiment: number // 0-100
  contractSafety: number // 0-100
  compositeScore: number // weighted average
  rugProbability: number // 0-1
  maxPositionSize: number // USD
}
 
function computeScore(token: TokenAnalysis): TokenScore {
  const contractSafety = analyzeContract(token)
  const holderDist = analyzeHolderConcentration(token.topHolders)
  const sentiment = analyzeSocialSignals(token.symbol)
  const liquidity = analyzeLiquidity(token.pools)
 
  const rugProbability = estimateRugProbability(
    contractSafety,
    holderDist,
    token.creatorHistory
  )
 
  return {
    address: token.address,
    liquidityScore: liquidity,
    holderDistribution: holderDist,
    socialSentiment: sentiment,
    contractSafety: contractSafety,
    compositeScore: weightedAverage([
      [liquidity, 0.25],
      [holderDist, 0.25],
      [sentiment, 0.2],
      [contractSafety, 0.3],
    ]),
    rugProbability,
    maxPositionSize: computePositionSize(rugProbability),
  }
}

Anti-Rug Protection

The anti-rug module runs a battery of checks before any trade is executed. It verifies that the token's mint authority is revoked, checks that no single wallet holds more than a configurable percentage of supply, confirms that liquidity is locked or burned, and cross-references the deployer wallet against a database of known scam addresses. If any check fails, the token is blacklisted and the bot moves on to the next opportunity.

const SAFETY_CHECKS = [
  checkMintAuthorityRevoked,
  checkFreezeAuthorityRevoked,
  checkTopHolderConcentration,
  checkLiquidityLocked,
  checkDeployerHistory,
  checkHoneypotSimulation,
] as const
 
async function runSafetyChecks(
  token: PublicKey
): Promise<{ passed: boolean; failures: string[] }> {
  const results = await Promise.all(SAFETY_CHECKS.map((check) => check(token)))
  const failures = results.filter((r) => !r.passed).map((r) => r.reason)
  return { passed: failures.length === 0, failures }
}

Execution Layer

Speed is everything in memecoin trading. The bot uses Jito bundles for transaction submission, which allows it to include a tip to validators for priority inclusion. It maintains pre-built transaction templates that only need the token address and amount filled in at execution time, and it uses multiple RPC connections in parallel to minimize latency. The entire pipeline from detecting a new token to submitting a buy transaction typically completes in under 200 milliseconds.

Position management follows strict rules: a hard stop-loss at 30%, a trailing stop that locks in profits, and a maximum hold time after which the position is closed regardless of PnL. These guardrails are critical in a market where tokens can go to zero in minutes.

Results and Reflections

The bot has been profitable overall, though the returns are extremely lumpy. A small number of big winners account for the majority of profits, while most positions result in small losses or breakeven outcomes. The anti-rug module has successfully avoided every major rug pull during its operation period, which is perhaps the most important metric of all. In memecoin trading, capital preservation is the prerequisite for long-term profitability.

Previous ProjectDelta-Neutral LP BotNext ProjectUnified Trading Platform