Skill 15 mev protection
Skill vaquarkhan/web3-agent-skills/skills/skill-15-mev-protection
Production-grade Agent Skills for Web3 AI agents: 15 workflows, 6 MCP servers, DeFi/NFT/compliance guardrails, and VS Code/JetBrains installers.
npx -y skills add vaquarkhan/web3-agent-skills --skill skill-15-mev-protectionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Protects transactions from MEV via Flashbots, intent-based trading, sandwich attack mitigation, and TWAP orders. Use for high-value swaps, liquidations, or any MEV-exposed on-chain activity.
SKILL.md
2.6 KB, as published. Nobody here has run it
MEV Protection
When to Use
- Executing swaps > $1,000 on public mempools
- Protecting against sandwich attacks
- Submitting liquidation transactions
- Implementing TWAP/VWAP execution strategies
- Using intent-based protocols (CoW Swap, UniswapX)
Prerequisites
- MCP:
blockchain-rpc-server,price-feed-server - Skill-12 for private tx submission
MEV Attack Vectors
| Attack | Mechanism | Mitigation |
|---|---|---|
| Sandwich | Front-run buy + back-run sell | Private mempool, slippage limits |
| Frontrunning | Copy profitable tx with higher gas | Flashbots bundle, commit-reveal |
| Backrunning | Arbitrage after your tx | Accept (usually harmless) |
| JIT Liquidity | Temporary LP around your swap | TWAP, smaller chunks |
Workflow
1. Private Transaction Submission
Ethereum (Flashbots Protect):
RPC: https://rpc.flashbots.net
- No revert protection by default — add
X-Flashbots-Signaturefor bundles - Transactions not visible in public mempool
MEV-Share: Share MEV refund with searchers while maintaining privacy.
2. Intent-Based Trading
| Protocol | Chain | Mechanism |
|---|---|---|
| CoW Swap | Ethereum | Batch auctions, MEV redistribution |
| UniswapX | Multi | Dutch auctions, filler network |
| 1inch Fusion | Multi | Resolver competition |
Prefer intent-based routing for trades > $10,000.
3. TWAP Execution
For large orders splitting across time:
chunkSize = totalAmount / numChunks
interval = totalDuration / numChunks
- Split order into N equal chunks
- Execute each via private RPC with randomized timing (±10%)
- Monitor cumulative slippage vs benchmark price
- Pause if cumulative slippage exceeds threshold
4. Slippage Configuration
| Trade Size | Recommended Slippage | Method |
|---|---|---|
| < $1K | 0.5% | Public or private |
| $1K–$10K | 0.5–1% | Private mempool |
| $10K–$100K | TWAP 5–10 chunks | Intent or Flashbots |
| > $100K | TWAP + intent protocol | CoW/UniswapX |
Pre-Execution
- Private RPC configured for target chain
- Slippage and deadline set on swap params
- Simulation confirms no revert
- User confirmed if trade > $10,000
References
references/flashbots-setup.mdreferences/intent-protocols.md