Set up your margin account

Before opening your first position, you need to configure the margin account that will hold your collateral. This is the foundational step for managing risk on a perp DEX. Your choice here dictates how your funds are allocated across different positions and determines how easily a single losing trade can drain your entire balance.

Choose your margin mode

Most on-chain perpetual DEXs offer two margin modes: isolated and cross. This decision acts as a circuit breaker for your portfolio.

  • Isolated margin assigns a fixed amount of collateral to each specific position. If that trade is liquidated, you only lose the funds allocated to it. Your remaining balance stays safe. This is the safer option for beginners or for traders who want to cap their exposure on high-volatility assets.
  • Cross margin pools all available wallet balance into a single margin pool for a market. This allows you to maintain larger positions because your entire balance backs every trade. However, a sharp move against one position can liquidate your entire account balance, not just the funds tied to that specific trade.

Fund and connect

Once you have selected your margin mode, connect your wallet to the DEX interface. Deposit the native token or stablecoin required as collateral into the designated margin vault. Ensure you have enough funds to cover both your intended position size and the maintenance margin required to keep it open.

1
Connect wallet and select margin mode

Open the DEX interface and connect your wallet. Navigate to the margin account settings and select either isolated or cross margin based on your risk tolerance.

onchain perp margin
2
Deposit collateral

Transfer your chosen collateral asset (e.g., USDC, ETH, or SOL) into the margin account. Verify that the balance reflects in the UI before proceeding.

onchain perp margin
3
Verify account setup

Check your available margin and maintenance requirements. Ensure you understand how the selected margin mode will impact your liquidation price.

Calculate initial margin requirements

Before opening a position, you must determine how much collateral the protocol requires. This is your initial margin. Think of it as a security deposit that locks up capital to guarantee the trade. If you do not calculate this correctly, you risk over-leveraging your account or failing to open the position at all.

The math is straightforward. To find the initial margin, multiply the position size by the mark price, then divide by your chosen leverage. This formula ensures you only lock up the specific fraction of the total position value that the protocol demands.

Text
Initial Margin = (Position Size × Mark Price) / Leverage

For example, if you want a $10,000 position on Ethereum with 10x leverage, you need $1,000 in collateral. The remaining $9,000 is borrowed from the liquidity pool. This structure allows you to control a large position with a smaller amount of capital, but it also means your equity is directly tied to the performance of that $10,000 exposure.

Understanding this baseline is critical for risk management. It defines your starting point. If the market moves against you, your margin is what gets used to cover losses before liquidation triggers. Always verify the mark price used by the oracle, as using the last traded price instead can lead to inaccurate margin calculations. For more details on how leverage impacts these requirements, refer to official guides on MetaMask's perpetual futures trading.

Monitor real-time LTV metrics

Manage Onchain Perp Margin Without Liquidation works best as a clear sequence: define the constraint, compare the realistic options, test the tradeoff, and choose the path with the fewest hidden costs. That order keeps the advice usable instead of decorative. After each step, pause long enough to check whether the recommendation still fits the reader's actual situation. If it depends on perfect timing, unusual access, or a best-case budget, include a simpler fallback.

onchain perp margin
1
Define the constraint
Name the space, budget, timing, or skill limit that shapes the Manage Onchain Perp Margin Without Liquidation decision.
onchain perp margin
2
Compare realistic options
Use the same criteria for each option so the tradeoff is visible.
3
Choose the practical path
Pick the option that still works after cost, maintenance, and fallback needs are included.

Adjust positions to lower liquidation risk

When your liquidation price approaches your entry or current market price, the margin buffer is thinning. Onchain perpetual DEXs liquidate positions when the margin balance falls below maintenance requirements, which is typically 50% or less of the initial margin [src-serp-5]. You must act before the protocol's insurance fund triggers a forced close.

Add collateral to boost equity

Depositing additional assets into your margin account increases your total equity. This widens the gap between your current liquidation price and the market price, giving the trade more room to breathe. Many perp DEXs support multiple margin modes, allowing you to manage this risk across open positions more effectively [src-serp-2]. Ensure the deposited asset is accepted as collateral by the specific DEX you are using.

Reduce position size

If adding collateral isn't an option, reducing your position size is the most direct way to lower risk. Closing a portion of the trade decreases your notional exposure and reduces the amount of margin required to maintain it. This action immediately improves your loan-to-value (LTV) ratio and moves your liquidation price further away from the current market price.

onchain perp margin

Checklist for emergency margin adjustment

  • Check current liquidation price vs. market price
  • Verify accepted collateral assets on the DEX
  • Decide between adding collateral or reducing size
  • Execute transaction before price moves further
  • Confirm updated margin ratio in dashboard

Cross-Margin vs. Isolated Margin

Choosing between cross-margin and isolated margin determines how your account balances risk across your portfolio. This decision directly impacts your capital efficiency and your exposure to liquidation events.

Isolated Margin: Contained Risk

Isolated margin assigns a specific amount of collateral to each individual position. If that trade hits the liquidation price, only the funds allocated to that position are lost. Your remaining account balance remains untouched and available for other trades.

This mode acts as a circuit breaker. It is the safer choice for traders who want to limit their maximum loss to a predefined amount. It prevents a single bad trade from draining the entire wallet. Many on-chain perpetual DEXs default to or highlight this mode for its predictability and risk containment.

Cross-Margin: Capital Efficiency

Cross-margin pools all available wallet balance into the margin pool for your positions. This shared liquidity allows you to maintain larger positions with less individual capital per trade. It improves capital efficiency because idle funds in your wallet can support active positions.

However, this efficiency comes with higher risk. If one position moves against you significantly, it can drain your entire wallet balance, leading to liquidation of all open positions. Cross-margin perpetual DEXs often support higher leverage (up to 50x) precisely because of this shared liquidity model, but it requires strict risk management to avoid total account wipeouts.

Comparison Table

FeatureIsolated MarginCross-Margin
Risk ScopeLimited to the allocated position collateral.Extends to the entire wallet balance.
Capital EfficiencyLower; funds in other positions are idle.Higher; idle wallet funds support active positions.
Liquidation ImpactOnly the specific position is liquidated.All positions may be liquidated if the wallet is drained.
Best ForBeginners, high-volatility trades, strict risk limits.Experienced traders, high leverage, maximizing capital use.
Default DEX ModeOften the default or recommended safety setting.Available on most advanced perp DEXs for power users.

Which Mode Fits Your Strategy?

Select isolated margin if you are new to on-chain trading or if you are executing high-risk, high-volatility trades where you want to cap your losses. It provides a clear boundary for your exposure.

Choose cross-margin if you are an experienced trader who understands how to manage portfolio-wide risk. It is ideal for strategies that require high capital efficiency or sustained leverage, provided you monitor your total wallet health closely.

Frequently asked questions about perp margin

What is margin in perp trading?

Margin is the collateral you deposit to open and maintain a leveraged position. It acts as a guarantee against potential losses. Unlike spot trading where you own the asset outright, margin trading allows you to control a larger position with less upfront capital, but it also amplifies both gains and risks.

What are onchain perpetuals?

Onchain perpetuals are decentralized derivatives contracts that track an asset’s price without an expiration date. Instead of holding the underlying asset like Bitcoin, you take a position on its price movement. These contracts exist on the blockchain, allowing for transparent, trustless trading without a central intermediary.

Is perp trading risky?

Yes, perp trading carries high risk, particularly the risk of liquidation. If your margin balance falls below the required maintenance level, the position is forcibly closed, and you may lose your entire deposited collateral. Volatility can trigger liquidations quickly, even if your long-term view on the asset’s direction is correct.

What is the difference between perps and spot trading?

In spot trading, you buy and own the asset immediately. In perp trading, you trade a contract that mirrors the asset’s price. Perps allow for leverage and shorting (betting on price drops) more easily than spot markets, but they require ongoing margin management and expose you to liquidation risk.