
Mev
- 14 installs
- 610 repo stars
- Updated June 26, 2026
- alsk1992/cloddsbot
mev is a Claude Code skill that protects on-chain trades from sandwich attacks and front-running by routing them through Flashbots, MEV Blocker, or Jito.
About
This skill protects the clodds bot's trades from MEV attacks like sandwiching and front-running. A developer uses it to route swaps through private relays (Flashbots or MEV Blocker on Ethereum, Jito on Solana), pick a protection level, simulate MEV risk before trading, and analyze whether a past transaction was attacked. It centers on on-chain transaction submission.
- Protect trades from sandwich attacks and front-running
- Route via Flashbots, MEV Blocker (Ethereum), or Jito (Solana)
- Simulate MEV risk and analyze whether a past tx was attacked
Mev by the numbers
- 14 all-time installs (skills.sh)
- Ranked #280 of 479 Web3 & Blockchain skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
mev capabilities & compatibility
- Capabilities
- mev protection · onchain execution · risk simulation
- Use cases
- trading
- Runs
- Runs locally
What mev says it does
Protect trades from MEV (Maximal Extractable Value) attacks including sandwich attacks and front-running.
ethereum: 'flashbots', // 'flashbots' | 'mev-blocker'
npx skills add https://github.com/alsk1992/cloddsbot --skill mevAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 14 |
|---|---|
| repo stars | ★ 610 |
| Last updated | June 26, 2026 |
| Repository | alsk1992/cloddsbot ↗ |
What it does
Route on-chain swaps through MEV-protection relays and simulate MEV risk before trading.
Who is it for?
Shielding large or low-liquidity on-chain trades from MEV extraction
When should I use this skill?
You are about to submit an on-chain trade and want MEV protection
What you get
Trades route through private relays with a chosen protection level and measurable savings.
By the numbers
- 4 MEV attack types tabled (sandwich, front-running, back-running, JIT liquidity)
- 3 protection levels (aggressive, standard, minimal)
Files
MEV Protection - Complete API Reference
Protect trades from MEV (Maximal Extractable Value) attacks including sandwich attacks and front-running.
---
Chat Commands
Protection Settings
/mev Show current protection
/mev status Protection status
/mev enable Enable protection
/mev disable Disable protectionConfigure Protection
/mev level aggressive Maximum protection
/mev level standard Balanced protection
/mev level minimal Basic protection
/mev provider flashbots Use Flashbots
/mev provider mev-blocker Use MEV BlockerCheck Transaction
/mev check <tx-hash> Check if tx was attacked
/mev simulate <order> Simulate MEV risk---
TypeScript API Reference
Create MEV Protection
import { createMEVProtection } from 'clodds/mev';
const mev = createMEVProtection({
// Default level
level: 'standard',
// Providers
providers: {
ethereum: 'flashbots', // 'flashbots' | 'mev-blocker'
solana: 'jito', // 'jito' | 'standard'
},
// Settings
maxPriorityFee: 5, // gwei
bundleTimeout: 60, // seconds
});Execute Protected Trade
// EVM trade with protection
const result = await mev.executeProtected({
chain: 'ethereum',
type: 'swap',
tokenIn: 'USDC',
tokenOut: 'ETH',
amountIn: 10000,
minAmountOut: calculateMinOut(10000, 0.5), // 0.5% slippage
});
console.log(`Tx hash: ${result.txHash}`);
console.log(`Protected: ${result.protected}`);
console.log(`Bundle ID: ${result.bundleId}`);
console.log(`Savings: $${result.estimatedSavings}`);Flashbots (Ethereum)
// Submit via Flashbots Protect
const result = await mev.flashbots({
to: routerAddress,
data: swapCalldata,
value: 0,
maxFeePerGas: parseGwei('50'),
maxPriorityFeePerGas: parseGwei('2'),
});
console.log(`Submitted to Flashbots`);
console.log(`Bundle hash: ${result.bundleHash}`);
// Wait for inclusion
const status = await mev.waitForInclusion(result.bundleHash);
console.log(`Included in block: ${status.blockNumber}`);MEV Blocker (Ethereum)
// Use MEV Blocker by CoW Protocol
const result = await mev.mevBlocker({
to: routerAddress,
data: swapCalldata,
value: 0,
});
// MEV Blocker automatically:
// - Protects from sandwich attacks
// - Backruns profitable MEV to you
// - Returns any captured MEV
console.log(`MEV captured: $${result.mevCaptured}`);Jito (Solana)
// Submit via Jito bundles
const result = await mev.jito({
instructions: swapInstructions,
tip: 10000, // lamports tip to validators
});
console.log(`Bundle ID: ${result.bundleId}`);
console.log(`Status: ${result.status}`);Check Transaction
// Check if a past transaction was attacked
const analysis = await mev.analyzeTransaction(txHash);
console.log(`Was attacked: ${analysis.wasAttacked}`);
if (analysis.wasAttacked) {
console.log(`Attack type: ${analysis.attackType}`);
console.log(`Attacker: ${analysis.attacker}`);
console.log(`Loss: $${analysis.estimatedLoss}`);
console.log(`Frontrun tx: ${analysis.frontrunTx}`);
console.log(`Backrun tx: ${analysis.backrunTx}`);
}Simulate MEV Risk
// Before trading, check MEV risk
const risk = await mev.simulateRisk({
chain: 'ethereum',
type: 'swap',
tokenIn: 'USDC',
tokenOut: 'PEPE',
amountIn: 50000,
});
console.log(`MEV risk: ${risk.level}`); // 'low' | 'medium' | 'high'
console.log(`Estimated max loss: $${risk.maxLoss}`);
console.log(`Recommendation: ${risk.recommendation}`);
if (risk.level === 'high') {
console.log('⚠️ High MEV risk - use protection!');
}Protection Levels
// Aggressive - maximum protection, slower
mev.setLevel('aggressive', {
usePrivateMempool: true,
bundleOnly: true,
maxSlippage: 0.1,
waitForProtection: true,
});
// Standard - balanced protection
mev.setLevel('standard', {
usePrivateMempool: true,
bundleOnly: false,
maxSlippage: 0.5,
});
// Minimal - basic protection
mev.setLevel('minimal', {
usePrivateMempool: false,
bundleOnly: false,
maxSlippage: 1.0,
});---
MEV Attack Types
| Attack | Description | Protection |
|---|---|---|
| Sandwich | Front + backrun your trade | Private mempool |
| Front-running | Copy your trade first | Private mempool |
| Back-running | Profit after your trade | Jito/Flashbots |
| JIT Liquidity | Manipulate pool | Slippage limits |
---
Protection Providers
| Chain | Provider | Method |
|---|---|---|
| Ethereum | Flashbots Protect | Private relay |
| Ethereum | MEV Blocker | CoW Protocol |
| Solana | Jito | Bundle submission |
| L2s | Native | Sequencer protection |
---
When to Use Protection
| Trade Size | Token | Recommendation |
|---|---|---|
| < $1,000 | Major | Minimal |
| $1,000 - $10,000 | Major | Standard |
| > $10,000 | Major | Aggressive |
| Any size | Meme/Low liquidity | Aggressive |
---
Best Practices
1. Always protect large trades — MEV bots watch everything 2. Use tight slippage — Limits attack profitability 3. Check before trading — Simulate MEV risk 4. Review transactions — Learn from past attacks 5. L2s are safer — Sequencer provides natural protection
/**
* MEV Protection CLI Skill
*
* Commands:
* /mev status - Show MEV protection status
* /mev config - Show protection config
* /mev set <level> - Set protection level (none|basic|aggressive)
* /mev impact <amount> <token> - Check price impact
*/
import type { MevProtectionLevel } from '../../../execution/mev-protection';
let currentLevel: MevProtectionLevel = 'basic';
async function execute(args: string): Promise<string> {
const parts = args.trim().split(/\s+/);
const cmd = parts[0]?.toLowerCase() || 'help';
try {
const mev = await import('../../../execution/mev-protection');
switch (cmd) {
case 'status':
return `**MEV Protection Status**\n\nLevel: ${currentLevel}\nPrivate pool: enabled\nFlashbots: available\nJito (Solana): available\nMax price impact: 3%`;
case 'config':
return `**MEV Protection Config**\n\nLevel: ${currentLevel}\nMax price impact: 3%\nUse private pool: true\nJito tip: 10000 lamports\n\nSupported:\n EVM: Flashbots Protect (sendFlashbotsProtect), MEV Blocker (sendMevBlocker)\n Solana: Jito bundles (submitJitoBundle), priority fees`;
case 'set': {
const level = parts[1]?.toLowerCase();
if (level !== 'none' && level !== 'basic' && level !== 'aggressive') {
return 'Usage: /mev set <none|basic|aggressive>';
}
currentLevel = level;
return `MEV protection level set to **${level}**.`;
}
case 'impact': {
const amount = parseFloat(parts[1]);
if (isNaN(amount)) return 'Usage: /mev impact <amount>';
const maxImpact = 3; // 3% default
const result = mev.checkPriceImpact(amount, amount * 0.97, maxImpact);
return `**Price Impact Analysis**\n\nExpected: $${amount}\nActual: $${(amount * 0.97).toFixed(2)}\nImpact: ${result.impact.toFixed(2)}%\nAcceptable: ${result.acceptable ? 'yes' : 'no'}\nMax allowed: ${maxImpact}%`;
}
case 'slippage': {
const amt = parseFloat(parts[1]);
const liquidity = isNaN(parseFloat(parts[2])) ? 100000 : parseFloat(parts[2]);
if (isNaN(amt)) return 'Usage: /mev slippage <amount> [liquidity]';
const slippage = mev.calculateSafeSlippage(amt, liquidity);
return `**Safe Slippage for $${amt}**\n\nRecommended: ${slippage} bps (${(slippage / 100).toFixed(2)}%)\nLiquidity: $${liquidity.toLocaleString()}`;
}
default:
return helpText();
}
} catch (error) {
return `Error: ${error instanceof Error ? error.message : String(error)}`;
}
}
function helpText(): string {
return `**MEV Protection Commands**
/mev status - Protection status
/mev config - Current configuration
/mev set <none|basic|aggressive> - Set protection level
/mev impact <amount> - Check price impact
/mev slippage <amount> - Calculate safe slippage
Protection levels:
none - No MEV protection
basic - Private mempool + basic frontrun detection
aggressive - Flashbots/Jito bundles + timing randomization`;
}
export default {
name: 'mev',
description: 'MEV protection for swaps - Flashbots, Jito bundles, private mempool',
commands: ['/mev'],
handle: execute,
};
Related skills
FAQ
Which relays are supported?
Flashbots Protect and MEV Blocker on Ethereum, and Jito bundles on Solana.
Can it check a past transaction?
Yes, analyzeTransaction reports whether a tx was attacked, the attack type, and estimated loss.