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.

FeatureCross MarginIsolated Margin
Collateral UsageShared across all open positionsSegmented per position
Liquidation RiskLower (uses full balance)Higher (uses fixed amount)
Capital EfficiencyHighLower
Best ForMulti-position hedgingCapped-risk directional bets
FeatureCross MarginIsolated Margin
Collateral UsageShared across all open positionsSegmented per position
Liquidation RiskLower (uses full balance)Higher (uses fixed amount)
Capital EfficiencyHighLower
Best ForMulti-position hedgingCapped-risk directional bets

For a visual breakdown of how these modes interact with funding dynamics and position sizing, refer to the diagram below.

onchain perp margin

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.

onchain perp margin
1
Locate the margin level indicator

Open your trading interface and identify the margin level metric. This value is typically displayed prominently near your position details. It updates dynamically as the underlying asset price fluctuates. Do not confuse this with your isolated margin balance; the margin level reflects the health of the entire position relative to its collateral.

2
Track the percentage relative to 100%

Watch the percentage value closely. If the margin level is 200% or higher, you have significant room for price movement against your position. As the market moves against you, this percentage will decline. A drop to 150% requires attention, but a drop to 110% demands immediate action. Once it crosses 100%, liquidation is inevitable.

3
Set alerts for critical thresholds

Configure your interface or external tools to alert you when the margin level hits specific danger zones, such as 120% or 110%. Waiting until the number is close to 100% is risky because onchain transactions can lag, and slippage may worsen your outcome. Proactive alerts give you the time to add collateral or reduce position size before the protocol forces a sale.

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.

onchain perp margin
1
Check your current margin level

Open your trading dashboard and locate the margin level indicator for your active position. This percentage represents your equity relative to your used margin. If the number is below 100%, liquidation is imminent. If it is between 100% and 150%, you have a narrow window to act before the protocol automatically closes your trade.

2
Prepare additional collateral assets

Identify which assets the platform accepts as margin. Most exchanges allow stablecoins (like USDC or USDT) or the base asset of the pair (like ETH for ETH/USD). Ensure you have sufficient balance in your connected wallet to cover both the desired collateral amount and the network gas fees. Transferring funds from an external wallet may take time, so initiate the transfer early.

3
Deposit funds to your margin wallet

Navigate to the position management or wallet section of the exchange interface. Select the option to "Add Margin" or "Deposit Collateral." Enter the amount you wish to contribute. For cross-margin accounts, this increases your total pool; for isolated margin, it increases the specific bucket for that trade. Confirm the transaction in your wallet and wait for block confirmation.

4
Verify the updated margin level

Once the transaction is confirmed, refresh your position details. You should see a higher margin level and increased available equity. This confirms that your position is now safer from liquidation. Monitor the price action closely, as adding margin does not change your entry price or leverage ratio—it only extends the time before your position becomes undercollateralized.

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.

onchain perp margin
1
Confirm your margin level is above 100%

A margin level below 100% means your equity is lower than your used margin, signaling imminent liquidation. Aim for a buffer above 300% to absorb normal volatility without triggering a close.

2
Verify cross vs. isolated margin settings

Cross margin shares your entire wallet balance across positions, while isolated margin limits risk to a specific amount. MetaMask explains these mechanics clearly; choose the mode that matches your risk tolerance before opening the trade.

3
Check the liquidation price against your stop-loss

Ensure your stop-loss order is placed before the liquidation price. If the market moves against you, the stop-loss executes first, preventing the protocol from seizing your collateral at a worse rate.

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.