5/5
## Understanding Markets on the GMX Protocol Within the GMX perpetual swap protocol, a "Market" serves as a specific environment designed for cryptocurrency price speculation. It's the designated place where users can open **long** positions (betting on a price increase) or **short** positions (betting on a price decrease) for a particular underlying cryptocurrency asset. ### Defining a GMX Market: The Three Key Components Every distinct Market on the GMX platform is uniquely defined by a combination of three essential components: 1. **Index Token:** * **What it is:** This represents the cryptocurrency whose price movement users are speculating on. It is the underlying asset tracked by the perpetual swap contract within that specific Market. * **Its Role:** The Index Token determines *which* asset's price fluctuations will dictate the profit or loss for positions opened in that Market. * **Important Detail:** The Index Token does not necessarily need to be an actual token deployed on the specific blockchain where GMX is operating (e.g., Arbitrum). GMX utilizes price oracles to track the price feed of the designated Index Token, even if it resides on a different chain or isn't directly available on the current one. Users are trading based on this price feed. 2. **Long Token:** * **What it is:** This is the specific cryptocurrency token used to pay out profits to users who successfully execute a long position (i.e., they correctly predicted a price increase). * **Its Role:** The Long Token defines the *currency* in which profits from winning long trades are settled and distributed. 3. **Short Token:** * **What it is:** This is the specific cryptocurrency token used to pay out profits to users who successfully execute a short position (i.e., they correctly predicted a price decrease). * **Its Role:** The Short Token defines the *currency* in which profits from winning short trades are settled and distributed. The precise combination of these three elements – the Index Token (what you bet on), the Long Token (how long profits are paid), and the Short Token (how short profits are paid) – constitutes the unique definition of a single GMX Market. ### Examples of GMX Market Configurations Let's look at a few examples to illustrate how these components create different trading environments: 1. **ETH Market Example:** * **Index Token:** ETH (Ethereum) * **Long Token:** WETH (Wrapped Ether) * **Short Token:** USDC (USD Coin) * **Outcome:** In this market, users speculate on the price of ETH. Profits from successful long positions are paid in WETH, while profits from successful short positions are paid in USDC. 2. **DOGE Market Example (Illustrating Off-Chain Index):** * **Index Token:** DOGE (Dogecoin) * **Long Token:** WETH * **Short Token:** USDC * **Outcome:** Here, users bet on the price of DOGE. Long profits are settled in WETH, and short profits in USDC. This highlights that the Index Token (DOGE) might not exist natively on the chain GMX operates on, but its price can still be used as the basis for a market via oracle feeds. 3. **BTC Market Example (Same Payout Token):** * **Index Token:** BTC (Bitcoin) * **Long Token:** wBTC (Wrapped Bitcoin) * **Short Token:** wBTC (Wrapped Bitcoin) * **Outcome:** Users speculate on BTC's price. In this configuration, *both* long and short profits are paid out using the same asset, wBTC. This demonstrates the flexibility allowed in structuring market payout mechanisms. ### Key Takeaways * **Profit Settlement:** The choice of Long Token and Short Token is fundamental, as it dictates the specific asset traders receive when their directional bet within a Market is profitable. * **Index Flexibility:** The asset being tracked (Index Token) can be distinct from the assets used for profit payouts, and it doesn't even need to reside directly on the same blockchain as the GMX deployment. * **Perpetual Swaps:** GMX Markets utilize perpetual swaps as the underlying financial instrument, enabling users to gain synthetic exposure to an asset's price movements without necessarily holding the asset itself. * **Code Representation:** When exploring the GMX protocol's smart contracts or technical documentation, the concepts of "Market" and related "Market Tokens" often map directly to specific data structures or variables within the code.
A structural explanation to GMX Markets - Unpack the concept of a GMX Market used for perpetual swaps. Learn how the Index, Long, and Short tokens define the specific trading conditions for each asset.
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