Choose your onchain perp margin mode
Your margin mode dictates how your collateral is allocated and how close the liquidation line sits. Selecting the correct setting for onchain perp margin is the first mechanical step in preventing an unwanted exit.
Cross margin pools all available wallet balance into a single risk pool. It acts like a shared safety net, allowing profitable positions to absorb losses from losing ones. This approach maximizes capital efficiency but exposes your entire account balance to the volatility of a single trade.
Isolated margin partitions your collateral for each specific position. It creates a hard boundary: if a trade hits liquidation, only the allocated funds are lost. This method preserves the rest of your portfolio but requires more frequent rebalancing to maintain sufficient margin levels for each active position.
The choice depends on your tolerance for drawdown. Cross margin suits traders who manage multiple correlated positions and want to avoid margin calls from temporary fluctuations. Isolated margin is the standard for high-stakes, directional bets where you want to cap the maximum loss to a predefined amount.
| Feature | Cross Margin | Isolated Margin |
|---|---|---|
| Collateral Usage | Shared across all open positions | Segmented per position |
| Liquidation Risk | Lower (uses full balance) | Higher (uses fixed amount) |
| Capital Efficiency | High | Lower |
| Best For | Multi-position hedging | Capped-risk directional bets |
| Feature | Cross Margin | Isolated Margin |
|---|---|---|
| Collateral Usage | Shared across all open positions | Segmented per position |
| Liquidation Risk | Lower (uses full balance) | Higher (uses fixed amount) |
| Capital Efficiency | High | Lower |
| Best For | Multi-position hedging | Capped-risk directional bets |
For a visual breakdown of how these modes interact with funding dynamics and position sizing, refer to the diagram below.

Calculate your initial margin
Before opening a position, you must determine the exact collateral required to prevent immediate under-collateralization. This figure is your onchain perp margin, specifically the initial margin threshold. If your account balance falls below this amount at the moment of execution, the exchange will reject the trade or liquidate the position instantly.
The calculation relies on a straightforward formula: divide the total position size by your chosen leverage ratio. For instance, if you intend to control a $10,000 position with 10x leverage, your initial margin requirement is $1,000. This $1,000 acts as the security deposit that backs the larger position. As MetaMask notes, this initial margin is the specific collateral required to open the trade, distinct from the maintenance margin needed to keep it open.
Always verify the current mark price on a reliable source like CoinGecko before calculating. Prices on decentralized exchanges can fluctuate rapidly between the time you estimate and the time the transaction is confirmed. Ensure your wallet holds enough onchain perp margin to cover not just the initial requirement, but also the network gas fees for the transaction.
Monitor your margin level
Onchain perp margin positions are live, volatile, and unforgiving. The margin level percentage is your primary indicator of solvency, showing the ratio of your account equity to your used margin. When this number drops, your position is closer to the liquidation threshold. You must track this metric in real-time to stay above the critical 100% mark.
A margin level above 100% means your equity covers the required collateral. For example, a margin level of 300% indicates your equity is three times your used margin, providing a healthy buffer against adverse price movements. Below 100%, your equity is insufficient to maintain the position, triggering an immediate forced liquidation by the protocol. There is no grace period.
Add collateral before liquidation
When your margin level approaches the danger zone, adding fresh collateral is the most direct way to prevent liquidation. This action increases your available equity, effectively raising your margin level above the maintenance threshold required by the exchange. Unlike closing a position, which crystallizes your loss, adding margin allows you to maintain exposure while the market potentially moves back in your favor.
The mechanics are straightforward: you deposit additional assets into your margin wallet. On cross-margin accounts, this new collateral is pooled with your existing balance, instantly boosting the buffer for all open positions. On isolated margin accounts, you must deposit specifically into the wallet of the position at risk. Be aware that most platforms charge a small gas fee for this transaction, so ensure the deposit amount outweighs the network cost.
Timing is critical. Do not wait for a liquidation warning to act. Monitor your margin level closely, and add funds when the level drops below 150% to create a sufficient safety buffer. This proactive approach reduces the stress of manual intervention and minimizes the risk of slippage during volatile market swings.
Review your perp trading checklist
Before you execute or hold a position, verify your margin levels. Onchain perp margin relies on two thresholds: initial margin to open the trade and maintenance margin to keep it open. If your equity drops below the maintenance level, the protocol liquidates your position.
Use this checklist to ensure your position remains safe.
Common questions about perp margin
Understanding the mechanics of onchain perp margin is the difference between managing risk and losing capital. Below are answers to the most critical questions regarding margin definitions and safety thresholds.

No comments yet. Be the first to share your thoughts!