## What is MEV Protect?

Sandwich attacks are a toxic form of MEV where a bot front-runs and back-runs your trade, moving the price against you and pocketing the difference. The front-run and back-run don’t have to sit in the same block — with **wide sandwiching**, they can span multiple blocks over a longer window. What the attack really depends on is **access to your order flow** through a source that doesn’t protect against sandwiching. Once a bot can see your pending trade, it can land its sandwich in any validator’s block.In practice, the party supplying that order flow is often a validator, and those validators frequently include the sandwiches in their own blocks to boost their rewards. That makes their blocks a disproportionate source of sandwiching.MEV Protect reduces that risk at the routing layer. When you opt in, Helius avoids submitting your transaction to the validators statistically associated with sandwich activity, so it’s far less likely to be sandwiched.

## Opt-In Per Request

Off by default. Add `mev-protect=true` to the endpoint URL — no changes to your transaction or signing logic.

## Works Everywhere

Supported on basic `sendTransaction`, basic `sendBundle`, Sender Max, and Sender SWQOS-only.

## Data-Driven Routing

Excludes validators that include sandwiches in their own blocks or in adjacent ones — only when the pattern is statistically significant.

## Minimal Landing Impact

Only a small fraction of total stake is excluded, so the effect on landing rate and latency is limited.

## How it works

Helius proactively monitors known sandwich bots and analyzes where their sandwiches land. A validator is flagged when either pattern holds consistently:

- **In its own blocks** — the validator includes the sandwich transactions directly.
- **In adjacent blocks** — sandwiches repeatedly land in the blocks immediately before or after the validator’s.

To avoid penalizing validators for coincidental proximity, Helius only excludes those whose association with sandwich activity is **statistically significant**. This keeps the excluded set small and targeted rather than broadly blocking stake.

1. **Opt in**  
   Add `mev-protect=true` to your endpoint URL. This applies to that request only.

2. **Protected routing**  
   Helius submits your transaction while avoiding leaders flagged for sandwich association, using the current statistically significant exclusion set.

3. **Normal execution**  
   Your transaction lands as usual — just with a much lower chance of being sandwiched.

## Supported sending methods

MEV Protect is a query parameter, so it layers onto every sending method without changing your request body.

| Method | Endpoint | Enable with |
| --- | --- | --- |
| [Basic `sendTransaction`](/content/docs/sending-transactions/send-manually/index.html) | `https://mainnet.helius-rpc.com` | `?api-key=YOUR_API_KEY&mev-protect=true` |
| [Basic `sendBundle`](/content/docs/sending-transactions/send-bundle/index.html) | `https://mainnet.helius-rpc.com` | `?api-key=YOUR_API_KEY&mev-protect=true` |
| [Sender Max](/content/docs/sending-transactions/sender-max/index.html) (transactions and bundles) | `https://sender.helius-rpc.com/fast` | `?mev-protect=true` |
| [Sender SWQOS-only](/content/docs/sending-transactions/sender-swqos-only/index.html) | `https://sender.helius-rpc.com/fast` | `?swqos_only=true&mev-protect=true` |

## How to enable

Append `mev-protect=true` to the endpoint URL you already use. Combine it with any other query parameters (`api-key`, `swqos_only`, `rebate-address`) using `&`.

- Basic sendTransaction
- Basic sendBundle
- Sender Max
- Sender SWQOS-only

```bash
curl "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY&mev-protect=true" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [\
      "BASE64_ENCODED_TRANSACTION",\
      { "encoding": "base64", "skipPreflight": true, "maxRetries": 0 }\
    ]
  }'
```

```bash
curl "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY&mev-protect=true" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendBundle",
    "params": [\
      ["BASE64_SIGNED_TX_1", "BASE64_SIGNED_TX_2"],\
      { "encoding": "base64" }\
    ]
  }'
```

```bash
curl "https://sender.helius-rpc.com/fast?mev-protect=true" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [\
      "BASE64_ENCODED_TRANSACTION",\
      { "encoding": "base64", "skipPreflight": true, "maxRetries": 0 }\
    ]
  }'
```

```bash
curl "https://sender.helius-rpc.com/fast?swqos_only=true&mev-protect=true" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendTransaction",
    "params": [\
      "BASE64_ENCODED_TRANSACTION",\
      { "encoding": "base64", "skipPreflight": true, "maxRetries": 0 }\
    ]
  }'
```

MEV Protect changes only where your transaction is routed. Keep your existing tip and priority fee requirements — for Sender, both a tip and a priority fee are still mandatory.

## Tradeoffs

Excluding validators means your transaction has slightly fewer leaders to land with. In practice the impact is small: only a limited amount of stake (roughly 3–4 million SOL) is excluded at any time, a small fraction of total network stake. For most flows the reduction in landing rate and the added latency are negligible.

For the most latency-sensitive strategies where every leader matters, measure landing rate with and without `mev-protect=true` for your specific flow before enabling it in production.

## MEV Protect vs. Transaction Rebates

These are complementary features that address different parts of MEV:

- **MEV Protect** is defensive routing — it lowers the chance a sandwich attacker can extract value from your trade in the first place.
- **[Transaction Rebates](/content/docs/sending-transactions/backrun-rebates/index.html)** are offensive — they pay you a share of the beneficial, post-trade backrun MEV your transaction creates.

You can opt into both on the same request by adding both query parameters.
