omermaksutii/rugproof/mev-pbs

Claude Code and agent skill by omermaksutii/rugproof

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

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.

Install

npx vskill@latest install omermaksutii/rugproof/mev-pbs

SKILL.md

The same SKILL.md was published earlier as iktok90-design/ai-smart-contract-auditor/mev-pbs.

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 LPs without bearing inventory risk. Flag fee mechanics that reward liquidity present only at swap time.

False private-mempool assumption (HIGH)
solidity
// comment: "safe because we submit via Flashbots, never public"

Signal: security argument rests on transactions staying private. Private relays are best-effort, not guaranteed; post-PBS, builders may not include or may leak the bundle. On-chain logic must be safe even when public.

Missing commit-reveal (MEDIUM)

Auctions, randomness consumers, or fair-mints that reveal the winning input in the same tx are frontrunnable. No commit phase = bid sniping.

Multi-block / backrunnable state (MEDIUM)

Post-Merge, a proposer controlling consecutive slots can execute multi-block MEV (e.g. hold price across two blocks). State that's only manipulation-safe within a single block is not safe under multi-block control.

Severity rubric

PatternSeverityNotes
minOut=0 / max deadline on user swapHighGuaranteed sandwich loss
Oracle-update frontrun → liquidation/redemptionHighValue leaks to searchers
Security relies on private mempoolHighAssumption not enforceable on-chain
Missing commit-reveal on auction/mintMediumBid sniping
JIT liquidity fee captureMediumLP value extraction
Single-block-only safety vs multi-block MEVMediumProposer with consecutive slots

Remediation patterns

  1. Caller-supplied `minOut` + `deadline` on every swap/redeem; reject 0 / type(uint).max defaults.
  2. Commit-reveal for auctions, fair mints, and randomness consumption; or a sealed-bid scheme.
  3. Decouple action from oracle tick — use TWAPs / time-weighted settlement so a single update isn't instantly exploitable; cap per-block price movement.
  4. Don't rely on privacy for safety — treat the mempool as adversarial; if using MEV-Share/threshold encryption, still make on-chain logic safe when public.
  5. Multi-block-aware design — require state to be safe across consecutive proposer slots; consider per-epoch rate limits.

False-positive notes

  • A swap whose minOut is computed off-chain from a fresh quote and passed in is fine — don't flag the presence of a slippage parameter.
  • Functions gated to a trusted keeper/relayer with no public-mempool exposure narrow (not eliminate) the risk; note rather than escalate.
  • Pure view/quote functions carry no MEV.

Related

  • [[mev-frontrunning]] — overlapping general frontrunning patterns
  • [[oracle-manipulation]] — spot-price moves are the substrate for sandwiches
  • [[flash-loan-attacks]] — sandwich capital is often flash-borrowed

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/omermaksutii/rugproof/mev-pbs/badge)](https://verified-skill.com/skills/omermaksutii/rugproof/mev-pbs)

Something wrong with this skill or its page? Tell us.