A user initiates a token swap through Phantom Wallet on Solana, setting a reasonable slippage tolerance and waiting for confirmation. The transaction appears on-chain moments later, but the received amount is substantially lower than the preview indicated. The wallet did not malfunction; a validator or searcher identified the pending transaction in the memory pool, inserted their own transaction ahead of it, executed a competing trade that moved the price against the user, then allowed the original transaction to complete at the worse rate. This attack pattern—known as sandwiching—is not unique to Phantom. It is a structural feature of blockchain networks where transaction ordering can be observed and manipulated. Understanding how it works and what defenses exist is essential for anyone moving significant value through decentralized applications.

Maximal extractable value, or MEV, is the profit that can be captured by reordering, including, or excluding transactions within a block. For ordinary users, MEV typically manifests as a cost: slippage beyond the stated tolerance, failed transactions that still consume gas, or receiving fewer tokens than expected from a swap. The mechanics involve reading pending transactions from a memory pool, calculating profitable manipulation opportunities, and executing the attack before the original transaction settles. Phantom Wallet provides tools to preview transactions and set protection parameters, but the wallet cannot eliminate MEV entirely. Instead, users can adopt specific practices and select decentralized applications that reduce exposure to sandwich attacks and other MEV extraction patterns.

A diagram showing a sandwich attack sequence: a user transaction pending in the memory pool, a front-running transaction executed before it, the user transaction completed at worse rates, and a back-running transaction capturing profit

How sandwich attacks exploit transaction visibility

A blockchain memory pool (or mempool) is a holding area where pending transactions wait for inclusion in a block. Validators, sequencers, and specialized network participants can observe transactions in the mempool before they are finalized. For a token swap, this means the pending transaction reveals several pieces of information: the user’s address, the input token amount, the output token address, and often the minimum acceptable output (the slippage tolerance). An attacker or MEV searcher can calculate whether inserting a competing trade before the user’s transaction would move the market price unfavorably, then profit by executing their own transaction in reverse after the user’s order completes.

The three-step pattern is straightforward. First, a searcher observes a pending swap transaction attempting to exchange 10 Solana for USDC at approximately 1 SOL = 150 USDC. Second, the searcher executes their own large swap in the same direction, moving the SOL/USDC price to 1 SOL = 148 USDC before the user’s transaction executes. Third, the user’s transaction completes at the worse price, and the searcher immediately executes a reverse trade, profiting from the price movement they created. The user receives roughly 1,480 USDC instead of the 1,500 USDC shown in the preview, and the attacker pockets approximately 20 USDC plus trading fees.

Phantom Wallet’s transaction preview system shows the estimated output and slippage tolerance before signing, but this preview is based on current pool state. Between the moment the preview is generated and the moment the transaction is broadcast, market conditions can change. If the user’s slippage tolerance is set to 5%, for example, the transaction will execute if the output is at least 95% of the preview amount. In a sandwich attack, the attacker deliberately worsens the conditions, but as long as the final output remains within the tolerance, the transaction succeeds and the user absorbs the loss. Setting a tighter slippage tolerance provides some protection, but it also increases the likelihood that the transaction fails if legitimate market movement occurs.

The fundamental asymmetry is that the attacker has an information advantage. They can see the user’s transaction before committing their own funds, calculate the profit, and execute with confidence. The user, by contrast, must commit to a transaction and slippage tolerance without knowing whether an attacker will target it. This is not a flaw in Phantom Wallet specifically; it is a characteristic of transaction ordering in most blockchain networks where the memory pool is observable.

Network architecture differences matter more than wallet design

Different blockchain networks have different susceptibilities to MEV attacks. Solana’s fast finality and high throughput reduce MEV opportunities compared to Ethereum, where each block takes ~12 seconds and multiple transactions can be ordered within it. However, Solana still has a memory pool, and network participants can observe and reorder transactions. Ethereum’s Beacon Chain and Lido operators, as well as MEV-boost relays, have created a more complex MEV landscape where builders, proposers, and searchers compete for extraction opportunities.

Phantom Wallet supports multiple blockchain networks—Solana, Ethereum, Base, Polygon, Bitcoin, Sui, HyperEVM, and Robinhood Chain—each with distinct transaction propagation and ordering mechanisms. Base, built on Ethereum’s L2 infrastructure, inherits some MEV exposure while benefiting from lower fees. Polygon’s proof-of-stake model and different validator set create different conditions than Ethereum mainnet. Sui and HyperEVM have alternative consensus models that may reduce mempool visibility or change the profitability of sandwich attacks. Bitcoin’s simpler transaction model and lack of complex smart contract interactions make sophisticated MEV attacks less practical, though fee-based transaction ordering still occurs.

The implication for users is that MEV risk cannot be uniformly managed across all networks. A defensive strategy that works well on Base might be inadequate on Ethereum mainnet. Understanding which networks users rely on most, and which DEXs operate on those networks with MEV protections, is more important than applying a one-size-fits-all approach. Phantom wallet app users operating across multiple blockchain networks should evaluate each network’s characteristics separately rather than assuming uniform risk.

Recognizing sandwich attacks in transaction results

After a swap completes, how can a user determine whether they fell victim to a sandwich attack versus ordinary market slippage? The first indicator is comparison between the preview amount and the final amount. Open the transaction details through the blockchain explorer by clicking the transaction hash. Note the input amount (the tokens sent) and the output amount (the tokens received). If the output is substantially lower than the preview—say, 5% lower when the slippage tolerance was set to 2%—the transaction was likely rejected initially and retried, or sandwich attack occurred.

The second indicator is transaction ordering. Use the blockchain explorer to view the block containing the transaction. Look for other transactions involving the same token pair that executed immediately before or after the user’s transaction. If a large swap in the same direction immediately precedes the user’s transaction, and another swap in the reverse direction immediately follows, a sandwich attack is probable. On Solana, tools such as Solscan provide detailed transaction sequences. On Ethereum and its Layer 2s, Etherscan and similar explorers show the transaction position within the block.

The third indicator is the transaction’s “instructions” or “events” depending on the network. A legitimate swap generates a straightforward sequence: user approves the token, the DEX receives the input, and the output is transferred to the user. A sandwich attack creates additional transactions in the block that are unrelated to the user’s interests, typically belonging to an address controlled by the attacker. Examining these patterns requires familiarity with the blockchain’s transaction format, but many community tools and Discord communities can help interpret what users observe.

It is important to distinguish between sandwich attacks and legitimate market impact. When a user executes a large swap relative to the liquidity available in a pool, the transaction itself moves the price. This is slippage, and it occurs even if no attacker is present. A 100,000 USDC swap might legitimately receive 1% to 3% less favorable pricing simply because the order is large relative to the pool. Sandwich attacks amplify this effect by artificially worsening it, but the user’s own large order creates some slippage inherently. Smaller swaps, conversely, are more likely to fit within the natural price range.

Selecting MEV-resistant decentralized applications

Not all token swap platforms expose users equally to sandwich attacks. DEXs and aggregators have begun implementing various MEV protections. Phantom Wallet provides access to multiple decentralized applications, and users can evaluate them based on their MEV defenses. The most common protections include private mempools, encrypted transactions, batch auctions, and maximal MEV minimization (MaxMEV) protocols.

Private mempool services such as MEV-Hide, MEV-Blocker, or Flashbots Protect Route send transactions through a private relay that keeps them hidden from the public mempool until they are included in a block. The trade-off is that the relayer becomes a temporary custodian of the transaction, and users must trust that the relayer will not perform its own sandwich attack. A relayer could theoretically see the transaction and execute a competing swap before including the user’s order. Most reputable private relay services are designed to minimize this risk through technical controls or reputation mechanisms, but it is not zero.

Encrypted transaction solutions, such as MEV-Commit or protocol-level encryption in networks like Shutter Network, encrypt the transaction content until after it is included in a block. The transaction becomes unreadable in the mempool, preventing attackers from identifying sandwich opportunities. The decryption key is released after block inclusion, revealing the transaction but making it too late for profitable reordering. This approach is more trustless than private relays, but it requires DEX and network-level support that is still not universally available.

Batch auction models, such as CoW Swap (Coincidence of Wants), combine multiple user orders into a single settlement transaction where prices are uniform for all participants. Instead of executing swaps sequentially with individual prices, all users in a batch receive the same effective price. This eliminates the ordering advantage that sandwich attackers exploit because no single user’s transaction reveals their intent before settlement. CoW Swap operates on Ethereum, Gnosis Chain, and some Layer 2s, and is gradually expanding to other networks.

When selecting a DEX or crypto exchange service within Phantom Wallet, users should look for explicit MEV protections in the application’s documentation or settings. Some aggregators offer toggle options to route through private mempools or MEV-resistant DEXs. The cost is typically higher than default routing—either through increased slippage, explicit fees, or longer settlement time—but for users swapping significant amounts, the protection often justifies the cost.

Practical strategies to minimize MEV exposure

The most straightforward mitigation is to avoid large single swaps when possible. Breaking a 100 USDC swap into ten 10 USDC swaps across different blocks reduces the profit available to a sandwich attacker on any single transaction. The trade-off is higher total fees and more operational overhead, making this strategy practical only for larger amounts or high-frequency traders. For casual users, a single swap remains acceptable if the amount is small relative to the liquidity available in the pool.

Setting appropriate slippage tolerance requires balancing protection and usability. A 0.1% slippage tolerance is aggressive and may cause transactions to fail during volatile market conditions, requiring the user to resubmit and potentially face another sandwich attempt. A 5% tolerance is permissive and exposes the user to substantial losses if an attacker targets the transaction. Most experienced users set slippage between 0.5% and 2% for ordinary swaps, with higher tolerances only during periods of extreme volatility or for small amounts where the absolute impact is limited. Phantom Wallet’s transaction preview displays the impact clearly, helping users make an informed choice.

Using limit orders instead of market orders provides another layer of protection. A limit order specifies an acceptable price and waits until that price is available, rather than executing immediately at market rates. If the limit price is never reached, the order does not execute. This approach prevents a sandwich attacker from worsening the price beyond the user’s specified limit, but it also means the user may not complete the swap quickly. Limit orders are most useful for less time-sensitive trades or when the user is willing to wait for a better price.

Performing swaps during periods of lower network congestion can reduce MEV risk slightly. When the mempool is full and network utilization is high, more transactions compete for block space, and sandwich attacks become more complex to coordinate profitably. Conversely, during quiet periods, a sandwich attacker’s transaction has a clearer path and higher certainty of execution. Solana experiences less congestion-related MEV variability than Ethereum due to its higher throughput, but the principle still applies across networks.

Checking the transaction hash and exploring the results on a blockchain explorer—as outlined in the previous section—is less a mitigation strategy than a verification practice. It does not prevent a sandwich attack but helps users understand whether they were targeted and adjust their approach for future swaps. Keeping records of swaps executed, amounts received, and whether the results matched expectations allows users to identify patterns and adjust their risk management accordingly.

The role of wallet security in preventing additional losses

While MEV protection focuses on transaction ordering, the wallet’s security model must prevent attackers from accessing private keys and authorizing unauthorized swaps. Phantom Wallet manages private keys locally on the user’s device (or hardware wallet if connected) without holding credentials on Phantom’s servers. This self-custodial architecture is foundational: if an attacker gains access to the Secret Recovery Phrase or the device itself, they can authorize unlimited swaps and completely drain the wallet regardless of what MEV protections are in place.

Protecting the recovery phrase is the highest-priority security task. The 12-word phrase should be written on paper, stored offline, and never entered into digital devices, websites, or chatbots. A common attack vector is social engineering: a fraudulent support account on social media or messaging apps requests the recovery phrase to “help” with a problem. Phantom Wallet cannot reset recovery phrases or reverse transactions, so a compromised phrase leads to total fund loss with no recovery option. Users should verify that they are interacting with official Phantom Wallet channels only and treat any request for the recovery phrase as a certain scam.

Secondary security measures include enabling biometric authentication on the device, using a strong device PIN or password, and keeping the operating system and Phantom Wallet updated. A hardware wallet integration—such as connecting Phantom to a Ledger or another supported device—adds an additional signing step, preventing even malware on the user’s phone or computer from authorizing transactions without physical button presses. This is especially valuable for wallets holding significant value or for users who make frequent cryptocurrency wallet transactions that could be intercepted and altered.

Looking forward: protocol-level MEV solutions and tradeoffs

The blockchain industry is exploring longer-term solutions to reduce MEV at the protocol level rather than relying on application-level defenses. Proposer-builder separation (PBS) on Ethereum, encrypted mempools in protocols like Shutter Network, and MEV-resistant consensus mechanisms are all attempting to make sandwich attacks structurally harder. As these solutions mature and become more widely available, the default MEV exposure for ordinary users could decrease significantly.

The current reality, however, is that most users operate on networks where MEV is a present risk. Phantom Wallet users should approach each swap as a transaction that could be targeted, evaluate the risk based on the amount and market conditions, and select blockchain networks and DEXs that align with their risk tolerance. A small swap on Solana through a private relay carries minimal risk and is unlikely to be worth attacking. A large swap on Ethereum mainnet through a public mempool is more vulnerable, and users should consider batch auctions or other protections.

The distinction between wallet design and network architecture is important. Phantom Wallet cannot eliminate MEV because MEV is not a wallet problem; it is a mempool visibility problem that exists at the network level. What the wallet can do is provide clear transaction previews, support multiple DEX options with different MEV defenses, and give users tools to verify results after execution. The responsibility for minimizing MEV exposure ultimately belongs to the user, who must understand the risks, choose appropriate networks and applications, and set realistic protection parameters.

Frequently asked questions

What is the difference between slippage and a sandwich attack?

Slippage is the natural price movement caused by the user’s own transaction impact on a liquidity pool. A large swap moves the pool price, and the user receives a worse rate than the preview. A sandwich attack is when an attacker deliberately manipulates the price by executing transactions before and after the user’s order to profit from the movement. Both reduce the amount received, but sandwich attacks involve an attacker’s deliberate manipulation rather than only the user’s market impact.

Can Phantom Wallet prevent sandwich attacks?

Phantom Wallet cannot prevent sandwich attacks entirely because they occur at the blockchain network level due to mempool visibility. However, Phantom supports routing through MEV-resistant DEXs, private mempools, and applications that use batch auctions or encrypted transactions. Users must actively select these options and set appropriate slippage tolerances; the wallet provides the tools but users control the risk.

Which blockchain networks supported by Phantom have the least MEV exposure?

Solana experiences less MEV pressure than Ethereum due to faster finality and higher throughput, though sandwich attacks are still possible. Bitcoin has minimal MEV risk for simple transactions because it lacks smart contracts. Networks with private sequencers, encrypted transactions, or batch settlement models reduce exposure further. The network choice matters more than the wallet choice when managing MEV risk.