
Crypto Trading Bots
Implement DeFi trading automation patterns such as DEX liquidity snipers with ethers and Flashbots-style bundle execution.
Overview
Crypto Trading Bot Engineer is an agent skill for the Build phase that provides DeFi bot patterns including DEX liquidity snipers with ethers and bundled transaction submission.
Install
npx skills add https://github.com/omer-metin/skills-for-antigravity --skill crypto-trading-botsWhat is this skill?
- Documents DEX Token Sniper pattern for post-liquidity buys
- TypeScript structure with ethers Provider, Wallet, and router Contract
- swapExactETHForTokensSupportingFeeOnTransferTokens encoding with slippage bps
- Flashbots bundle provider import for competitive submission
- When-to-use notes for new launches and liquidity events
- DEX Token Sniper pattern documents default 5000 bps (50%) slippage for new tokens
Adoption & trust: 725 installs on skills.sh; 89 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need to automate time-sensitive DEX buys right after liquidity lands without hand-rolling router calls and slippage math from scratch.
Who is it for?
Indie developers building experimental on-chain bots for new token liquidity events who already manage keys and infra.
Skip if: Builders outside crypto, regulated fund workflows without legal review, or anyone treating pattern snippets as audited production code.
When should I use this skill?
When implementing or researching crypto trading bots, DEX snipers, or liquidity-event automation (pattern catalog; no standard SKILL.md frontmatter in excerpt).
What do I get? / Deliverables
You get a structured TypeScript sniper skeleton—routing, minOut slippage guard, swap calldata, and Flashbots-oriented execution hooks—to adapt for your chain and router.
- Adaptable TokenSniper class structure and swap transaction encoding
- Pattern notes for new launches and liquidity-triggered execution
Recommended Skills
Journey fit
Canonical shelf is Build/backend because content is executable bot structure, routers, and on-chain swap logic—not distribution or ops monitoring. Backend covers on-chain integration, wallet flows, and transaction construction for trading bots.
How it compares
Pattern reference for custom bots, not a hosted exchange API integration or backtesting SaaS.
Common Questions / FAQ
Who is crypto-trading-bots for?
Solo builders implementing DeFi automation—especially DEX sniping around liquidity events—using TypeScript, ethers, and optional Flashbots bundles.
When should I use crypto-trading-bots?
During Build/backend when designing new-token launch snipers, liquidity-triggered trades, or other time-sensitive on-chain execution paths.
Is crypto-trading-bots safe to install?
Use the Security Audits panel on this page for package risk; trading skills imply wallet, network, and capital exposure—never deploy unaudited sniper logic with mainnet funds.
SKILL.md
READMESKILL.md - Crypto Trading Bots
# 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);