MEV-Resistant Swap Routing: Using Solscan to Identify Slippage-Free Execution on Solana DEXs

MEV-Resistant Swap Routing: Using Solscan to Identify Slippage-Free Execution on Solana DEXs

Solana’s throughput and low transaction costs have attracted significant decentralized exchange volume, but that liquidity comes with a specific risk: maximal extractable value, or MEV. A trader executing a swap on Raydium, Orca, or Jupiter may announce their order to the network seconds before it settles, giving validators and sandwich bots time to insert profitable transactions before and after the trade. The result is slippage that exceeds the fair price by 0.5 percent, 2 percent, or more. Understanding MEV requires reading the transaction patterns themselves, which is where Solscan becomes an essential tool. By examining confirmed swaps, mempool behavior, and liquidity pool states across multiple DEXs, a trader can reverse-engineer the conditions that produce clean execution versus those that invite extraction.

The mechanic is straightforward in principle: a sandwich attacker observes a large pending swap, buys the output token before the target transaction executes, and sells it to the trader at a worse price. The attack succeeds because the DEX price curve shifts in the attacker’s favor, and the original trader absorbs the loss. Solana’s single-slot leadership rotation means these attacks happen in the span of 400 milliseconds, making real-time detection and evasion difficult. However, the execution pattern leaves permanent traces. Using Solscan’s transaction tracking and real-time update capabilities, traders can identify which liquidity routes consistently avoid sandwich vectors, which pools maintain stable spreads, and which execution patterns correlate with fair-price fills. This analysis transforms MEV from an invisible tax into a measurable, avoidable cost.

Solscan blockchain explorer interface showing transaction details, fees, and liquidity pool information for analyzing MEV on Solana DEXs

How sandwich attacks appear in transaction data

A sandwich attack is visible in Solscan as three separate transactions in the same block or adjacent blocks. The first transaction (the attacker’s buy) executes against a liquidity pool, shifting its price curve. The second transaction (the victim’s swap) executes at a worse price than the attacker anticipated but still favorable to the attacker. The third transaction (the attacker’s sell) extracts the profit. The victim’s transaction fee is identical regardless of whether they were sandwiched, but the amount received is measurably lower. A trader who knows the target pool’s state before the attack can calculate what the fair output should have been and compare it against what actually arrived.

Solscan’s real-time transaction display shows confirmation status, timestamp, and fee for every swap. A trader can filter by program ID to isolate only DEX transactions, then examine the sequence of events within a block. If a swap for 100 USDC to SOL shows lower output than a similar-sized swap in an adjacent block, or if the output is materially worse than Jupiter’s quoted price at the time of broadcast, sandwich extraction is a plausible explanation. The timestamp data reveals whether the transaction was broadcast deliberately early or whether it was delayed by network conditions. Fees are another signal: if a swap includes an unusually high priority fee but executes at poor price, the trader was likely paying for speed to escape front-runners, which suggests that sandwich pressure is real in that route.

More sophisticated attackers use multiple intermediate accounts and split transactions across several blocks to obscure the pattern. However, even fragmented attacks leave statistical traces. If a specific liquidity pool consistently shows price degradation before large swaps, or if multiple independent traders report slippage in the same direction, the aggregated transaction history on Solscan can reveal the bias. The explorer’s search and filter functionality allows a user to query all swaps in a specific token pair over a date range, then examine the distribution of execution prices relative to oracle prices or time-weighted averages.

The key insight is that Solscan transaction verification does not require personal participation. A trader can study other users’ swaps to infer market conditions and attack vectors, then apply those lessons to their own execution. If sandwiches consistently attack Raydium’s SOL-USDC pool but rarely hit Orca’s equivalent pool, or if attacks spike during certain validators’ leadership slots, a sophisticated trader can time their transactions to avoid the highest-risk windows.

Identifying fair-price execution routes through historical analysis

Not all DEXs and liquidity pools execute swaps fairly. The difference between a fair price and a slippage-filled price is partly determined by pool depth, but it is also determined by the participants willing to provide liquidity there. A pool with strong market makers who rebalance quickly will show tighter spreads and lower sandwich opportunity. A pool with thin or stale liquidity will invite attacks because the cost of manipulation is lower and the profit per manipulated transaction is higher. Solscan’s token overview and DeFi tools allow a trader to compare execution across pools by reviewing historical swap prices.

Begin by searching for the specific token pair—for example, SOL to USDC. Solscan displays all completed swaps involving those tokens, filterable by program (to isolate a single DEX) or across all DEXs. Examine the execution price against the timestamp and the transaction size. A 10 SOL swap that executes at 5 percent slippage when the previous block’s swap of similar size executed at 0.2 percent slippage suggests that the second swap encountered a sandwich or liquidity vacuum. By collecting samples across 50 or 100 swaps, a trader builds an empirical distribution of execution quality by pool and time of day.

Larger traders often benefit from fragmented execution across multiple pools. If the oracle price is 100 USDC per SOL but Pool A offers 99.5 and Pool B offers 99.2, the trader who splits the order might average 99.35, beating both pools individually. Solscan’s block and transaction data makes this analysis public. A trader can examine which routing services (Jupiter, Raydium’s AcceleRaytor, etc.) use which pools and whether their chosen route matches the statistically superior path for that token pair and size. Over time, the trader learns whether their DEX of choice is genuinely optimal or whether a competitor offers systematically better fills.

One practical application is identifying “off-book” liquidity pools—smaller, less-traded pools that are less attractive to sandwich attackers because the opportunity set is smaller. These pools may have lower slippage than the most liquid pools if the trade size is below the liquidity threshold where sandwich attacks become profitable. Conversely, extremely illiquid pools are a trap: they may show low absolute slippage on paper but rely on a single market maker or on-chain oracle price feeds that can be manipulated. The proper evaluation is not the historical spread but the consistency and alignment with external price feeds.

Using real-time transaction data to time execution windows

Sandwich attacks are not uniformly distributed across time. They cluster during periods of high network activity, specific validators’ leadership slots, and when large pending transactions sit in the mempool. While Solana does not have a traditional public mempool, pending transactions are sometimes visible to certain validators and sophisticated users through private relays. Solscan’s real-time transaction feed provides an approximate indicator: a surge in transaction throughput or a spike in swap volume in a particular pool suggests congestion that invites opportunistic MEV.

A trader waiting for a favorable moment to execute a swap can monitor Solscan during low-activity periods. If the transaction volume in a target pool drops to near-zero for a 2-minute window, and the pool’s price aligns with external oracle feeds, that window is lower-risk for execution. Conversely, if the pool is in the middle of a high-volume event (such as a launch or liquidation cascade), sandwich attackers are likely active, and a trader should wait. The timestamp precision on Solscan transactions is to the second, allowing a trader to correlate their own swap’s broadcast time with the observed network state at that moment.

Validators rotate leadership across epochs, and Solscan’s block and epoch information with validator monitoring makes this visible. Certain validators have reputations (based on community reports and transaction pattern analysis) as less friendly to MEV, while others are known to run validating infrastructure used by sandwich attackers. A trader who can observe which validator is currently proposing blocks and who will propose in the next few slots can time their swap to avoid the highest-risk leadership window. This is not foolproof—any validator could theoretically participate in MEV—but it is a measurable factor that reduces average sandwich exposure.

Analyzing liquidity pool state and spread dynamics

Solscan’s token overview and coin analytics provide snapshot data on liquidity pools’ total value locked, price, and trading volume. More detailed analysis requires examining the swap transaction sequence within a specific block or time window. A trader who sees a large swap followed immediately by several smaller swaps in the same pool can infer that the large swap moved the price significantly, creating a temporary imbalance. If the pool’s price then stabilizes within a few seconds, market makers are rebalancing actively. If the price remains stale, the pool is attracting adverse selection.

The spread—the difference between what a buyer pays and what a seller receives—is dynamic on-chain. Solscan allows a trader to query the exact input and output of individual transactions, from which the implied price can be calculated. By comparing the implied price of consecutive swaps, a trader can measure whether the spread is widening (suggesting sandwich pressure or volatility) or remaining constant (suggesting calm market conditions or active market making). A pool with consistent 0.1 percent spreads is preferable to one with 0.05 percent spreads on average but occasional 2 percent spikes, because the trader can predict execution quality.

Arbitrage activity, visible through repeated swaps between the same pair on different pools, indicates that price disparities are being closed. Heavy arbitrage suggests that the pools are well-connected and fairly priced relative to each other. Absence of arbitrage, particularly when an oracle price feed shows a clear misprice, suggests that the inefficient pool is either isolated (not easily accessible) or that the transaction cost to exploit it exceeds the profit. A trader can use this inference to assess whether a lower-slippage pool is genuinely better or whether it is simply illiquid and therefore not attractive to competition.

Detecting manipulation and false-price execution

MEV is not the only threat to fair execution. Flash loan attacks, oracle manipulation, and token supply exploits can all produce temporary price dislocations that sandwich traders into bad fills. Solscan’s transaction verification and advanced search capabilities help distinguish between legitimate market volatility and manipulation. If a token’s price on a Solana DEX moves 10 percent in a single block while the price on Ethereum or Polygon remains unchanged, and no significant on-chain event occurred, a flash loan attack or oracle flash is plausible.

Verify by examining the block’s complete transaction history. If a single transaction mints a large amount of an asset, uses it to manipulate a price feed, and profits from another transaction in the same block, that is a flash loan attack. The transactions will appear in Solscan’s block view with clear causality. A trader can use this information to avoid executing swaps in pools vulnerable to this pattern or to wait until the next block when prices have normalized. If manipulation is systematic (repeated in multiple blocks), the pool or protocol itself may have insufficient safeguards, and the trader should avoid it permanently.

Oracle prices on Solscan can be compared against on-chain price oracles such as Pyth or Switchboard by examining the transaction instructions and program logs. If a swap’s implied price deviates significantly from the oracle price at the time of execution, the trader overpaid, and understanding why is important. It could be slippage from pool movement, sandwich extraction, or the trader’s transaction being delayed and executing at a much later time than expected. Solscan’s timestamp and confirmation status clarify the latter; if the confirmed time is minutes after broadcast, network congestion caused the delay.

Building a custom MEV analysis workflow

Sophisticated traders combine Solscan with additional tools to automate MEV detection. The explorer’s API access and developer tools enable programmatic queries of transaction history, token balances, and program events. A trader can build a bot that continuously monitors specific liquidity pools, calculates the fair price based on on-chain oracle feeds, and compares it against recent execution prices. When the statistical distribution of fills degrades (indicating sandwich attacks), the bot can switch to alternative pools or delay execution until the attack pattern subsides.

Begin by exporting transaction data for a specific token pair over a meaningful time period (e.g., the last week). Filter by program ID to isolate a single DEX. For each transaction, extract the input amount, output amount, and implied price. Plot the execution price against time and transaction size. Identify outliers where execution was significantly worse than the trend. Correlate these outliers with block times, validator identities (visible in Solscan’s block details), and network congestion metrics (estimated by examining transaction throughput). Over time, patterns emerge: certain time windows are safer, certain pools are consistently fairer, and certain transaction sizes are more vulnerable.

A practical implementation for a retail trader is less complex. Access sites.google.com/mywalletcryptous.com/solscan-blockchain-explorer/ and create a simple spreadsheet of recent swaps for the token pair you trade. Record the timestamp, size, execution price, and observed slippage. After collecting 10–20 samples, calculate the median slippage and identify the times and conditions where execution was best. Apply this empirical rule to future trades: avoid execution during high-congestion periods, prefer pools with tighter historical spreads, and use smaller transaction sizes if necessary to reduce sandwich opportunity.

Practical execution strategies to minimize MEV exposure

No amount of analysis eliminates MEV entirely, but traders can reduce exposure through deliberate execution discipline. First, fragment large orders. A 1,000 SOL swap is attractive to sandwich attackers because the potential profit is large. Five 200 SOL swaps, if executed across different pools or with time between them, are each less attractive and collectively reduce the average sandwich loss. Solscan’s transaction history reveals whether attackers specifically target large orders or whether they operate randomly; if targeting is evident, fragmentation is justified.

Second, execute during low-activity windows. Monitor Solscan’s real-time transaction feed for pools you are about to trade. If the pool is quiet and external oracle prices are aligned, execute immediately. If the pool is in the middle of heavy activity, wait. The delay costs nothing and reduces sandwich risk substantially. Some traders set alerts to notify them when a target pool’s throughput drops below a threshold, triggering execution at that moment.

Third, use private relays or MEV-resistant routing. Some routing services (such as Jupiter with specific settings) offer options to route through private relays that do not broadcast pending transactions to the public mempool. Solscan cannot track transactions that have not yet been confirmed, so this approach is invisible to sandwich attackers monitoring the explorer. However, private relays may involve trusted intermediaries, so the trade-off is worth understanding: reduced MEV risk in exchange for trusting that the relay operator does not extract MEV themselves.

Fourth, verify slippage limits. Before executing any swap, calculate the minimum acceptable output based on current oracle prices and your acceptable slippage tolerance (typically 0.3 to 1 percent for retail trades). Set this as a hard limit in the swap interface. If execution would produce worse output, the transaction reverts, protecting you from catastrophic sandwich or manipulation events. Solscan cannot prevent the transaction from being broadcast, but it can be used to confirm that your slippage limit is realistic by examining the distribution of recent execution prices for similar-sized swaps.

Learning from competitor execution and market-wide patterns

Solscan’s comprehensive transaction database is a public record of every trader’s execution quality. Observing how professional traders execute large swaps teaches important lessons. If a known market maker fragments a large order across five pools with staggered timing, they are signaling that sandwich risk is material in that token pair. If a professional arbitrageur executes a flash swap (borrow, execute, repay) all within a single transaction, they are demonstrating risk-free execution that other traders cannot easily replicate. Solscan makes these behaviors visible through crypto analytics and transaction pattern study.

On a broader level, examine aggregate metrics over time. If the average slippage for SOL-USDC swaps in a specific size range increases from 0.2 percent to 0.8 percent over the course of a week, sandwich attack frequency or sophistication may be increasing. If certain validators’ blocks consistently show higher slippage than others, that is actionable. If a new DEX or liquidity pool launches and shows consistently fair execution, investigate whether it offers structural advantages (better market makers, less MEV participation, superior technology) that justify switching from your current choice.

The long-term insight is that MEV is not a random cost—it is a systematic bias that favors informed, well-equipped traders over casual retail traders. Using Solscan to develop this information advantage is legitimate and increasingly expected at any serious operational level. The goal is not to eliminate risk entirely but to measure it precisely, avoid unnecessary exposure, and make conscious trade-offs between convenience and execution quality.

Frequently asked questions

How can I identify a sandwich attack in Solscan?

Look for a pattern of three transactions in the same block: an attacker’s buy that shifts the pool price, your swap executed at a worse price, and the attacker’s sell extracting profit. Compare your transaction’s output against historical execution prices for similar-sized swaps in Solscan’s token overview. If output is materially worse, sandwich extraction is likely. Advanced detection involves comparing the implied price of consecutive transactions to measure whether spreads widen temporarily around your swap.

Which Solscan features are most useful for MEV analysis?

The real-time transaction display with timestamp and fee data is essential for timing execution. The token overview with historical swap data enables statistical analysis of execution prices across pools. The block and epoch information with validator monitoring reveals when sandwich attackers are likely active. The API access and developer tools allow programmatic extraction of data for automated monitoring. All features are free and require no login.

How much slippage should I expect, and what indicates I am being sandwiched?

Typical slippage for retail-sized swaps (under 10 SOL) on liquid pools is 0.1 to 0.5 percent. Slippage above 1 percent on a stable liquid pool, or slippage that is consistently worse than the previous block’s similar swap, suggests sandwich pressure. Use Solscan to examine the distribution of execution prices for your token pair and size over the past week; if your execution falls in the worst 10 percent of the distribution despite avoiding low-liquidity pools, sandwiching is likely.

Share this post