Skip to main content

MEV Protection

Cat Wallet analyzes every swap before you sign it and warns you if the transaction is at risk of a sandwich attack. The risk score is computed client-side and optionally refined by Ritual's Infernet AI.


What is a sandwich attack?

A sandwich attack is a form of MEV (maximal extractable value) where a bot exploits a pending transaction in the mempool.

  1. You submit a swap with 2% slippage.
  2. A bot sees the transaction before it is confirmed.
  3. The bot buys the output token first, pushing the price up.
  4. Your transaction executes at the worse price.
  5. The bot sells the token at the inflated price and keeps the difference.

The larger the trade and the higher the slippage tolerance, the more the bot can extract.


Risk levels

LevelScoreMeaning
Safe0–20Low probability of a profitable sandwich
Low20–40Small risk, no action needed
Caution40–60Consider reducing slippage
High60–80Take action before signing
Critical80–100Very likely to be sandwiched

How the score is calculated

Four factors are weighted to produce a score from 0 to 100.

FactorWeightNotes
Slippage tolerance45%Higher slippage = wider window for the bot
Trade size in USD35%Larger trades are more profitable to extract
Token pair activity15%High-volume pairs attract more bots
Time of day5%09:00–17:00 UTC sees higher bot activity

A server-side call to /api/mev/analyze blends the client score with Infernet AI output (60% AI, 40% heuristic). If Infernet is unavailable the server falls back to heuristics only.


Protection options

When risk is detected, the MEV Guard panel offers one-tap fixes.

Reduce slippage to 0.5% Narrows the price window the bot can exploit. Works for most swaps.

Set a 2-minute deadline Limits how long the transaction can sit in the mempool waiting to be included.

Split into three trades Breaks the trade into smaller amounts, each of which is individually less profitable to attack.

Private relay (shown at high and critical risk only) Routes the transaction through a private relay so it is not visible in the public mempool before confirmation.


Usage

The MEV Guard badge appears automatically on the Send and Swap pages while you fill in the form. It updates within 600ms of any change to the amount, token, or recipient. Tap the badge to expand it and see the risk breakdown and suggested fixes.


Frequently asked questions

Does MEV Guard block my transaction? No. It is advisory. You can sign without applying any suggestion.

Does it slow anything down? Analysis runs in the background while you fill in the form. It does not add latency to signing or submission.

Does MEV exist on Ritual Chain? Yes. Ritual Chain is an EVM-compatible chain with a public mempool. Any chain with DeFi activity has MEV.