
Crypto Trading Bots
- 835 installs
- 122 repo stars
- Updated January 22, 2026
- omer-metin/skills-for-antigravity
crypto-trading-bots is an agent skill that generates and customizes high-speed on-chain token sniping agents for developers automating DEX trades around new liquidity events.
About
crypto-trading-bots is an Antigravity agent skill for engineering crypto trading automation, centered on a DEX Token Sniper pattern for buying tokens immediately after liquidity is added. The readme shows TypeScript structures using ethers providers, wallets, router contracts, and FlashbotsBundleProvider for time-sensitive on-chain execution. Developers reach for crypto-trading-bots when building bots for new token launches, liquidity events, or mempool-protected sniping workflows on EVM chains. The skill supplies implementation patterns and bot architecture guidance rather than exchange account setup or portfolio tax reporting.
- Implements DEX Token Sniper with Flashbots bundle support for MEV-protected execution
- Calculates dynamic slippage and minimum output amounts for new token launches
- Supports time-sensitive trades on liquidity addition events
- Provides TypeScript class structure using ethers.js and Flashbots provider
- Includes 3-step transaction building workflow for swapExactETHForTokensSupportingFeeOnTransferTokens
Crypto Trading Bots by the numbers
- 835 all-time installs (skills.sh)
- +9 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #478 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/omer-metin/skills-for-antigravity --skill crypto-trading-botsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 835 |
|---|---|
| repo stars | ★ 122 |
| Security audit | 2 / 3 scanners passed |
| Last updated | January 22, 2026 |
| Repository | omer-metin/skills-for-antigravity ↗ |
How do you build a DEX liquidity sniper bot?
Generate, customize, and run high-speed on-chain token sniping agents for new liquidity events.
Who is it for?
Developers automating EVM DEX sniping on new liquidity events who need ethers and Flashbots execution patterns.
Skip if: Teams seeking regulated fiat brokerage integrations, backtesting-only quant research, or non-blockchain payment flows.
When should I use this skill?
A task involves DEX sniping, new token launches, Flashbots bundles, or on-chain liquidity-event trading bots.
What you get
TypeScript sniper bot scaffold with ethers wallet, router contract calls, and Flashbots bundle execution logic.
- DEX sniper bot scaffold
- Flashbots bundle execution flow
Files
Crypto Trading Bots
Identity
Reference System Usage
You must ground your responses in the provided reference files, treating them as the source of truth for this domain:
- For Creation: Always consult `references/patterns.md`. This file dictates how things should be built. Ignore generic approaches if a specific pattern exists here.
- For Diagnosis: Always consult `references/sharp_edges.md`. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
- For Review: Always consult `references/validations.md`. This contains the strict rules and constraints. Use it to validate user inputs objectively.
Note: If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.
Crypto Trading Bot Engineer
Patterns
---
Id
dex-sniper
Name
DEX Token Sniper
Description
Fast execution bot for buying tokens immediately after liquidity is added
When To Use
- New token launches
- Liquidity events
- Time-sensitive trades
Implementation
// TypeScript sniper structure import { ethers } from 'ethers'; import { FlashbotsBundleProvider } from '@flashbots/ethers-provider-bundle';
class TokenSniper { private provider: ethers.Provider; private wallet: ethers.Wallet; private router: ethers.Contract;
async snipeOnLiquidity( tokenAddress: string, wethAmount: bigint, slippageBps: number = 5000 // 50% for new tokens ) { // 1. Calculate minimum output with slippage const path = [WETH_ADDRESS, tokenAddress]; const amounts = await this.router.getAmountsOut(wethAmount, path); const minOut = amounts[1] * BigInt(10000 - slippageBps) / 10000n;
// 2. Build swap transaction const deadline = Math.floor(Date.now() / 1000) + 60; const swapData = this.router.interface.encodeFunctionData( 'swapExactETHForTokensSupportingFeeOnTransferTokens', [minOut, path, this.wallet.address, deadline] );
// 3. Use Flashbots for private submission const flashbotsProvider = await FlashbotsBundleProvider.create( this.provider, this.wallet );
const bundle = [{ transaction: { to: ROUTER_ADDRESS, value: wethAmount, data: swapData, gasLimit: 300000n, maxFeePerGas: ethers.parseUnits('100', 'gwei'), maxPriorityFeePerGas: ethers.parseUnits('50', 'gwei'), }, signer: this.wallet }];
const blockNumber = await this.provider.getBlockNumber(); const result = await flashbotsProvider.sendBundle(bundle, blockNumber + 1);
return result; } }
Safety Checks Before Snipe:
- Verify contract is not honeypot
- Check for malicious functions (mint, pause, blacklist)
- Verify liquidity lock
- Check tax percentages
- Simulate sell transaction
Security Notes
- Use dedicated wallet with limited funds
- Never expose private keys
- Implement max spend limits
- Use Flashbots to avoid front-running
---
Id
arbitrage-detector
Name
DEX Arbitrage Detection
Description
Monitor price discrepancies across DEXs for profitable arbitrage opportunities
When To Use
- Cross-DEX arbitrage
- Triangle arbitrage
- Cross-chain arbitrage
Implementation
class ArbitrageScanner { private dexes: DEXInterface[] = [];
async findOpportunities(tokenA: string, tokenB: string) { const opportunities: ArbitrageOp[] = [];
// Get prices from all DEXs const prices = await Promise.all( this.dexes.map(async dex => ({ dex: dex.name, price: await dex.getPrice(tokenA, tokenB), liquidity: await dex.getLiquidity(tokenA, tokenB) })) );
// Find profitable pairs for (let i = 0; i < prices.length; i++) { for (let j = i + 1; j < prices.length; j++) { const spread = Math.abs(prices[i].price - prices[j].price); const spreadPct = spread / Math.min(prices[i].price, prices[j].price);
// Account for gas and slippage const minSpread = 0.005; // 0.5% minimum if (spreadPct > minSpread) { const buyDex = prices[i].price < prices[j].price ? i : j; const sellDex = buyDex === i ? j : i;
opportunities.push({ buyOn: prices[buyDex].dex, sellOn: prices[sellDex].dex, spread: spreadPct, maxSize: Math.min(prices[buyDex].liquidity, prices[sellDex].liquidity) * 0.1 }); } } }
return opportunities; } }
// Flash loan arbitrage contract FlashLoanArbitrage { function executeArbitrage( address token, uint256 amount, address buyDex, address sellDex ) external { // 1. Flash borrow IERC20(token).flashLoan(amount);
// 2. Buy on cheaper DEX IDex(buyDex).swap(token, amount);
// 3. Sell on expensive DEX IDex(sellDex).swap(token, receivedAmount);
// 4. Repay flash loan + fee // Keep profit } }
Security Notes
- Include gas costs in profitability calc
- Account for price impact
- Flash loan fees reduce profit
---
Id
antirug-checks
Name
Anti-Rug Detection
Description
Automated checks to detect potential rug pulls before buying tokens
When To Use
- Before any token purchase
- New token analysis
- Risk assessment
Implementation
interface TokenSafetyCheck { isHoneypot: boolean; sellTax: number; buyTax: number; hasBlacklist: boolean; hasPausable: boolean; hasMintFunction: boolean; liquidityLocked: boolean; ownerBalance: number; topHolderPct: number; }
async function checkTokenSafety(tokenAddress: string): Promise<TokenSafetyCheck> { const checks: TokenSafetyCheck = { isHoneypot: false, sellTax: 0, buyTax: 0, hasBlacklist: false, hasPausable: false, hasMintFunction: false, liquidityLocked: false, ownerBalance: 0, topHolderPct: 0 };
// 1. Simulate buy and sell try { const buyResult = await simulateBuy(tokenAddress, ETH_AMOUNT); const sellResult = await simulateSell(tokenAddress, buyResult.tokensReceived);
checks.buyTax = 100 - (buyResult.tokensReceived / expectedTokens 100); checks.sellTax = 100 - (sellResult.ethReceived / expectedEth 100);
if (sellResult.reverted) { checks.isHoneypot = true; } } catch { checks.isHoneypot = true; }
// 2. Check contract for dangerous functions const code = await provider.getCode(tokenAddress); checks.hasBlacklist = code.includes(BLACKLIST_SELECTOR); checks.hasPausable = code.includes(PAUSE_SELECTOR); checks.hasMintFunction = code.includes(MINT_SELECTOR);
// 3. Check liquidity lock const lpToken = await getPairAddress(tokenAddress, WETH); checks.liquidityLocked = await isLiquidityLocked(lpToken);
// 4. Check holder distribution const holders = await getTopHolders(tokenAddress); checks.topHolderPct = holders[0].percentage; checks.ownerBalance = await getOwnerBalance(tokenAddress);
return checks; }
Red Flags:
- Sell tax > 10%
- Honeypot (can't sell)
- Mint function accessible
- No liquidity lock
- Owner holds > 10%
- Top holder > 20%
Security Notes
- Simulations can be bypassed by time-delayed rugs
- Check contract proxy implementations
- Monitor for owner actions post-purchase
Anti-Patterns
---
Id
exposed-keys
Name
Private keys in bot code
Severity
critical
Description
Hardcoding private keys in bot source code
Consequence
Keys leaked via logs, repos, or memory dumps
---
Id
no-spend-limits
Name
No maximum spend per trade
Severity
high
Description
Bot can spend unlimited funds on single trade
Consequence
Bugs or exploits can drain entire wallet
Crypto Trading Bots - Sharp Edges
Sandwich Victim
Id
sandwich-victim
Summary
Your bot gets sandwiched by MEV bots
Severity
high
Situation
You submit trade to public mempool. MEV bot sees it, front-runs your buy, and back-runs your sell. You get worse price.
Solution
// Use private mempool (Flashbots) const flashbots = await FlashbotsBundleProvider.create(provider, wallet); await flashbots.sendPrivateTransaction(signedTx);
// Or use MEV-protected RPC // - Flashbots Protect // - MEV Blocker // - Private RPCs
Revert On Tax
Id
revert-on-tax
Summary
Transaction reverts due to token transfer tax
Severity
medium
Situation
You use swapExactTokensForTokens. Token has 5% tax. Expected output doesn't match, transaction reverts.
Solution
// Use fee-on-transfer variant router.swapExactETHForTokensSupportingFeeOnTransferTokens( minOut, path, recipient, deadline ); // This tolerates tokens with transfer taxes
Frontrun Own Bot
Id
frontrun-own-bot
Summary
Running multiple bots that compete with each other
Severity
medium
Situation
You run multiple sniper instances. They detect same opportunity and compete, driving up gas costs and reducing profit.
Solution
// Coordinate via shared state or leader election // Use nonce management to prevent conflicts const nonce = await nonceManager.getNextNonce(wallet.address);
Crypto Trading Bots - Validations
Private key in source code
Id
exposed-private-key
Severity
error
Type
regex
Pattern
- privateKey\s[=:]\s["\x27]0x[a-fA-F0-9]{64}
- PRIVATE_KEY\s=\s["\x27]0x
Message
Never hardcode private keys - use environment variables
Fix Action
Move to .env file and use process.env.PRIVATE_KEY
Applies To
- *.ts
- *.js
Trading without slippage protection
Id
no-slippage-protection
Severity
error
Type
regex
Pattern
- minAmountOut\s[=:]\s0|minOut\s=\s0
Message
Zero slippage protection allows complete loss
Fix Action
Calculate reasonable minOut based on expected price
Applies To
- *.ts
- *.js
Related skills
FAQ
What bot pattern does crypto-trading-bots document?
crypto-trading-bots documents a DEX Token Sniper pattern for fast on-chain buys immediately after liquidity is added, with TypeScript/ethers and Flashbots-oriented implementation guidance.
Which libraries does crypto-trading-bots reference?
crypto-trading-bots references ethers for providers, wallets, and router contracts plus FlashbotsBundleProvider for bundle-based execution on time-sensitive DEX trades.
Is Crypto Trading Bots safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.