5/5
## How to Remove Liquidity from a GMX V2 GLV Vault This guide details the process of removing liquidity from a GMX V2 GLV (GMX Liquidity Vault) token pool by selling your GLV tokens. We will use the `GLV (BTC-USDC)` vault as an example, demonstrating how to convert your GLV position back into the underlying assets, such as BTC and USDC, using the GMX V2 interface (app.gmx.io). Removing liquidity, or "selling" your GLV tokens, involves specifying the amount you wish to withdraw, selecting an appropriate underlying GMX Market (GM) pool to facilitate the exchange, approving the GMX smart contract to handle your GLV tokens, and finally confirming the withdrawal transaction. **Step-by-Step Withdrawal Process:** 1. **Locate Your Vault and Initiate Sale:** Navigate to the section displaying your "GLV Vaults" on the GMX platform. Find the specific vault you wish to withdraw from, for instance, `GLV (BTC-USDC)`. Note your balance (e.g., `7.5790 GLV`). Click the "Sell" button associated with this vault. 2. **Configure the Sale:** A panel dedicated to the selected vault will appear with the "Sell GLV" tab active. In the "Pay" section, specify the amount of GLV tokens you want to sell. To withdraw your entire position, click the "MAX" button. This will populate the field with your full GLV token balance (e.g., `7.579016511064473621 GLV`). 3. **Review Estimated Received Assets:** The "Receive" section will automatically display an estimate of the underlying assets you will receive in return for your GLV tokens. For the `GLV (BTC-USDC)` vault, this will show estimated amounts of USDC and BTC. These figures are based on the current pool composition and market prices and may fluctuate. 4. **Select the Withdrawal Pool:** Below the input fields, locate the "Pool" selection dropdown. The interface may default to a specific pool (e.g., `FARTCOIN/USD [BTC-USDC]`). It is crucial to select the appropriate underlying GMX Market (GM) pool for your withdrawal, as this can influence the execution price and final amounts received. Click the dropdown, use the search bar if needed (e.g., type `BTC`), and select the desired market pool, such as `BTC/USD [BTC/USD]`. Observe that the estimated "Receive" amounts may update slightly after changing the pool selection, reflecting the specific conditions of the chosen market pool. 5. **Approve GLV Token Spending:** As GLV is an ERC-20 token, you must grant the GMX smart contract permission to transfer these tokens from your wallet before executing the sale. Check the box labeled "Allow GLV to be spent". This action will trigger a transaction request in your connected web3 wallet (e.g., MetaMask) asking for a "Spending cap request". Review the request in your wallet and click "Confirm" to grant the approval. Wait for this approval transaction to be confirmed on the blockchain. 6. **Confirm the Sell Transaction:** Once the approval transaction is confirmed, the button will change from indicating pending approval to "Sell GLV". Review the final transaction details, including estimated received amounts, fees, and price impact. Click the "Sell GLV" button. This will prompt another transaction request ("Transaction request") in your wallet for the actual withdrawal. Click "Confirm" in your wallet to execute the sale. 7. **Monitor Transaction Processing:** After confirming, you should see notifications indicating the transaction's progress, such as "Selling GLV [BTC-USDC]", "Sell request sent", and "Fulfilling sell request". Once the transaction is successfully processed on the blockchain, the specified amounts of the underlying assets (USDC and BTC in this example) will be transferred to your wallet. **Key Concepts Involved:** * **GLV (GMX Liquidity Vault):** Yield-optimizing vaults that hold positions across multiple underlying GMX Market (GM) pools. Depositing assets yields GLV tokens representing your share in the vault's diversified liquidity and earned fees. `GLV (BTC-USDC)` specifically represents liquidity provision using BTC and USDC. * **GM (GMX Market) Pools:** These are the fundamental liquidity pools for individual trading pairs on GMX V2 (e.g., `BTC/USD`, `ETH/USD`). GLV vaults derive their liquidity and yield from these underlying GM pools. * **Selling GLV Tokens:** This is the mechanism for redeeming your share of the GLV vault and withdrawing the corresponding underlying assets (like BTC and USDC). The amount received depends on the vault's value and composition at the time of withdrawal. * **ERC-20 Token Approval:** A standard security measure in EVM blockchains. It requires users to explicitly grant permission (approve) a smart contract to interact with their specific ERC-20 tokens before the contract can move them (e.g., during a sale or stake). This is a one-time approval per token/contract pair, or requires re-approval if the spending limit was capped. * **Withdrawal Pool Selection:** GMX V2 allows selecting a specific underlying GM pool to process the GLV sale. This choice can potentially impact the exact exchange rate or slippage based on the liquidity depth and current state of the selected pool versus other available pools contributing to the GLV. * **Transaction Fees:** Executing transactions on the blockchain incurs network fees (gas costs, e.g., paid in ETH on Arbitrum). GMX protocol interactions may also involve protocol fees, reflected in the final transaction details. **Important Considerations:** * **Two-Step Transaction:** Remember that selling GLV tokens typically requires two distinct blockchain transactions: the initial ERC-20 approval and the subsequent sell/withdrawal transaction. * **Wallet and Gas:** Ensure your web3 wallet is connected and contains sufficient native currency (like ETH on Arbitrum) to cover the gas fees for both transactions. * **Dynamic Estimates:** The displayed estimates for received assets are subject to change based on real-time market price movements and transaction execution timing. * **Pool Impact:** Carefully consider the selected GM pool for withdrawal, as its specific state (liquidity, price) at the moment of execution will influence the final amounts you receive.
A practical walkthrough to Withdrawing from GMX V2 GLV Vaults - Follow the process of removing liquidity from a GMX V2 vault by selling your GLV tokens. Understand how to select an underlying GM pool, perform the ERC-20 approval, and confirm the transaction to receive assets back.
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