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.
- You submit a swap with 2% slippage.
- A bot sees the transaction before it is confirmed.
- The bot buys the output token first, pushing the price up.
- Your transaction executes at the worse price.
- 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
| Level | Score | Meaning |
|---|---|---|
| Safe | 0–20 | Low probability of a profitable sandwich |
| Low | 20–40 | Small risk, no action needed |
| Caution | 40–60 | Consider reducing slippage |
| High | 60–80 | Take action before signing |
| Critical | 80–100 | Very likely to be sandwiched |
How the score is calculated
Four factors are weighted to produce a score from 0 to 100.
| Factor | Weight | Notes |
|---|---|---|
| Slippage tolerance | 45% | Higher slippage = wider window for the bot |
| Trade size in USD | 35% | Larger trades are more profitable to extract |
| Token pair activity | 15% | High-volume pairs attract more bots |
| Time of day | 5% | 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.