5/5
## Understanding GMX Trading and Swap Fees Trading and swapping on decentralized exchanges like GMX involves various costs. Understanding these fees is crucial for managing your positions and expectations effectively. This lesson breaks down the different fees you'll encounter when opening/closing leveraged positions (longs/shorts) and swapping tokens on GMX. ### Fees for Opening and Closing Positions When you initiate or close a leveraged long or short position on GMX, several fees apply: 1. **Network Fee (Gas Fee):** * This is the fundamental cost required by the underlying blockchain network (like Arbitrum or Avalanche) to process and confirm your transaction. You must pay this fee for your open or close order to be executed on-chain. 2. **Open/Close Fee:** * GMX charges a one-time fee each time you open *or* close a leveraged position. This fee is typically calculated as a percentage (e.g., 0.1%) of your total position size. 3. **Borrowing Fee:** * Leveraged trading involves borrowing assets. For example, shorting ETH might require borrowing USDC, while longing ETH involves borrowing ETH. GMX charges an ongoing, hourly fee for borrowing these assets. This fee accrues for as long as your position remains open. The rate depends on the utilization of the asset within the GMX liquidity pool (GLP). 4. **Funding Fee:** * This is another ongoing, hourly fee designed to keep the price of assets traded on GMX closely aligned with their real-world index prices. The fee is exchanged between long and short positions. Depending on the market conditions – specifically, whether longs are paying shorts or vice versa – you might either pay or receive this fee. 5. **Price Impact:** * While not a direct fee, Price Impact significantly affects the price at which your position is opened or closed. It reflects how your trade influences the balance of assets in the GMX liquidity pool (GLP). * If your trade helps balance the pool (moving assets towards their target weights), you receive a better execution price (positive price impact, sometimes seen as a bonus or discount). * If your trade pushes the pool further out of balance, you receive a worse execution price (negative price impact, acting like a penalty or extra cost). ### Fees for Swapping Tokens When performing a simple token swap on GMX (e.g., swapping ETH for USDC), the fee structure is slightly different: 1. **Network Fee (Gas Fee):** * Similar to opening/closing positions, a network fee is required by the blockchain to execute the swap transaction. 2. **Price Impact:** * Just like with leveraged positions, swapping tokens affects the GLP asset balance. Swaps that improve the pool's balance relative to target weights receive a price improvement (positive impact/bonus), while swaps that worsen the balance incur a price penalty (negative impact/cost). 3. **Swap Fee:** * GMX charges a specific fee for executing the swap. This fee is typically calculated as a percentage of the swap amount and is based on the assets involved in the swap path (e.g., swapping from ETH incurs a fee related to ETH). These fees primarily reward the GLP liquidity providers. ### Other Considerations * **UI Fee:** Be aware that using a specific front-end interface (like the official app.gmx.io) may incur an additional small fee. This fee is charged by the interface provider, not the core GMX protocol, and might not always be explicitly displayed within the main fee breakdowns on the trading or swap interface. * **Common and Complex Fees:** Notice that the **Network Fee** and **Price Impact** are factors in both leveraged trading and swaps. Fees like **Price Impact**, **Borrowing Fee**, and **Funding Fee** are particularly dynamic, changing based on pool utilization, market conditions, and the balance between long and short positions. Their complex nature often requires deeper analysis to fully predict their effect on your trades.
Trading and swapping on decentralized exchanges like GMX involves various costs. Understanding these fees is crucial for managing your positions and expectations effectively. This lesson breaks down the different fees you'll encounter when opening/closing leveraged positions (longs/shorts) and swapping tokens on GMX.
When you initiate or close a leveraged long or short position on GMX, several fees apply:
Network Fee (Gas Fee):
This is the fundamental cost required by the underlying blockchain network (like Arbitrum or Avalanche) to process and confirm your transaction. You must pay this fee for your open or close order to be executed on-chain.
Open/Close Fee:
GMX charges a one-time fee each time you open or close a leveraged position. This fee is typically calculated as a percentage (e.g., 0.1%) of your total position size.
Borrowing Fee:
Leveraged trading involves borrowing assets. For example, shorting ETH might require borrowing USDC, while longing ETH involves borrowing ETH. GMX charges an ongoing, hourly fee for borrowing these assets. This fee accrues for as long as your position remains open. The rate depends on the utilization of the asset within the GMX liquidity pool (GLP).
Funding Fee:
This is another ongoing, hourly fee designed to keep the price of assets traded on GMX closely aligned with their real-world index prices. The fee is exchanged between long and short positions. Depending on the market conditions – specifically, whether longs are paying shorts or vice versa – you might either pay or receive this fee.
Price Impact:
While not a direct fee, Price Impact significantly affects the price at which your position is opened or closed. It reflects how your trade influences the balance of assets in the GMX liquidity pool (GLP).
If your trade helps balance the pool (moving assets towards their target weights), you receive a better execution price (positive price impact, sometimes seen as a bonus or discount).
If your trade pushes the pool further out of balance, you receive a worse execution price (negative price impact, acting like a penalty or extra cost).
When performing a simple token swap on GMX (e.g., swapping ETH for USDC), the fee structure is slightly different:
Network Fee (Gas Fee):
Similar to opening/closing positions, a network fee is required by the blockchain to execute the swap transaction.
Price Impact:
Just like with leveraged positions, swapping tokens affects the GLP asset balance. Swaps that improve the pool's balance relative to target weights receive a price improvement (positive impact/bonus), while swaps that worsen the balance incur a price penalty (negative impact/cost).
Swap Fee:
GMX charges a specific fee for executing the swap. This fee is typically calculated as a percentage of the swap amount and is based on the assets involved in the swap path (e.g., swapping from ETH incurs a fee related to ETH). These fees primarily reward the GLP liquidity providers.
UI Fee: Be aware that using a specific front-end interface (like the official app.gmx.io) may incur an additional small fee. This fee is charged by the interface provider, not the core GMX protocol, and might not always be explicitly displayed within the main fee breakdowns on the trading or swap interface.
Common and Complex Fees: Notice that the Network Fee and Price Impact are factors in both leveraged trading and swaps. Fees like Price Impact, Borrowing Fee, and Funding Fee are particularly dynamic, changing based on pool utilization, market conditions, and the balance between long and short positions. Their complex nature often requires deeper analysis to fully predict their effect on your trades.
A thorough examination to Understanding GMX Transaction Costs - Delve into the fee structure for GMX trading and swapping, covering network, open/close, borrow, funding, and swap fees. Grasp the concept of price impact and learn about the hidden UI fee applied via the front-end.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Cyfrin Updraft has partnered with GMX to provide SSCD+ certifications vouchers to the first 25 students who demonstrate the completion of this course and are building on top of GMX. Join the GMX Discord server to redeem your coupon, or navigate to the docs to learn more!
Course Overview
About the course
Mechanics and contract architecture of the GMX protocol
Token pricing and fees
Liquidity: GM pools and GLV vaults
Math, funding rates, liquidation pricing, P&L calculations
Limit orders, take profit orders, stop loss, and stop market orders
Auto-cancel and auto-deleveraging
GLP, esGMX, GMX staking and delegation
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Last updated on June 26, 2025
Duration: 8min
Duration: 1h 19min
Duration: 1h 24min
Duration: 16min
Duration: 11min
Duration: 11min
Duration: 6min
Course Overview
About the course
Mechanics and contract architecture of the GMX protocol
Token pricing and fees
Liquidity: GM pools and GLV vaults
Math, funding rates, liquidation pricing, P&L calculations
Limit orders, take profit orders, stop loss, and stop market orders
Auto-cancel and auto-deleveraging
GLP, esGMX, GMX staking and delegation
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Last updated on June 26, 2025