mev-pbs

Solid

Detect MEV and proposer-builder-separation exposure — sandwichable swaps with no minOut, JIT liquidity, oracle-update frontrunning, backrunnable state, false reliance on private mempools, builder censorship, missing commit-reveal, and multi-block MEV post-PBS. Activate whenever code performs swaps/liquidations/auctions/redemptions whose ordering or price is observable in the public mempool before execution.

AI & Automation 38 stars 5 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
53
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# MEV / PBS risk detection ## When this applies Trigger on any of: - Swaps, mints, or redemptions priced from a spot source without slippage bounds - Liquidations, auctions, or rebalances triggerable by anyone observing the mempool - Logic assuming transactions land via a private orderflow (Flashbots Protect, MEV-Share) - Reveal-then-act flows with no commit phase - Reward/airdrop claims, NFT mints, or oracle pushes that are frontrun-profitable - Time- or block-sensitive state an attacker can backrun ## Detection patterns ### Sandwichable swap, no minOut (HIGH) ```solidity function swap(uint256 amountIn) external { uint256 out = router.swapExactTokensForTokens(amountIn, 0, path, ...); // ^ minOut = 0 } ``` **Signal:** `amountOutMin == 0` (or a deadline of `type(uint).max`) lets a searcher frontrun to move price, then backrun, extracting the full slippage. The user-facing call must accept a caller-supplied `minOut` and `deadline`, never hardcode 0. ### Oracle-update frontrunning (HIGH) A position becomes profitable to liquidate / mint the instant a Chainlink push or `updatePrice` lands. Searchers backrun the oracle tx in the same block. If your protocol grants the *liquidator* a fixed bonus, the value leaks to MEV; if redemptions price off a freshly-updated feed, frontrun the update. ### JIT liquidity (MEDIUM) Concentrated-liquidity add-just-before / remove-just-after a large swap captures fees from passive LP...

Details

Author
iktok90-design
Repository
iktok90-design/ai-smart-contract-auditor
Created
1 weeks ago
Last Updated
2 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category