Blockchain/Level VIII · The memecoin age/8.2 Solana/Lesson 4
Priority fees, MEV and Jito
The auction for milliseconds: how fees buy order and how MEV exploits it
MaterialsA Solana block explorer that shows compute units and feesThe Solana fee documentation (solana.com/docs)
Wonder
- Why does a transaction that pays more in priority fees not necessarily execute before one that pays less?
- How can a validator profit from the exact sequence of trades without revealing their own intentions to the rest of the network?
- What mechanism allows a user to cap the maximum loss from a sandwich attack while still accepting some price slippage?
Explore
- Every Solana transaction pays a base fee of 5,000 lamports per signature. This fixed cost covers the computational work required to verify and commit the transaction to the ledger. However, the base fee alone does not determine when a transaction executes. In periods of high network activity, validators receive more transactions than they can process within the 400-millisecond slot limit. To decide which transactions to include first, validators look at an additional parameter: the priority fee.
- The priority fee is calculated as a price per compute unit (CU), denominated in micro-lamports, multiplied by the total CUs requested for that specific transaction. This creates a local auction rather than a global one. Congestion around a single popular program, such as a high-volume decentralized exchange, raises fees mainly for transactions that write to the same accounts, such as one busy pool; activity on other accounts is far less affected, though network-wide congestion still lifts fees generally.
- Maximal Extractable Value (MEV) arises from the ability to reorder or include specific transactions within a block. Arbitrageurs exploit price differences across pools by executing buy-and-sell sequences in the same slot. Liquidation bots monitor collateral ratios and trigger liquidations when thresholds are breached. Sandwich attacks represent a more aggressive form: a bot detects a pending large trade, places its own buy order immediately before it to push the price up, lets the victim’s trade execute at the inflated price, and then sells its position immediately after to capture the spread.
- Jito’s validator client, run by most of Solana’s stake, added a separate path for ordering transactions. Jito bundles groups of transactions that must be included atomically; a bundle holds up to five transactions, and if any fails the whole bundle is dropped and never lands on-chain. This allows searchers to execute complex multi-step strategies safely. Users can attach tips directly to these bundles, paying for inclusion and ordering if the bundle wins the auction. The tip auction operates independently of standard priority fees, creating a separate market for high-value transaction sequencing.
- In March 2024, Jito shut down its public mempool to reduce the visibility of pending transactions, thereby limiting opportunities for sandwich attacks on ordinary users. While this move curbed some public front-running, private communication channels between sophisticated searchers and validators persisted. Priority fees do not protect against sandwiches because a bot can always outbid a victim’s fee to secure ordering before them. A slippage limit caps how far the price can move against a trade before it fails, which limits what a sandwich can extract without preventing the attempt; some routes also offer MEV-protected submission.
- Simulating a transaction reveals its compute unit consumption, allowing senders to optimize their fee calculation. Overestimating CUs wastes lamports; underestimating causes execution failure. Wallets and aggregators often automate this by fetching recent fee percentiles from RPC nodes. Users trading on high-velocity platforms must navigate this competitive environment where milliseconds and bid prices determine execution quality. The trade-off is clear: higher fees increase the probability of inclusion but do not guarantee protection against sophisticated market manipulation.
Key facts
- The base fee for any Solana transaction signature is a fixed 5,000 lamports.
- Priority fees are calculated as micro-lamports per compute unit multiplied by requested CUs.
- Solana fee markets are largely local: congestion on one busy account mainly raises fees for transactions touching it.
- Jito bundles are all-or-nothing: if any transaction fails, the bundle is dropped.
- Jito shut down its public mempool in March 2024 to mitigate sandwich attacks.
- Slippage limits cap how much a sandwich attack can extract from a trade.
Exercise nine, six, three, one
9CollectIdentify 9 distinct transaction types on Solana (e.g., simple transfer, swap, mint, close account). Note their typical compute unit ranges and base fee requirements.
6ClusterGroup these 9 into 6 categories based on their sensitivity to MEV: high-risk (large swaps), medium-risk (mints/creates), low-risk (transfers/closes), or atomic bundles.
3DistillReduce the 6 groups to 3 core reasons why a user would increase their priority fee beyond the base cost.
1CrystallizeWrite one sentence explaining why paying a high priority fee does not guarantee protection from sandwich attacks.
Fact check
Dates, figures and claims checked against the published sources listed below.