[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EMK4PV3HWWX116BCT40KV2":3,"skill-same:01M6EMK4PV3HWWX116BCT40KV2":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":41,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6EMK4PV3HWWX116BCT40KV2","defi-mev-battletest",null,"Expert knowledge for DeFi\u002FMEV bot development including critical pitfalls, backtesting realities, AMM mechanics, MEV extraction strategies, and production failure modes","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fbarissozen\u002Fdefi-mev-battletest\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"defi","defi mev battletest","bot","development","extraction","Production","knowledge","expert","backtesting","strategies","mechanics","critical","2026-11-10 10:12:30",false,"---\nname: defi-mev-battletest\ndescription: Expert knowledge for DeFi\u002FMEV bot development including critical pitfalls, backtesting realities, AMM mechanics, MEV extraction strategies, and production failure modes\n---\n\n# DeFi\u002FMEV Battle-Tested Expert Skill\n\n**MANDATORY CONSULTATION**: This skill MUST be consulted for ANY DeFi bot development, MEV strategy implementation, or automated trading system. Real-world failures and lessons learned here prevent catastrophic losses.\n\n## Trigger Keywords\n- arbitrage, MEV, searcher, bot, automated trading\n- backtest, simulation, paper trading\n- flash loan, sandwich, frontrun\n- slippage, price impact, execution\n- reorg, race condition, mempool\n- market making, liquidity provision\n\n---\n\n## 1. CRITICAL PITFALL #1: \"Arbitrage is Risk-Free\" MYTH\n\n**Reality**: Theoretical 0% risk, practical tail risk = DEATH\n\n### Hidden Risks in \"Risk-Free\" Arbitrage:\n\n```\n❌ Execution Risk\n- Transaction reverts after gas spent\n- Partial fills leave you with unwanted inventory\n- Contract bugs in target protocols\n\n❌ Reorg Risk (CRITICAL)\n- Your profitable tx can be uncle'd\n- 1-2 block reorgs happen DAILY on Ethereum\n- Your \"profit\" disappears, gas cost remains\n\n❌ Gas Spike Risk\n- Base fee can 10x mid-execution\n- Priority fee auctions drain profits\n- Failed tx still costs full gas\n\n❌ Latency Risk\n- Block already mined before your tx lands\n- State changed between simulation and execution\n- Other searchers front-ran you\n```\n\n### Real Numbers:\n```typescript\n\u002F\u002F What you see in backtest:\nconst theoreticalProfit = 0.05; \u002F\u002F 5% clean profit\n\n\u002F\u002F What actually happens:\nconst executionCosts = {\n  gasOnSuccess: 0.01,      \u002F\u002F 1% gas\n  failureRate: 0.30,       \u002F\u002F 30% of txs fail\n  gasOnFailure: 0.01,      \u002F\u002F Still pay gas\n  reorgRate: 0.02,         \u002F\u002F 2% get reorg'd\n  slippageSlip: 0.005,     \u002F\u002F 0.5% unexpected slippage\n};\n\n\u002F\u002F Real expected value:\n\u002F\u002F 0.70 * (0.05 - 0.01) - 0.30 * 0.01 - 0.02 * 0.04 = 0.0238\n\u002F\u002F 47% of theoretical profit GONE before MEV competition\n```\n\n---\n\n## 2. CRITICAL PITFALL #2: Backtest Overconfidence\n\n**80% of bots that fail in production looked great in backtests**\n\n### Why Backtests Lie:\n\n```\n❌ Historical State ≠ Future Block State\n- You're simulating against KNOWN state\n- Live: state changes between blocks\n- Mempool competition invisible in historical data\n\n❌ Gas & Latency are Ex-Post Unknowable\n- You backtest with actual gas prices\n- Live: you must PREDICT gas prices\n- Priority fee auctions are adversarial games\n\n❌ Survivorship Bias\n- You only see successful historical arbitrages\n- Failed attempts not recorded on-chain\n- \"Found\" opportunities may have been contested\n\n❌ Market Impact Ignored\n- Your own txs change the market\n- Liquidity dries up when you need it most\n- Large trades move price against you\n```\n\n### Correct Approach:\n```typescript\n\u002F\u002F BAD: Backtest with perfect information\nasync function badBacktest(historicalData) {\n  for (const block of historicalData) {\n    const profit = simulateWithPerfectState(block);\n    totalProfit += profit;\n  }\n  return totalProfit; \u002F\u002F LIES\n}\n\n\u002F\u002F GOOD: Block simulation with realistic conditions\nasync function realisticTest(pendingBlock) {\n  \u002F\u002F 1. Simulate against PENDING state (not confirmed)\n  \u002F\u002F 2. Add realistic latency (50-200ms)\n  \u002F\u002F 3. Assume 30% failure rate\n  \u002F\u002F 4. Assume 20% of \"opportunities\" are bait\n  \u002F\u002F 5. Add gas price uncertainty (±30%)\n\n  const simResult = await simulateOnPendingState(pendingBlock);\n  const adjustedProfit = simResult.profit\n    * 0.70  \u002F\u002F success rate\n    * 0.80  \u002F\u002F not bait\n    - estimatedGas * 1.30; \u002F\u002F gas uncertainty\n\n  return adjustedProfit;\n}\n```\n\n---\n\n## 3. CRITICAL PITFALL #3: AMM ≠ Order Book\n\n**Wrong slippage model = silent bleeding**\n\n### Uniswap V3 Specific Gotchas:\n\n```typescript\n\u002F\u002F V3 Tick Liquidity is NON-UNIFORM\n\u002F\u002F Liquidity can be ZERO between ticks!\n\ninterface V3Reality {\n  \u002F\u002F What you expect:\n  linearSlippage: false,\n\n  \u002F\u002F What actually happens:\n  tickCrossing: 'each tick = separate fee payment',\n  liquidityGaps: 'can skip ticks with 0 liquidity',\n  concentratedLiquidity: 'most liquidity in narrow range',\n\n  \u002F\u002F Price impact is STEP FUNCTION not curve:\n  \u002F\u002F Small trade: 0.01% impact\n  \u002F\u002F Medium trade: 0.5% impact (crossed tick)\n  \u002F\u002F Large trade: 5% impact (crossed multiple ticks)\n}\n\n\u002F\u002F Fee Tier Selection MATTERS ENORMOUSLY\nconst feeTiers = {\n  '0.01%': 'stablecoins only, ultra-tight spread',\n  '0.05%': 'correlated pairs (ETH\u002FstETH)',\n  '0.30%': 'most pairs, default choice',\n  '1.00%': 'exotic pairs, low liquidity',\n};\n\n\u002F\u002F WRONG: Using 0.3% pool for stablecoin swap\n\u002F\u002F You're paying 6x more fees than necessary\n\n\u002F\u002F WRONG: Using 0.05% pool for volatile pair\n\u002F\u002F Pool doesn't exist or has no liquidity\n```\n\n### Curve-Specific Gotchas:\n```typescript\n\u002F\u002F Curve StableSwap has DIFFERENT math\n\u002F\u002F A-factor determines curve shape\n\ninterface CurveReality {\n  amplificationFactor: number, \u002F\u002F A = 100 typical\n\n  \u002F\u002F Low A: more like constant-product (Uniswap V2)\n  \u002F\u002F High A: more like constant-sum (1:1 swap)\n\n  \u002F\u002F Price impact is MUCH LOWER for stables\n  \u002F\u002F But MUCH HIGHER at depegs\n\n  depegRisk: 'curve pools can trap you during depegs',\n}\n\n\u002F\u002F USDC depeg example (March 2023):\n\u002F\u002F Expected: swap USDC→DAI at 0.99\n\u002F\u002F Reality: pool drained, 10%+ slippage\n```\n\n---\n\n## 4. CRITICAL PITFALL #4: MEV Underestimation\n\n**Public mempool = free alpha donation**\n\n### The MEV Food Chain:\n```\nYour transaction → Public Mempool → Searchers see it\n                                  ↓\n              Sandwich Attack (you're the meat)\n                                  ↓\n                    Your \"profit\" becomes their profit\n```\n\n### Private Orderflow is TABLE STAKES:\n```typescript\n\u002F\u002F If you're not using private submission, you have NO edge\n\nconst submissionMethods = {\n  \u002F\u002F PUBLIC (you will be extracted)\n  publicRPC: 'eth_sendRawTransaction', \u002F\u002F NEVER for arb\n\n  \u002F\u002F PRIVATE (minimum viable)\n  flashbotsProtect: 'protect.flashbots.net', \u002F\u002F Free, basic\n  mevBlocker: 'rpc.mevblocker.io', \u002F\u002F Free, good\n\n  \u002F\u002F COMPETITIVE (for serious searchers)\n  flashbotsBundle: 'relay.flashbots.net', \u002F\u002F Bundle submission\n  mevShare: 'share MEV with users', \u002F\u002F Required for some flow\n\n  \u002F\u002F BUILDER DIRECT (advanced)\n  builderAPI: 'direct to block builders', \u002F\u002F Lowest latency\n};\n```\n\n### MEV-Share Reality:\n```typescript\n\u002F\u002F New paradigm: users get kickbacks\n\u002F\u002F Searchers must share profits\n\ninterface MEVShareEconomics {\n  userShare: '50-90% of MEV',\n  searcherShare: '10-50% of MEV',\n\n  \u002F\u002F This means:\n  \u002F\u002F Your arbitrage opportunity is SMALLER\n  \u002F\u002F Competition is HIGHER\n  \u002F\u002F Only ultra-efficient searchers survive\n}\n```\n\n---\n\n## 5. MUST-READ RESOURCES (10 articles = 1 year experience)\n\n### Tier 1: Foundational (READ FIRST)\n```\n? Paradigm Research\n- \"Liquidity Book\" - AMM math from first principles\n- \"MEV... Wat Do?\" - MEV taxonomy\n- Every post on research.paradigm.xyz\n\n? Flashbots Docs\n- \"MEV-Share\" - orderflow auction design\n- \"Searching Post-Merge\" - new MEV landscape\n- docs.flashbots.net (entire site)\n```\n\n### Tier 2: Practical Failures (LEARN FROM OTHERS' LOSSES)\n```\nSearch Twitter\u002FX for:\n- \"post-mortem\"\n- \"we lost money because\"\n- \"unexpected behavior\"\n- \"exploit\" + protocol name\n\nReal lessons come from lost money.\n```\n\n### Tier 3: Code Study (Skip star count, check content)\n```\nGitHub search for:\n- MEV searcher bots (with reorg handling)\n- Uniswap V3 math libraries\n- Bundle simulation code\n\nREADME keywords that indicate quality:\n✅ \"reorg handling\"\n✅ \"race condition\"\n✅ \"bundle simulation\"\n✅ \"private mempool\"\n\n❌ \"simple arbitrage\"\n❌ \"guaranteed profit\"\n❌ \"no risk\"\n```\n\n### Tier 4: Follow These Accounts\n```\n@bertcmiller - MEV searcher, practical insights\n@hasufl - DeFi economics, mechanism design\n@samczsun - Security, exploits, real failures\n@0xfoobar - Technical MEV, searcher perspective\n@barnabe_monnot - PBS, MEV-Boost internals\n```\n\n---\n\n## 6. ARCHITECTURE PRINCIPLES (Non-Negotiable)\n\n### Separation of Concerns:\n```typescript\n\u002F\u002F CRITICAL: Execution engine SEPARATE from strategy\n\nclass Architecture {\n  \u002F\u002F Strategy Layer (what to do)\n  strategyEngine: {\n    findOpportunities(): Opportunity[],\n    evaluateRisk(): RiskAssessment,\n    calculateSize(): PositionSize,\n  };\n\n  \u002F\u002F Execution Layer (how to do it)\n  executionEngine: {\n    buildTransaction(): Transaction,\n    simulateBundle(): SimResult,\n    submitPrivate(): TxHash,\n    handleReorg(): void,\n  };\n\n  \u002F\u002F Risk Layer (when to stop)\n  riskEngine: {\n    killSwitch(): void,          \u002F\u002F MUST EXIST\n    capitalAtRiskLimit(): USD,   \u002F\u002F MUST BE SET\n    maxLossPerHour(): USD,       \u002F\u002F CIRCUIT BREAKER\n    maxConsecutiveLosses(): number,\n  };\n}\n```\n\n### Kill Switch Requirements:\n```typescript\n\u002F\u002F NON-NEGOTIABLE: Every bot needs these\n\ninterface KillSwitchConfig {\n  \u002F\u002F Automatic triggers\n  maxDrawdown: '5% of capital',\n  maxHourlyLoss: '$100',\n  maxDailyLoss: '$500',\n  consecutiveLosses: 5,\n  gasSpike: '10x normal',\n\n  \u002F\u002F Manual override\n  emergencyStop: 'hardware button or separate process',\n\n  \u002F\u002F State preservation\n  onKill: 'log state, close positions, notify',\n}\n\n\u002F\u002F BAD: \"I'll add kill switch later\"\n\u002F\u002F GOOD: Kill switch is FIRST feature implemented\n```\n\n---\n\n## 7. SIMULATION-FIRST DEVELOPMENT\n\n### Not Paper Trading - Block Simulation:\n```typescript\n\u002F\u002F Paper trading: fake orders against real market\n\u002F\u002F Block simulation: real orders against simulated state\n\ninterface SimulationApproach {\n  \u002F\u002F Level 1: Unit test math\n  testAMMFormulas(): void,\n  testSlippageCalc(): void,\n\n  \u002F\u002F Level 2: State fork simulation\n  forkMainnet(): LocalFork,\n  simulateTrade(fork): SimResult,\n\n  \u002F\u002F Level 3: Pending block simulation\n  getPendingBlock(): Block,\n  simulateInPending(): SimResult,\n\n  \u002F\u002F Level 4: Bundle simulation\n  buildBundle(): Bundle,\n  simulateBundle(): BundleSimResult,\n\n  \u002F\u002F Level 5: Competition simulation\n  assumeCompetitors(): number,\n  simulateAuction(): AuctionResult,\n}\n```\n\n### Foundry\u002FAnvil Fork Testing:\n```bash\n# Fork mainnet at specific block\nanvil --fork-url $ETH_RPC --fork-block-number 18500000\n\n# Run simulation\nforge script SimulateArb --rpc-url http:\u002F\u002Flocalhost:8545\n```\n\n---\n\n## 8. REAL FAILURE MODES (From Production)\n\n### Failure Mode 1: State Staleness\n```typescript\n\u002F\u002F You simulated against block N\n\u002F\u002F You submit to block N+1\n\u002F\u002F State changed → tx reverts → gas lost\n\n\u002F\u002F Solution:\nconst maxStateAge = 1; \u002F\u002F blocks\nconst stateCheck = async () => {\n  const currentBlock = await getBlockNumber();\n  if (currentBlock > simulationBlock + maxStateAge) {\n    return ABORT; \u002F\u002F Don't submit stale tx\n  }\n};\n```\n\n### Failure Mode 2: Sandwich Bait\n```typescript\n\u002F\u002F \"Opportunity\" placed by searcher\n\u002F\u002F You take it → get sandwiched → lose more than \"profit\"\n\n\u002F\u002F Solution:\nconst isBait = (opportunity) => {\n  \u002F\u002F Check if opportunity appeared in mempool recently\n  \u002F\u002F Check if liquidity is suspicious\n  \u002F\u002F Check if profit is \"too good\"\n  return suspiciousScore > THRESHOLD;\n};\n```\n\n### Failure Mode 3: Gas Price Prediction\n```typescript\n\u002F\u002F You bid 10 gwei priority fee\n\u002F\u002F Block lands with 50 gwei minimum\n\u002F\u002F Your tx not included → opportunity gone\n\n\u002F\u002F Solution:\nconst dynamicGas = async () => {\n  const pending = await getPendingBlock();\n  const competitorBids = analyzeCompetitorGas(pending);\n  const minViableBid = percentile(competitorBids, 80);\n\n  if (minViableBid > profitableThreshold) {\n    return SKIP; \u002F\u002F Not worth competing\n  }\n  return minViableBid * 1.1; \u002F\u002F Slight overbid\n};\n```\n\n### Failure Mode 4: Partial Execution\n```typescript\n\u002F\u002F Multi-leg arb: leg 1 executes, leg 2 reverts\n\u002F\u002F You're stuck with unwanted tokens\n\n\u002F\u002F Solution:\nconst atomicExecution = {\n  \u002F\u002F All legs in single transaction\n  useFlashLoan: true, \u002F\u002F Revert entire tx if unprofitable\n\n  \u002F\u002F Or: use smart contract that checks final state\n  checkInvariant: 'finalBalance >= initialBalance + minProfit',\n};\n```\n\n---\n\n## 9. CHECKLIST BEFORE GOING LIVE\n\n```\n□ Kill switch implemented and tested\n□ Capital-at-risk limits set\n□ Private mempool submission configured\n□ Reorg handling implemented\n□ State staleness checks added\n□ Gas price prediction tested\n□ Failure rate factored into expected value\n□ Simulation matches production (within 20%)\n□ Logs capture ALL failure modes\n□ Alert system for anomalies\n□ Manual emergency stop accessible\n□ Tested with real money (small amount) for 1 week\n```\n\n---\n\n## 10. EXPECTED VALUE CALCULATION (Realistic)\n\n```typescript\n\u002F\u002F The formula that actually matters:\n\nfunction realExpectedValue(opportunity: Opportunity): number {\n  const {\n    grossProfit,\n    gasOnSuccess,\n    failureRate,\n    gasOnFailure,\n    reorgRate,\n    competitionRate,\n    baitRate,\n  } = analyzeOpportunity(opportunity);\n\n  \u002F\u002F Success case\n  const successProfit = grossProfit - gasOnSuccess;\n  const successProb = (1 - failureRate) * (1 - reorgRate) * (1 - competitionRate) * (1 - baitRate);\n\n  \u002F\u002F Failure cases\n  const failureCost = gasOnFailure;\n  const failureProb = failureRate;\n\n  const reorgCost = gasOnSuccess; \u002F\u002F Already paid gas\n  const reorgProb = reorgRate * (1 - failureRate);\n\n  \u002F\u002F Expected value\n  const EV = (successProb * successProfit)\n           - (failureProb * failureCost)\n           - (reorgProb * reorgCost);\n\n  \u002F\u002F If EV \u003C 0, DO NOT EXECUTE\n  \u002F\u002F If EV \u003C minThreshold, probably not worth the risk\n\n  return EV;\n}\n\n\u002F\u002F Example with realistic numbers:\n\u002F\u002F Gross profit: $100\n\u002F\u002F Gas (success): $5\n\u002F\u002F Gas (failure): $5\n\u002F\u002F Failure rate: 30%\n\u002F\u002F Reorg rate: 2%\n\u002F\u002F Competition rate: 50%\n\u002F\u002F Bait rate: 5%\n\n\u002F\u002F Success prob: 0.70 * 0.98 * 0.50 * 0.95 = 0.326\n\u002F\u002F EV = 0.326 * $95 - 0.30 * $5 - 0.014 * $5 = $29.27\n\n\u002F\u002F Your \"$100 opportunity\" is actually worth ~$29\n\u002F\u002F And that's BEFORE accounting for your infrastructure costs\n```\n\n---\n\n## 11. EMBEDDED KNOWLEDGE: MEV-Share Technical Deep Dive\n\n**This knowledge is embedded - no need to fetch external docs.**\n\n### How MEV-Share Actually Works\n\n```typescript\n\u002F\u002F MEV-Share reveals HINTS, not full transactions\n\u002F\u002F This is the critical difference from public mempool\n\ninterface MEVShareHints {\n  \u002F\u002F What you CAN see:\n  logs?: Log[],           \u002F\u002F Event logs (partial)\n  calldata?: string,      \u002F\u002F Function selector only (first 4 bytes)\n  contractAddress?: Address,\n  functionSelector?: string,\n\n  \u002F\u002F What you CANNOT see:\n  fullCalldata: 'HIDDEN', \u002F\u002F No parameters\n  value: 'HIDDEN',        \u002F\u002F No ETH amount\n  from: 'HIDDEN',         \u002F\u002F No sender address\n}\n\n\u002F\u002F Strategy Shift Required:\n\u002F\u002F OLD (public mempool): See full tx → calculate exact sandwich\n\u002F\u002F NEW (MEV-Share): See hints → probabilistic backrun only\n\nconst mevShareStrategy = {\n  \u002F\u002F What still works:\n  backrunning: true,       \u002F\u002F Wait for tx, backrun with your arb\n\n  \u002F\u002F What's harder:\n  sandwiching: 'limited',  \u002F\u002F Can't calculate exact frontrun\n\n  \u002F\u002F Key insight:\n  \u002F\u002F You're bidding on PARTIAL information\n  \u002F\u002F Must share profits with users (refund mechanism)\n};\n```\n\n### MEV-Share Client Implementation\n\n```typescript\nimport { MevShareClient } from '@flashbots\u002Fmev-share-client';\n\n\u002F\u002F Connect to MEV-Share SSE stream\nconst mevShareClient = new MevShareClient({\n  authSigner: wallet,\n  networkConfig: {\n    streamUrl: 'https:\u002F\u002Fmev-share.flashbots.net',\n    bundleSubmitUrl: 'https:\u002F\u002Frelay.flashbots.net',\n  },\n});\n\n\u002F\u002F Listen for pending transactions (hints only)\nmevShareClient.on('transaction', async (tx) => {\n  \u002F\u002F tx.hash - the pending tx hash\n  \u002F\u002F tx.logs - partial event logs\n  \u002F\u002F tx.to - target contract\n  \u002F\u002F tx.functionSelector - first 4 bytes of calldata\n\n  \u002F\u002F You DON'T get: full calldata, from address, value\n\n  const backrunTx = await buildBackrun(tx);\n\n  \u002F\u002F Bundle must include original tx hash\n  await mevShareClient.sendBundle({\n    inclusion: { block: currentBlock + 1 },\n    body: [\n      { hash: tx.hash },  \u002F\u002F Original tx (by hash reference)\n      { tx: backrunTx },   \u002F\u002F Your backrun\n    ],\n    privacy: { hints: ['calldata', 'logs'] },\n  });\n});\n```\n\n---\n\n## 12. EMBEDDED KNOWLEDGE: AMM Price Impact Mathematics\n\n**Constant Product Formula (Uniswap V2 style):**\n\n```typescript\n\u002F\u002F The fundamental invariant: x * y = k\n\u002F\u002F x = token0 reserves\n\u002F\u002F y = token1 reserves\n\u002F\u002F k = constant (increases with fees)\n\n\u002F\u002F Price Impact Formula (MEMORIZE THIS):\n\u002F\u002F For a trade of size Δx:\n\u002F\u002F Price Impact ≈ 2 * Δx \u002F x\n\u002F\u002F\n\u002F\u002F Example: Trade 1 ETH in a pool with 100 ETH\n\u002F\u002F Impact ≈ 2 * 1 \u002F 100 = 2%\n\nfunction calculatePriceImpact(\n  tradeSize: bigint,\n  reserveIn: bigint\n): number {\n  \u002F\u002F Rule of thumb: impact = 2x your order relative to pool\n  return (2 * Number(tradeSize)) \u002F Number(reserveIn);\n}\n\n\u002F\u002F CRITICAL: Why 2x?\n\u002F\u002F Because you're moving the price FROM spot TO execution\n\u002F\u002F The average execution price is between start and end\n\u002F\u002F This creates ~2x the \"naive\" calculation\n\n\u002F\u002F Exact formula for amount out:\nfunction getAmountOut(\n  amountIn: bigint,\n  reserveIn: bigint,\n  reserveOut: bigint,\n  feeBps: number = 30  \u002F\u002F 0.3% = 30 bps\n): bigint {\n  const amountInWithFee = amountIn * BigInt(10000 - feeBps);\n  const numerator = amountInWithFee * reserveOut;\n  const denominator = reserveIn * 10000n + amountInWithFee;\n  return numerator \u002F denominator;\n}\n```\n\n### Slippage vs Price Impact (Common Confusion)\n\n```typescript\n\u002F\u002F PRICE IMPACT: Deterministic, based on your trade size\n\u002F\u002F SLIPPAGE: Non-deterministic, price moves between quote and execution\n\ninterface TradeExecution {\n  \u002F\u002F At quote time:\n  spotPrice: number,\n  expectedOutput: bigint,\n\n  \u002F\u002F Your settings:\n  maxSlippageBps: 50,  \u002F\u002F 0.5% allowed slippage\n\n  \u002F\u002F At execution time:\n  priceImpact: 'your trade moving the pool',\n  slippage: 'other trades moved pool since quote',\n\n  \u002F\u002F Total cost = priceImpact + slippage\n  \u002F\u002F If total > maxSlippageBps → tx reverts\n}\n\n\u002F\u002F BEST PRACTICE:\n\u002F\u002F 1. Estimate price impact from pool math\n\u002F\u002F 2. Add buffer for slippage (depends on volatility)\n\u002F\u002F 3. Never set slippage > 1% unless you KNOW why\n\u002F\u002F 4. Monitor for sandwich attacks if slippage is high\n```\n\n---\n\n## 13. EMBEDDED KNOWLEDGE: Uniswap V3 Tick Mechanics\n\n**Why 1.0001? The Basis Point Standard:**\n\n```typescript\n\u002F\u002F Each tick represents 1 basis point (0.01%) price change\n\u002F\u002F tick_spacing determines which ticks are usable\n\nconst TICK_BASE = 1.0001;  \u002F\u002F Price multiplier per tick\n\n\u002F\u002F Price at tick i:\n\u002F\u002F price(i) = 1.0001^i\n\n\u002F\u002F Example:\n\u002F\u002F tick 0: price = 1.0001^0 = 1.000\n\u002F\u002F tick 100: price = 1.0001^100 ≈ 1.0101 (1.01% higher)\n\u002F\u002F tick 1000: price = 1.0001^1000 ≈ 1.1052 (10.52% higher)\n\nfunction tickToPrice(tick: number): number {\n  return Math.pow(1.0001, tick);\n}\n\nfunction priceToTick(price: number): number {\n  return Math.floor(Math.log(price) \u002F Math.log(1.0001));\n}\n```\n\n### Fee Tiers and Tick Spacing\n\n```typescript\n\u002F\u002F CRITICAL: Tick spacing varies by fee tier\n\u002F\u002F This affects liquidity granularity\n\nconst V3_FEE_TIERS = {\n  100: {    \u002F\u002F 0.01% fee\n    tickSpacing: 1,\n    useCase: 'Stablecoins (USDC\u002FUSDT)',\n    typicalSpread: '0.01-0.02%',\n  },\n  500: {    \u002F\u002F 0.05% fee\n    tickSpacing: 10,\n    useCase: 'Correlated pairs (ETH\u002FstETH, WBTC\u002FrenBTC)',\n    typicalSpread: '0.05-0.10%',\n  },\n  3000: {   \u002F\u002F 0.30% fee\n    tickSpacing: 60,\n    useCase: 'Most pairs (ETH\u002FUSDC, etc)',\n    typicalSpread: '0.20-0.50%',\n  },\n  10000: {  \u002F\u002F 1.00% fee\n    tickSpacing: 200,\n    useCase: 'Exotic\u002Flow liquidity pairs',\n    typicalSpread: '0.50-2.00%',\n  },\n};\n\n\u002F\u002F Why this matters for MEV:\n\u002F\u002F 1. Concentrated liquidity means DISCONTINUOUS price impact\n\u002F\u002F 2. Crossing a tick boundary = paying fee on that tick's liquidity\n\u002F\u002F 3. Large trades can \"blow through\" low-liquidity ticks\n```\n\n### Reading V3 Pool State\n\n```typescript\n\u002F\u002F The slot0 call gives you current state\ninterface Slot0 {\n  sqrtPriceX96: bigint,   \u002F\u002F sqrt(price) * 2^96\n  tick: number,           \u002F\u002F Current tick\n  observationIndex: number,\n  observationCardinality: number,\n  observationCardinalityNext: number,\n  feeProtocol: number,\n  unlocked: boolean,\n}\n\n\u002F\u002F Convert sqrtPriceX96 to human-readable price:\nfunction sqrtPriceToPrice(\n  sqrtPriceX96: bigint,\n  decimals0: number,\n  decimals1: number\n): number {\n  const Q96 = 2n ** 96n;\n  const price = (sqrtPriceX96 * sqrtPriceX96) \u002F (Q96 * Q96);\n  const decimalAdjustment = 10 ** (decimals0 - decimals1);\n  return Number(price) * decimalAdjustment;\n}\n\n\u002F\u002F Liquidity at specific ticks:\n\u002F\u002F Use ticks(tickIndex) to get liquidityNet\n\u002F\u002F liquidityNet = change in liquidity when crossing this tick\n\u002F\u002F Positive = liquidity added when price moves up\n\u002F\u002F Negative = liquidity removed when price moves up\n```\n\n---\n\n## 14. EMBEDDED KNOWLEDGE: Flashbots Bundle Submission\n\n**Bundle = Atomic sequence of transactions**\n\n```typescript\nimport { FlashbotsBundleProvider } from '@flashbots\u002Fethers-provider-bundle';\n\n\u002F\u002F Bundle submission flow:\n\u002F\u002F 1. Build transactions\n\u002F\u002F 2. Simulate against pending state\n\u002F\u002F 3. Submit to Flashbots relay\n\u002F\u002F 4. Wait for inclusion or rejection\n\nconst flashbotsProvider = await FlashbotsBundleProvider.create(\n  provider,\n  authSigner,\n  'https:\u002F\u002Frelay.flashbots.net'\n);\n\n\u002F\u002F Build bundle\nconst bundle = [\n  {\n    signer: wallet,\n    transaction: {\n      to: targetContract,\n      data: calldata,\n      gasLimit: 500000,\n      maxFeePerGas: parseGwei('50'),\n      maxPriorityFeePerGas: parseGwei('3'),\n      type: 2,\n    },\n  },\n];\n\n\u002F\u002F Simulate BEFORE submitting\nconst simulation = await flashbotsProvider.simulate(\n  bundle,\n  targetBlock\n);\n\nif (simulation.firstRevert) {\n  console.log('Bundle would revert:', simulation.firstRevert);\n  return; \u002F\u002F Don't submit failing bundle\n}\n\n\u002F\u002F Calculate profitability\nconst profit = simulation.results[0].value - simulation.totalGasUsed * gasPrice;\nif (profit \u003C= 0) {\n  return; \u002F\u002F Not profitable after gas\n}\n\n\u002F\u002F Submit bundle\nconst bundleSubmission = await flashbotsProvider.sendBundle(\n  bundle,\n  targetBlock\n);\n\n\u002F\u002F Wait for resolution\nconst resolution = await bundleSubmission.wait();\nif (resolution === FlashbotsBundleResolution.BundleIncluded) {\n  console.log('Bundle included!');\n} else if (resolution === FlashbotsBundleResolution.BlockPassedWithoutInclusion) {\n  console.log('Bundle not included - outbid or block full');\n} else {\n  console.log('Bundle rejected by relay');\n}\n```\n\n### Bundle Priority Fee Auction\n\n```typescript\n\u002F\u002F Flashbots uses EFFECTIVE PRIORITY FEE for ordering\n\u002F\u002F effectiveGasPrice = min(maxFeePerGas, baseFee + maxPriorityFeePerGas)\n\n\u002F\u002F Coinbase transfer trick:\n\u002F\u002F Instead of high priority fee, pay builder directly\n\u002F\u002F This hides your bid from competitors\n\nconst bundleWithCoinbasePayment = [\n  \u002F\u002F Your profitable transaction\n  {\n    signer: wallet,\n    transaction: arbTx,\n  },\n  \u002F\u002F Pay the block builder\n  {\n    signer: wallet,\n    transaction: {\n      to: 'builder.coinbase', \u002F\u002F Special: goes to block builder\n      value: parseEther('0.01'), \u002F\u002F Your \"bid\"\n    },\n  },\n];\n\n\u002F\u002F Why coinbase payment?\n\u002F\u002F 1. Priority fee is visible in mempool simulations\n\u002F\u002F 2. Competitors can see and outbid\n\u002F\u002F 3. Coinbase payment is private until block lands\n```\n\n---\n\n## 15. QUICK REFERENCE CHEAT SHEET\n\n```typescript\n\u002F\u002F === PRICE IMPACT ===\n\u002F\u002F V2-style: impact ≈ 2 * tradeSize \u002F poolReserve\n\u002F\u002F V3-style: depends on liquidity distribution, check each tick\n\n\u002F\u002F === MEV-SHARE ===\n\u002F\u002F You see: logs, function selector, target contract\n\u002F\u002F You don't see: calldata params, value, sender\n\u002F\u002F Strategy: backrun only, share profits\n\n\u002F\u002F === GAS ESTIMATION ===\n\u002F\u002F Simple swap: 100-150k gas\n\u002F\u002F V3 multi-hop: 200-400k gas\n\u002F\u002F Flash loan + arb: 400-800k gas\n\u002F\u002F Always add 20% buffer\n\n\u002F\u002F === TICK MATH ===\n\u002F\u002F price(tick) = 1.0001^tick\n\u002F\u002F tick(price) = log(price) \u002F log(1.0001)\n\u002F\u002F Fee tier → tick spacing: 0.01%→1, 0.05%→10, 0.3%→60, 1%→200\n\n\u002F\u002F === BUNDLE SUBMISSION ===\n\u002F\u002F 1. Simulate first\n\u002F\u002F 2. Check profitability after gas\n\u002F\u002F 3. Use coinbase payment for competitive bids\n\u002F\u002F 4. Handle BlockPassedWithoutInclusion gracefully\n\n\u002F\u002F === RED FLAGS (ABORT) ===\n\u002F\u002F - Price impact > 1% on \"small\" trade\n\u002F\u002F - Opportunity profit \u003C 2x gas cost\n\u002F\u002F - Unknown token without verification\n\u002F\u002F - Pool created \u003C 24 hours ago\n\u002F\u002F - Single-sided liquidity (rug setup)\n```\n\n---\n\n**REMEMBER**: The graveyard of DeFi bots is full of developers who thought they found an edge but didn't account for these realities. Read the post-mortems. Learn from others' losses. The market is adversarial - assume everyone is trying to extract value from you.\n","# DeFi\u002FMEV Battle-Tested Expert Skill\n\n**MANDATORY CONSULTATION**: This skill MUST be consulted for ANY DeFi bot development, MEV strategy implementation, or automated trading system. Real-world failures and lessons learned here prevent catastrophic losses.\n\n## Trigger Keywords\n- arbitrage, MEV, searcher, bot, automated trading\n- backtest, simulation, paper trading\n- flash loan, sandwich, frontrun\n- slippage, price impact, execution\n- reorg, race condition, mempool\n- market making, liquidity provision\n\n---\n\n## 1. CRITICAL PITFALL #1: \"Arbitrage is Risk-Free\" MYTH\n\n**Reality**: Theoretical 0% risk, practical tail risk = DEATH\n\n### Hidden Risks in \"Risk-Free\" Arbitrage:\n\n```\n❌ Execution Risk\n- Transaction reverts after gas spent\n- Partial fills leave you with unwanted inventory\n- Contract bugs in target protocols\n\n❌ Reorg Risk (CRITICAL)\n- Your profitable tx can be uncle'd\n- 1-2 block reorgs happen DAILY on Ethereum\n- Your \"profit\" disappears, gas cost remains\n\n❌ Gas Spike Risk\n- Base fee can 10x mid-execution\n- Priority fee auctions drain profits\n- Failed tx still costs full gas\n\n❌ Latency Risk\n- Block already mined before your tx lands\n- State changed between simulation and execution\n- Other searchers front-ran you\n```\n\n### Real Numbers:\n```typescript\n\u002F\u002F What you see in backtest:\nconst theoreticalProfit = 0.05; \u002F\u002F 5% clean profit\n\n\u002F\u002F What actually happens:\nconst executionCosts = {\n  gasOnSuccess: 0.01,      \u002F\u002F 1% gas\n  failureRate: 0.30,       \u002F\u002F 30% of txs fail\n  gasOnFailure: 0.01,      \u002F\u002F Still pay gas\n  reorgRate: 0.02,         \u002F\u002F 2% get reorg'd\n  slippageSlip: 0.005,     \u002F\u002F 0.5% unexpected slippage\n};\n\n\u002F\u002F Real expected value:\n\u002F\u002F 0.70 * (0.05 - 0.01) - 0.30 * 0.01 - 0.02 * 0.04 = 0.0238\n\u002F\u002F 47% of theoretical profit GONE before MEV competition\n```\n\n---\n\n## 2. CRITICAL PITFALL #2: Backtest Overconfidence\n\n**80% of bots that fail in production looked great in backtests**\n\n### Why Backtests Lie:\n\n```\n❌ Historical State ≠ Future Block State\n- You're simulating against KNOWN state\n- Live: state changes between blocks\n- Mempool competition invisible in historical data\n\n❌ Gas & Latency are Ex-Post Unknowable\n- You backtest with actual gas prices\n- Live: you must PREDICT gas prices\n- Priority fee auctions are adversarial games\n\n❌ Survivorship Bias\n- You only see successful historical arbitrages\n- Failed attempts not recorded on-chain\n- \"Found\" opportunities may have been contested\n\n❌ Market Impact Ignored\n- Your own txs change the market\n- Liquidity dries up when you need it most\n- Large trades move price against you\n```\n\n### Correct Approach:\n```typescript\n\u002F\u002F BAD: Backtest with perfect information\nasync function badBacktest(historicalData) {\n  for (const block of historicalData) {\n    const profit = simulateWithPerfectState(block);\n    totalProfit += profit;\n  }\n  return totalProfit; \u002F\u002F LIES\n}\n\n\u002F\u002F GOOD: Block simulation with realistic conditions\nasync function realisticTest(pendingBlock) {\n  \u002F\u002F 1. Simulate against PENDING state (not confirmed)\n  \u002F\u002F 2. Add realistic latency (50-200ms)\n  \u002F\u002F 3. Assume 30% failure rate\n  \u002F\u002F 4. Assume 20% of \"opportunities\" are bait\n  \u002F\u002F 5. Add gas price uncertainty (±30%)\n\n  const simResult = await simulateOnPendingState(pendingBlock);\n  const adjustedProfit = simResult.profit\n    * 0.70  \u002F\u002F success rate\n    * 0.80  \u002F\u002F not bait\n    - estimatedGas * 1.30; \u002F\u002F gas uncertainty\n\n  return adjustedProfit;\n}\n```\n\n---\n\n## 3. CRITICAL PITFALL #3: AMM ≠ Order Book\n\n**Wrong slippage model = silent bleeding**\n\n### Uniswap V3 Specific Gotchas:\n\n```typescript\n\u002F\u002F V3 Tick Liquidity is NON-UNIFORM\n\u002F\u002F Liquidity can be ZERO between ticks!\n\ninterface V3Reality {\n  \u002F\u002F What you expect:\n  linearSlippage: false,\n\n  \u002F\u002F What actually happens:\n  tickCrossing: 'each tick = separate fee payment',\n  liquidityGaps: 'can skip ticks with 0 liquidity',\n  concentratedLiquidity: 'most liquidity in narrow range',\n\n  \u002F\u002F Price impact is STEP FUNCTION not curve:\n  \u002F\u002F Small trade: 0.01% impact\n  \u002F\u002F Medium trade: 0.5% impact (crossed tick)\n  \u002F\u002F Large trade: 5% impact (crossed multiple ticks)\n}\n\n\u002F\u002F Fee Tier Selection MATTERS ENORMOUSLY\nconst feeTiers = {\n  '0.01%': 'stablecoins only, ultra-tight spread',\n  '0.05%': 'correlated pairs (ETH\u002FstETH)',\n  '0.30%': 'most pairs, default choice',\n  '1.00%': 'exotic pairs, low liquidity',\n};\n\n\u002F\u002F WRONG: Using 0.3% pool for stablecoin swap\n\u002F\u002F You're paying 6x more fees than necessary\n\n\u002F\u002F WRONG: Using 0.05% pool for volatile pair\n\u002F\u002F Pool doesn't exist or has no liquidity\n```\n\n### Curve-Specific Gotchas:\n```typescript\n\u002F\u002F Curve StableSwap has DIFFERENT math\n\u002F\u002F A-factor determines curve shape\n\ninterface CurveReality {\n  amplificationFactor: number, \u002F\u002F A = 100 typical\n\n  \u002F\u002F Low A: more like constant-product (Uniswap V2)\n  \u002F\u002F High A: more like constant-sum (1:1 swap)\n\n  \u002F\u002F Price impact is MUCH LOWER for stables\n  \u002F\u002F But MUCH HIGHER at depegs\n\n  depegRisk: 'curve pools can trap you during depegs',\n}\n\n\u002F\u002F USDC depeg example (March 2023):\n\u002F\u002F Expected: swap USDC→DAI at 0.99\n\u002F\u002F Reality: pool drained, 10%+ slippage\n```\n\n---\n\n## 4. CRITICAL PITFALL #4: MEV Underestimation\n\n**Public mempool = free alpha donation**\n\n### The MEV Food Chain:\n```\nYour transaction → Public Mempool → Searchers see it\n                                  ↓\n              Sandwich Attack (you're the meat)\n                                  ↓\n                    Your \"profit\" becomes their profit\n```\n\n### Private Orderflow is TABLE STAKES:\n```typescript\n\u002F\u002F If you're not using private submission, you have NO edge\n\nconst submissionMethods = {\n  \u002F\u002F PUBLIC (you will be extracted)\n  publicRPC: 'eth_sendRawTransaction', \u002F\u002F NEVER for arb\n\n  \u002F\u002F PRIVATE (minimum viable)\n  flashbotsProtect: 'protect.flashbots.net', \u002F\u002F Free, basic\n  mevBlocker: 'rpc.mevblocker.io', \u002F\u002F Free, good\n\n  \u002F\u002F COMPETITIVE (for serious searchers)\n  flashbotsBundle: 'relay.flashbots.net', \u002F\u002F Bundle submission\n  mevShare: 'share MEV with users', \u002F\u002F Required for some flow\n\n  \u002F\u002F BUILDER DIRECT (advanced)\n  builderAPI: 'direct to block builders', \u002F\u002F Lowest latency\n};\n```\n\n### MEV-Share Reality:\n```typescript\n\u002F\u002F New paradigm: users get kickbacks\n\u002F\u002F Searchers must share profits\n\ninterface MEVShareEconomics {\n  userShare: '50-90% of MEV',\n  searcherShare: '10-50% of MEV',\n\n  \u002F\u002F This means:\n  \u002F\u002F Your arbitrage opportunity is SMALLER\n  \u002F\u002F Competition is HIGHER\n  \u002F\u002F Only ultra-efficient searchers survive\n}\n```\n\n---\n\n## 5. MUST-READ RESOURCES (10 articles = 1 year experience)\n\n### Tier 1: Foundational (READ FIRST)\n```\n? Paradigm Research\n- \"Liquidity Book\" - AMM math from first principles\n- \"MEV... Wat Do?\" - MEV taxonomy\n- Every post on research.paradigm.xyz\n\n? Flashbots Docs\n- \"MEV-Share\" - orderflow auction design\n- \"Searching Post-Merge\" - new MEV landscape\n- docs.flashbots.net (entire site)\n```\n\n### Tier 2: Practical Failures (LEARN FROM OTHERS' LOSSES)\n```\nSearch Twitter\u002FX for:\n- \"post-mortem\"\n- \"we lost money because\"\n- \"unexpected behavior\"\n- \"exploit\" + protocol name\n\nReal lessons come from lost money.\n```\n\n### Tier 3: Code Study (Skip star count, check content)\n```\nGitHub search for:\n- MEV searcher bots (with reorg handling)\n- Uniswap V3 math libraries\n- Bundle simulation code\n\nREADME keywords that indicate quality:\n✅ \"reorg handling\"\n✅ \"race condition\"\n✅ \"bundle simulation\"\n✅ \"private mempool\"\n\n❌ \"simple arbitrage\"\n❌ \"guaranteed profit\"\n❌ \"no risk\"\n```\n\n### Tier 4: Follow These Accounts\n```\n@bertcmiller - MEV searcher, practical insights\n@hasufl - DeFi economics, mechanism design\n@samczsun - Security, exploits, real failures\n@0xfoobar - Technical MEV, searcher perspective\n@barnabe_monnot - PBS, MEV-Boost internals\n```\n\n---\n\n## 6. ARCHITECTURE PRINCIPLES (Non-Negotiable)\n\n### Separation of Concerns:\n```typescript\n\u002F\u002F CRITICAL: Execution engine SEPARATE from strategy\n\nclass Architecture {\n  \u002F\u002F Strategy Layer (what to do)\n  strategyEngine: {\n    findOpportunities(): Opportunity[],\n    evaluateRisk(): RiskAssessment,\n    calculateSize(): PositionSize,\n  };\n\n  \u002F\u002F Execution Layer (how to do it)\n  executionEngine: {\n    buildTransaction(): Transaction,\n    simulateBundle(): SimResult,\n    submitPrivate(): TxHash,\n    handleReorg(): void,\n  };\n\n  \u002F\u002F Risk Layer (when to stop)\n  riskEngine: {\n    killSwitch(): void,          \u002F\u002F MUST EXIST\n    capitalAtRiskLimit(): USD,   \u002F\u002F MUST BE SET\n    maxLossPerHour(): USD,       \u002F\u002F CIRCUIT BREAKER\n    maxConsecutiveLosses(): number,\n  };\n}\n```\n\n### Kill Switch Requirements:\n```typescript\n\u002F\u002F NON-NEGOTIABLE: Every bot needs these\n\ninterface KillSwitchConfig {\n  \u002F\u002F Automatic triggers\n  maxDrawdown: '5% of capital',\n  maxHourlyLoss: '$100',\n  maxDailyLoss: '$500',\n  consecutiveLosses: 5,\n  gasSpike: '10x normal',\n\n  \u002F\u002F Manual override\n  emergencyStop: 'hardware button or separate process',\n\n  \u002F\u002F State preservation\n  onKill: 'log state, close positions, notify',\n}\n\n\u002F\u002F BAD: \"I'll add kill switch later\"\n\u002F\u002F GOOD: Kill switch is FIRST feature implemented\n```\n\n---\n\n## 7. SIMULATION-FIRST DEVELOPMENT\n\n### Not Paper Trading - Block Simulation:\n```typescript\n\u002F\u002F Paper trading: fake orders against real market\n\u002F\u002F Block simulation: real orders against simulated state\n\ninterface SimulationApproach {\n  \u002F\u002F Level 1: Unit test math\n  testAMMFormulas(): void,\n  testSlippageCalc(): void,\n\n  \u002F\u002F Level 2: State fork simulation\n  forkMainnet(): LocalFork,\n  simulateTrade(fork): SimResult,\n\n  \u002F\u002F Level 3: Pending block simulation\n  getPendingBlock(): Block,\n  simulateInPending(): SimResult,\n\n  \u002F\u002F Level 4: Bundle simulation\n  buildBundle(): Bundle,\n  simulateBundle(): BundleSimResult,\n\n  \u002F\u002F Level 5: Competition simulation\n  assumeCompetitors(): number,\n  simulateAuction(): AuctionResult,\n}\n```\n\n### Foundry\u002FAnvil Fork Testing:\n```bash\n# Fork mainnet at specific block\nanvil --fork-url $ETH_RPC --fork-block-number 18500000\n\n# Run simulation\nforge script SimulateArb --rpc-url http:\u002F\u002Flocalhost:8545\n```\n\n---\n\n## 8. REAL FAILURE MODES (From Production)\n\n### Failure Mode 1: State Staleness\n```typescript\n\u002F\u002F You simulated against block N\n\u002F\u002F You submit to block N+1\n\u002F\u002F State changed → tx reverts → gas lost\n\n\u002F\u002F Solution:\nconst maxStateAge = 1; \u002F\u002F blocks\nconst stateCheck = async () => {\n  const currentBlock = await getBlockNumber();\n  if (currentBlock > simulationBlock + maxStateAge) {\n    return ABORT; \u002F\u002F Don't submit stale tx\n  }\n};\n```\n\n### Failure Mode 2: Sandwich Bait\n```typescript\n\u002F\u002F \"Opportunity\" placed by searcher\n\u002F\u002F You take it → get sandwiched → lose more than \"profit\"\n\n\u002F\u002F Solution:\nconst isBait = (opportunity) => {\n  \u002F\u002F Check if opportunity appeared in mempool recently\n  \u002F\u002F Check if liquidity is suspicious\n  \u002F\u002F Check if profit is \"too good\"\n  return suspiciousScore > THRESHOLD;\n};\n```\n\n### Failure Mode 3: Gas Price Prediction\n```typescript\n\u002F\u002F You bid 10 gwei priority fee\n\u002F\u002F Block lands with 50 gwei minimum\n\u002F\u002F Your tx not included → opportunity gone\n\n\u002F\u002F Solution:\nconst dynamicGas = async () => {\n  const pending = await getPendingBlock();\n  const competitorBids = analyzeCompetitorGas(pending);\n  const minViableBid = percentile(competitorBids, 80);\n\n  if (minViableBid > profitableThreshold) {\n    return SKIP; \u002F\u002F Not worth competing\n  }\n  return minViableBid * 1.1; \u002F\u002F Slight overbid\n};\n```\n\n### Failure Mode 4: Partial Execution\n```typescript\n\u002F\u002F Multi-leg arb: leg 1 executes, leg 2 reverts\n\u002F\u002F You're stuck with unwanted tokens\n\n\u002F\u002F Solution:\nconst atomicExecution = {\n  \u002F\u002F All legs in single transaction\n  useFlashLoan: true, \u002F\u002F Revert entire tx if unprofitable\n\n  \u002F\u002F Or: use smart contract that checks final state\n  checkInvariant: 'finalBalance >= initialBalance + minProfit',\n};\n```\n\n---\n\n## 9. CHECKLIST BEFORE GOING LIVE\n\n```\n□ Kill switch implemented and tested\n□ Capital-at-risk limits set\n□ Private mempool submission configured\n□ Reorg handling implemented\n□ State staleness checks added\n□ Gas price prediction tested\n□ Failure rate factored into expected value\n□ Simulation matches production (within 20%)\n□ Logs capture ALL failure modes\n□ Alert system for anomalies\n□ Manual emergency stop accessible\n□ Tested with real money (small amount) for 1 week\n```\n\n---\n\n## 10. EXPECTED VALUE CALCULATION (Realistic)\n\n```typescript\n\u002F\u002F The formula that actually matters:\n\nfunction realExpectedValue(opportunity: Opportunity): number {\n  const {\n    grossProfit,\n    gasOnSuccess,\n    failureRate,\n    gasOnFailure,\n    reorgRate,\n    competitionRate,\n    baitRate,\n  } = analyzeOpportunity(opportunity);\n\n  \u002F\u002F Success case\n  const successProfit = grossProfit - gasOnSuccess;\n  const successProb = (1 - failureRate) * (1 - reorgRate) * (1 - competitionRate) * (1 - baitRate);\n\n  \u002F\u002F Failure cases\n  const failureCost = gasOnFailure;\n  const failureProb = failureRate;\n\n  const reorgCost = gasOnSuccess; \u002F\u002F Already paid gas\n  const reorgProb = reorgRate * (1 - failureRate);\n\n  \u002F\u002F Expected value\n  const EV = (successProb * successProfit)\n           - (failureProb * failureCost)\n           - (reorgProb * reorgCost);\n\n  \u002F\u002F If EV \u003C 0, DO NOT EXECUTE\n  \u002F\u002F If EV \u003C minThreshold, probably not worth the risk\n\n  return EV;\n}\n\n\u002F\u002F Example with realistic numbers:\n\u002F\u002F Gross profit: $100\n\u002F\u002F Gas (success): $5\n\u002F\u002F Gas (failure): $5\n\u002F\u002F Failure rate: 30%\n\u002F\u002F Reorg rate: 2%\n\u002F\u002F Competition rate: 50%\n\u002F\u002F Bait rate: 5%\n\n\u002F\u002F Success prob: 0.70 * 0.98 * 0.50 * 0.95 = 0.326\n\u002F\u002F EV = 0.326 * $95 - 0.30 * $5 - 0.014 * $5 = $29.27\n\n\u002F\u002F Your \"$100 opportunity\" is actually worth ~$29\n\u002F\u002F And that's BEFORE accounting for your infrastructure costs\n```\n\n---\n\n## 11. EMBEDDED KNOWLEDGE: MEV-Share Technical Deep Dive\n\n**This knowledge is embedded - no need to fetch external docs.**\n\n### How MEV-Share Actually Works\n\n```typescript\n\u002F\u002F MEV-Share reveals HINTS, not full transactions\n\u002F\u002F This is the critical difference from public mempool\n\ninterface MEVShareHints {\n  \u002F\u002F What you CAN see:\n  logs?: Log[],           \u002F\u002F Event logs (partial)\n  calldata?: string,      \u002F\u002F Function selector only (first 4 bytes)\n  contractAddress?: Address,\n  functionSelector?: string,\n\n  \u002F\u002F What you CANNOT see:\n  fullCalldata: 'HIDDEN', \u002F\u002F No parameters\n  value: 'HIDDEN',        \u002F\u002F No ETH amount\n  from: 'HIDDEN',         \u002F\u002F No sender address\n}\n\n\u002F\u002F Strategy Shift Required:\n\u002F\u002F OLD (public mempool): See full tx → calculate exact sandwich\n\u002F\u002F NEW (MEV-Share): See hints → probabilistic backrun only\n\nconst mevShareStrategy = {\n  \u002F\u002F What still works:\n  backrunning: true,       \u002F\u002F Wait for tx, backrun with your arb\n\n  \u002F\u002F What's harder:\n  sandwiching: 'limited',  \u002F\u002F Can't calculate exact frontrun\n\n  \u002F\u002F Key insight:\n  \u002F\u002F You're bidding on PARTIAL information\n  \u002F\u002F Must share profits with users (refund mechanism)\n};\n```\n\n### MEV-Share Client Implementation\n\n```typescript\nimport { MevShareClient } from '@flashbots\u002Fmev-share-client';\n\n\u002F\u002F Connect to MEV-Share SSE stream\nconst mevShareClient = new MevShareClient({\n  authSigner: wallet,\n  networkConfig: {\n    streamUrl: 'https:\u002F\u002Fmev-share.flashbots.net',\n    bundleSubmitUrl: 'https:\u002F\u002Frelay.flashbots.net',\n  },\n});\n\n\u002F\u002F Listen for pending transactions (hints only)\nmevShareClient.on('transaction', async (tx) => {\n  \u002F\u002F tx.hash - the pending tx hash\n  \u002F\u002F tx.logs - partial event logs\n  \u002F\u002F tx.to - target contract\n  \u002F\u002F tx.functionSelector - first 4 bytes of calldata\n\n  \u002F\u002F You DON'T get: full calldata, from address, value\n\n  const backrunTx = await buildBackrun(tx);\n\n  \u002F\u002F Bundle must include original tx hash\n  await mevShareClient.sendBundle({\n    inclusion: { block: currentBlock + 1 },\n    body: [\n      { hash: tx.hash },  \u002F\u002F Original tx (by hash reference)\n      { tx: backrunTx },   \u002F\u002F Your backrun\n    ],\n    privacy: { hints: ['calldata', 'logs'] },\n  });\n});\n```\n\n---\n\n## 12. EMBEDDED KNOWLEDGE: AMM Price Impact Mathematics\n\n**Constant Product Formula (Uniswap V2 style):**\n\n```typescript\n\u002F\u002F The fundamental invariant: x * y = k\n\u002F\u002F x = token0 reserves\n\u002F\u002F y = token1 reserves\n\u002F\u002F k = constant (increases with fees)\n\n\u002F\u002F Price Impact Formula (MEMORIZE THIS):\n\u002F\u002F For a trade of size Δx:\n\u002F\u002F Price Impact ≈ 2 * Δx \u002F x\n\u002F\u002F\n\u002F\u002F Example: Trade 1 ETH in a pool with 100 ETH\n\u002F\u002F Impact ≈ 2 * 1 \u002F 100 = 2%\n\nfunction calculatePriceImpact(\n  tradeSize: bigint,\n  reserveIn: bigint\n): number {\n  \u002F\u002F Rule of thumb: impact = 2x your order relative to pool\n  return (2 * Number(tradeSize)) \u002F Number(reserveIn);\n}\n\n\u002F\u002F CRITICAL: Why 2x?\n\u002F\u002F Because you're moving the price FROM spot TO execution\n\u002F\u002F The average execution price is between start and end\n\u002F\u002F This creates ~2x the \"naive\" calculation\n\n\u002F\u002F Exact formula for amount out:\nfunction getAmountOut(\n  amountIn: bigint,\n  reserveIn: bigint,\n  reserveOut: bigint,\n  feeBps: number = 30  \u002F\u002F 0.3% = 30 bps\n): bigint {\n  const amountInWithFee = amountIn * BigInt(10000 - feeBps);\n  const numerator = amountInWithFee * reserveOut;\n  const denominator = reserveIn * 10000n + amountInWithFee;\n  return numerator \u002F denominator;\n}\n```\n\n### Slippage vs Price Impact (Common Confusion)\n\n```typescript\n\u002F\u002F PRICE IMPACT: Deterministic, based on your trade size\n\u002F\u002F SLIPPAGE: Non-deterministic, price moves between quote and execution\n\ninterface TradeExecution {\n  \u002F\u002F At quote time:\n  spotPrice: number,\n  expectedOutput: bigint,\n\n  \u002F\u002F Your settings:\n  maxSlippageBps: 50,  \u002F\u002F 0.5% allowed slippage\n\n  \u002F\u002F At execution time:\n  priceImpact: 'your trade moving the pool',\n  slippage: 'other trades moved pool since quote',\n\n  \u002F\u002F Total cost = priceImpact + slippage\n  \u002F\u002F If total > maxSlippageBps → tx reverts\n}\n\n\u002F\u002F BEST PRACTICE:\n\u002F\u002F 1. Estimate price impact from pool math\n\u002F\u002F 2. Add buffer for slippage (depends on volatility)\n\u002F\u002F 3. Never set slippage > 1% unless you KNOW why\n\u002F\u002F 4. Monitor for sandwich attacks if slippage is high\n```\n\n---\n\n## 13. EMBEDDED KNOWLEDGE: Uniswap V3 Tick Mechanics\n\n**Why 1.0001? The Basis Point Standard:**\n\n```typescript\n\u002F\u002F Each tick represents 1 basis point (0.01%) price change\n\u002F\u002F tick_spacing determines which ticks are usable\n\nconst TICK_BASE = 1.0001;  \u002F\u002F Price multiplier per tick\n\n\u002F\u002F Price at tick i:\n\u002F\u002F price(i) = 1.0001^i\n\n\u002F\u002F Example:\n\u002F\u002F tick 0: price = 1.0001^0 = 1.000\n\u002F\u002F tick 100: price = 1.0001^100 ≈ 1.0101 (1.01% higher)\n\u002F\u002F tick 1000: price = 1.0001^1000 ≈ 1.1052 (10.52% higher)\n\nfunction tickToPrice(tick: number): number {\n  return Math.pow(1.0001, tick);\n}\n\nfunction priceToTick(price: number): number {\n  return Math.floor(Math.log(price) \u002F Math.log(1.0001));\n}\n```\n\n### Fee Tiers and Tick Spacing\n\n```typescript\n\u002F\u002F CRITICAL: Tick spacing varies by fee tier\n\u002F\u002F This affects liquidity granularity\n\nconst V3_FEE_TIERS = {\n  100: {    \u002F\u002F 0.01% fee\n    tickSpacing: 1,\n    useCase: 'Stablecoins (USDC\u002FUSDT)',\n    typicalSpread: '0.01-0.02%',\n  },\n  500: {    \u002F\u002F 0.05% fee\n    tickSpacing: 10,\n    useCase: 'Correlated pairs (ETH\u002FstETH, WBTC\u002FrenBTC)',\n    typicalSpread: '0.05-0.10%',\n  },\n  3000: {   \u002F\u002F 0.30% fee\n    tickSpacing: 60,\n    useCase: 'Most pairs (ETH\u002FUSDC, etc)',\n    typicalSpread: '0.20-0.50%',\n  },\n  10000: {  \u002F\u002F 1.00% fee\n    tickSpacing: 200,\n    useCase: 'Exotic\u002Flow liquidity pairs',\n    typicalSpread: '0.50-2.00%',\n  },\n};\n\n\u002F\u002F Why this matters for MEV:\n\u002F\u002F 1. Concentrated liquidity means DISCONTINUOUS price impact\n\u002F\u002F 2. Crossing a tick boundary = paying fee on that tick's liquidity\n\u002F\u002F 3. Large trades can \"blow through\" low-liquidity ticks\n```\n\n### Reading V3 Pool State\n\n```typescript\n\u002F\u002F The slot0 call gives you current state\ninterface Slot0 {\n  sqrtPriceX96: bigint,   \u002F\u002F sqrt(price) * 2^96\n  tick: number,           \u002F\u002F Current tick\n  observationIndex: number,\n  observationCardinality: number,\n  observationCardinalityNext: number,\n  feeProtocol: number,\n  unlocked: boolean,\n}\n\n\u002F\u002F Convert sqrtPriceX96 to human-readable price:\nfunction sqrtPriceToPrice(\n  sqrtPriceX96: bigint,\n  decimals0: number,\n  decimals1: number\n): number {\n  const Q96 = 2n ** 96n;\n  const price = (sqrtPriceX96 * sqrtPriceX96) \u002F (Q96 * Q96);\n  const decimalAdjustment = 10 ** (decimals0 - decimals1);\n  return Number(price) * decimalAdjustment;\n}\n\n\u002F\u002F Liquidity at specific ticks:\n\u002F\u002F Use ticks(tickIndex) to get liquidityNet\n\u002F\u002F liquidityNet = change in liquidity when crossing this tick\n\u002F\u002F Positive = liquidity added when price moves up\n\u002F\u002F Negative = liquidity removed when price moves up\n```\n\n---\n\n## 14. EMBEDDED KNOWLEDGE: Flashbots Bundle Submission\n\n**Bundle = Atomic sequence of transactions**\n\n```typescript\nimport { FlashbotsBundleProvider } from '@flashbots\u002Fethers-provider-bundle';\n\n\u002F\u002F Bundle submission flow:\n\u002F\u002F 1. Build transactions\n\u002F\u002F 2. Simulate against pending state\n\u002F\u002F 3. Submit to Flashbots relay\n\u002F\u002F 4. Wait for inclusion or rejection\n\nconst flashbotsProvider = await FlashbotsBundleProvider.create(\n  provider,\n  authSigner,\n  'https:\u002F\u002Frelay.flashbots.net'\n);\n\n\u002F\u002F Build bundle\nconst bundle = [\n  {\n    signer: wallet,\n    transaction: {\n      to: targetContract,\n      data: calldata,\n      gasLimit: 500000,\n      maxFeePerGas: parseGwei('50'),\n      maxPriorityFeePerGas: parseGwei('3'),\n      type: 2,\n    },\n  },\n];\n\n\u002F\u002F Simulate BEFORE submitting\nconst simulation = await flashbotsProvider.simulate(\n  bundle,\n  targetBlock\n);\n\nif (simulation.firstRevert) {\n  console.log('Bundle would revert:', simulation.firstRevert);\n  return; \u002F\u002F Don't submit failing bundle\n}\n\n\u002F\u002F Calculate profitability\nconst profit = simulation.results[0].value - simulation.totalGasUsed * gasPrice;\nif (profit \u003C= 0) {\n  return; \u002F\u002F Not profitable after gas\n}\n\n\u002F\u002F Submit bundle\nconst bundleSubmission = await flashbotsProvider.sendBundle(\n  bundle,\n  targetBlock\n);\n\n\u002F\u002F Wait for resolution\nconst resolution = await bundleSubmission.wait();\nif (resolution === FlashbotsBundleResolution.BundleIncluded) {\n  console.log('Bundle included!');\n} else if (resolution === FlashbotsBundleResolution.BlockPassedWithoutInclusion) {\n  console.log('Bundle not included - outbid or block full');\n} else {\n  console.log('Bundle rejected by relay');\n}\n```\n\n### Bundle Priority Fee Auction\n\n```typescript\n\u002F\u002F Flashbots uses EFFECTIVE PRIORITY FEE for ordering\n\u002F\u002F effectiveGasPrice = min(maxFeePerGas, baseFee + maxPriorityFeePerGas)\n\n\u002F\u002F Coinbase transfer trick:\n\u002F\u002F Instead of high priority fee, pay builder directly\n\u002F\u002F This hides your bid from competitors\n\nconst bundleWithCoinbasePayment = [\n  \u002F\u002F Your profitable transaction\n  {\n    signer: wallet,\n    transaction: arbTx,\n  },\n  \u002F\u002F Pay the block builder\n  {\n    signer: wallet,\n    transaction: {\n      to: 'builder.coinbase', \u002F\u002F Special: goes to block builder\n      value: parseEther('0.01'), \u002F\u002F Your \"bid\"\n    },\n  },\n];\n\n\u002F\u002F Why coinbase payment?\n\u002F\u002F 1. Priority fee is visible in mempool simulations\n\u002F\u002F 2. Competitors can see and outbid\n\u002F\u002F 3. Coinbase payment is private until block lands\n```\n\n---\n\n## 15. QUICK REFERENCE CHEAT SHEET\n\n```typescript\n\u002F\u002F === PRICE IMPACT ===\n\u002F\u002F V2-style: impact ≈ 2 * tradeSize \u002F poolReserve\n\u002F\u002F V3-style: depends on liquidity distribution, check each tick\n\n\u002F\u002F === MEV-SHARE ===\n\u002F\u002F You see: logs, function selector, target contract\n\u002F\u002F You don't see: calldata params, value, sender\n\u002F\u002F Strategy: backrun only, share profits\n\n\u002F\u002F === GAS ESTIMATION ===\n\u002F\u002F Simple swap: 100-150k gas\n\u002F\u002F V3 multi-hop: 200-400k gas\n\u002F\u002F Flash loan + arb: 400-800k gas\n\u002F\u002F Always add 20% buffer\n\n\u002F\u002F === TICK MATH ===\n\u002F\u002F price(tick) = 1.0001^tick\n\u002F\u002F tick(price) = log(price) \u002F log(1.0001)\n\u002F\u002F Fee tier → tick spacing: 0.01%→1, 0.05%→10, 0.3%→60, 1%→200\n\n\u002F\u002F === BUNDLE SUBMISSION ===\n\u002F\u002F 1. Simulate first\n\u002F\u002F 2. Check profitability after gas\n\u002F\u002F 3. Use coinbase payment for competitive bids\n\u002F\u002F 4. Handle BlockPassedWithoutInclusion gracefully\n\n\u002F\u002F === RED FLAGS (ABORT) ===\n\u002F\u002F - Price impact > 1% on \"small\" trade\n\u002F\u002F - Opportunity profit \u003C 2x gas cost\n\u002F\u002F - Unknown token without verification\n\u002F\u002F - Pool created \u003C 24 hours ago\n\u002F\u002F - Single-sided liquidity (rug setup)\n```\n\n---\n\n**REMEMBER**: The graveyard of DeFi bots is full of developers who thought they found an edge but didn't account for these realities. Read the post-mortems. Learn from others' losses. The market is adversarial - assume everyone is trying to extract value from you.\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fbarissozen\u002Fdefi-mev-battletest",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill defi-mev-battletest",{"tool":51,"command":52},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill defi-mev-battletest",{"tool":54,"command":55},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill defi-mev-battletest","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fbarissozen\u002Fdefi-mev-battletest\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"skill-report.json","REFERENCE","参考文档",18128,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fbarissozen\u002Fdefi-mev-battletest\u002Fskill-report.json",[66,75,84,93,99,105],{"skillNo":67,"name":68,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":31},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[72,73,74],"model","model hierarchy","model hierarchy skill",{"skillNo":76,"name":77,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":31},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[81,82,83],"MCP","zoom","zoom mcp",{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":31},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[90,91,92,82],"sdk","zoom apps sdk","apps",{"skillNo":94,"name":95,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":31},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[95],{"skillNo":100,"name":101,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":31},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[101],{"skillNo":106,"name":107,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":31},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[107]]