GMGN Co-Creation Workshop: How to Become a Qualified P-Soldier
Original Title: "GMGN's Junior P Classroom - Gas, Gas Fee, Slippage, MEV"
Original Author: Haze, Co-founder of gmgn
During on-chain transactions, many fundamental concepts may determine the success or failure of your transaction.
Today, transaction tools aim to reduce everyone's operating threshold. Most people lack an understanding of on-chain parameters. In this article, we’ll help you get acquainted with them.
Some Basic Concepts:
· Gas Fee (GAS)
· Gas = Blockchain transaction fee
· Pays miners / validators to process your transaction
· High Gas → Transaction prioritization for packaging
· Low Gas → Risk of being stuck in the queue
Payment Methods:
· SOL Transaction → Pay in SOL
· ETH Transaction → Pay in ETH
· Different chains have different Gas mechanisms
Slippage:
Slippage = Deviation between the expected price and the actual execution price
Causes of Slippage:
· Insufficient market depth → Large order size, but pool liquidity is inadequate
· Transaction delay → Price fluctuation from submission to execution
· MEV Sandwich Attack → Bots manipulate prices for arbitrage
Example:
You use 1000 USDC to buy ETH, expecting to transact at 2000 USDC/ETH, which should give you 0.5 ETH.
But the execution price becomes 2050 USDC/ETH, and you end up receiving only 0.4878 ETH. Your slippage is 2.5%.
If you set your slippage to 0.1%, the transaction will fail directly due to insufficient slippage.
How does a MEV Sandwich Attack target you?
Sandwich Attack Principle:
· Front-running → Bots buy ahead of you, driving up the price
· Your trade execution → You only get filled at a higher price, suffering from slippage
· Back-running → Bots immediately sell for profit
Impact:
· Your buy price is pushed up, increasing transaction costs
· Bots exploit your slippage, making you buy high and sell low
Solana vs Eth on Sandwich Attacks
· ETH → Precise sandwich insertion
· SOL → MEV bots batch-submit orders, casting a wide net for sandwiches
How to Prevent Sandwich Attacks?
Enable MEV protection to reduce the likelihood of transaction snooping
· Priority Fee, also known as Bribe
· Priority Fee = Extra tip to miners / validators to expedite transaction
Components:
· Base Fee → Network base fee (Solana has a fixed fee, ETH has a dynamic fee)
· Priority Fee → Extra fee you pay to increase transaction priority
Purpose:
Enhance transaction packaging priority for faster on-chain execution. In MEV competition, transactions with higher priority fees are executed first.
Summary
On-chain transaction Gas Fee + Slippage (including your set slippage tolerance and the impact of your buy amount on the pool) + MEV sandwich collectively determine the final transaction cost.
Real-World Example:
Many people are apeing into dog coins on Solana with a 50% slippage + MEV protection. Is this safe?
· Most of the Sniping transactions are AMM trades
· You buy a token with 1000 USDC, 50% slippage, which allows for execution at an extreme price
· MEV bots front-run your buy, driving up the price (within your slippage tolerance)
· Your trade executes at a higher price, receiving less of the token than expected
· MEV bots immediately sell to arbitrage your slippage loss.
If MEV Protection is in place:
· Trades won't be precisely sandwiched (bots can't sandwich your transactions)
· If the pool has sufficient liquidity and the buy amount doesn't impact the price, the trade proceeds normally
If MEV Protection is not in place:
· Solana lacks a private Mempool, MEV bots can still see your transaction and sandwich you
If your amount impacts the pool:
· High slippage = permits extreme price changes, market fluctuations themselves may lead to losses
· Low liquidity pool = higher trade impact, prone to becoming a sandwich
How to Avoid being Sandwiched?
· Avoid using high slippage, set slippage range sensibly
· If using AMM, enable MEV protection to reduce monitoring risk
Is High Slippage the Key to Successful Sniping?
Most sniping transactions do not have such high short-term volatility, and the overflow slippage range does not have an additional success rate effect.
Mostly, it's your gas fee + your trading node + trade routing to pool factors. These factors can continuously improve your transaction success rate. Slippage is just an option in extreme situations. Most of the time, a 10% - 20% slippage is sufficient. This part can be manually adjusted multiple times during sniping to control risks effectively.
For junior traders, it's all about risking small to win big, with a small single purchase amount. A slight adjustment in slippage can help avoid most sandwiching situations.
Conclusion
When the trading venue is an AMM (Raydium), the slippage parameter determines your likelihood of being sandwiched by MEV.
If you set a high slippage tolerance, you need to evaluate:
· Whether the gas fee is high enough to avoid MEV frontrunning
· Whether the buy amount is large enough to make MEV frontrunning profitable
· Whether the liquidity pool is deep enough, or else you might experience maximum slippage
· By using batched small trades + reducing slippage, you can greatly reduce the risk of sandwich attacks and losses from small pools.
How much slippage is acceptable? How is a small trade defined?
This can only be felt through hands-on experience! It's like driving a manual transmission car—practice makes perfect!
You may also like

Wall Street Shorts ETH: Vitalik is aware and has front-run, while Tom Lee remains oblivious

Social Capital CEO: How Equity Tokenization is Reshaping Capital Markets from US Stocks to SpaceX?

CoinGecko Report: Surge of 346% vs Dip of 20.8%, The Wild Rise of DEX

a16z: The Real Opportunity of Stablecoins Lies Not in Disruption but in Filling Gaps

Mining Exodus: Someone Holds $12.8 Billion AI Order

March 6 Market Key Intelligence, How Much Did You Miss?

a16z: The True Opportunity of Stablecoins is in Complementing, Not Disrupting
Predict LALIGA Matches, Shoot Daily & Win BTC, USDT and WXT on WEEX
The WEEX × LALIGA campaign brought together football excitement and crypto participation through a dynamic interactive experience. During the event, users predicted matches, completed trading tasks, and took daily shots to compete for rewards including BTC, USDT, WXT, and exclusive prizes.

Ray Dalio Dialogue: Why I'm Betting on Gold and Not Bitcoin

Who Took the Money in the AI Era? A Must-See Investment Checklist for HALO Asset Trading

Wall Street Bears Target Ethereum: Vitalik In the Know Takes Flight, Tom Lee Remains Bullish

Pump.fun Hacker Steals $2 Million, Receives 6-Year Prison Sentence, Opts for 'Self-Detonation'

6% Annual Percentage Yield as Musk Declares War on Traditional Banks

36 years, 4 wars, 1 script: How does capital price the world in conflict?

Mining Companies' Great Migration: Some Have Already Secured $12.8 Billion in AI Orders

What Is Vibe Coding? How AI Is Changing Web3 & Crypto Development
What is vibe coding? Learn how AI coding tools are lowering the barrier to Web3 development and enabling anyone to build crypto applications.

The parent company of the New York Stock Exchange strategically invests in OKX: The intentions behind the $25 billion valuation

WEEX P2P update: Country/region restrictions for ad posting
To improve ad security and matching accuracy, WEEX P2P now allows advertisers to restrict who can trade with their ads based on country or region. Advertisers can select preferred counterparty locations for a safer, smoother trading experience.
I. Overview
When publishing P2P ads, advertisers can now set the following:
Allow only counterparties from selected countries or regions to trade with your ads.
With this feature, you can:
Target specific user groups more precisely.Reduce cross-region trading risks.Improve order matching quality.
II. Applicable scenarios
The following are some common scenarios:
Restrict payment methods: Limit orders to users in your country using supported local banks or wallets.Risk control: Avoid trading with users from high-risk regions.Operational strategy: Tailor ads to specific markets.
III. How to get started
On the ad posting page, find "Trading requirements":
Select "Trade with users from selected countries or regions only".Then select the countries or regions to add to the allowlist.Use the search box to quickly find a country or region.Once your settings are complete, submit the ad to apply the restrictions.
When an advertiser enables the "Country/Region Restriction" feature, users who do not meet the criteria will be blocked when placing an order and will see the following prompt:
If you encounter this issue when placing an order as a regular user, try the following solutions.
Choose another ad: Select ads that do not restrict your country/region, or ads that allow users from your location.Show local ads only: Prioritize ads available in the same country as your identity verification.
IV. Benefits
Compared with ads without country/region restrictions, this feature provides the following improvements.
Aspect
Improvement
Trading security
Reduces abnormal orders and fraud risk
Conversion efficiency
Matches ads with more relevant users
Order completion rate
Reduces failures caused by incompatible payment methods
V. FAQ
Q1: Why are some users not able to place orders on my ad?
A1: Their country or region may not be included in your allowlist.
Q2: Can I select multiple countries or regions when setting the restriction?
A2: Yes, multiple selections are supported.
Q3: Can I edit my published ads?
A3: Yes. You can edit your ad in the "My Ads" list. Changes will take effect immediately after saving.