Define your margin mode first

Before executing any cross-chain trade, select a margin mode. This choice determines collateral allocation and liquidation risk.

Cross-margin pools all available assets in the account as collateral. It increases capital efficiency by using idle assets to support leverage but raises liquidation risk; a loss in one position can drain the entire account.

Isolated margin assigns specific collateral to each position. It limits risk to the funds allocated to that trade. If liquidated, only the isolated margin is lost. This mode is safer for volatile trades but requires more capital to maintain multiple positions.

FeatureCross-MarginIsolated Margin
Collateral PoolAll account assetsPosition-specific funds
Liquidation RiskHigher (entire account)Lower (limited to position)
Capital EfficiencyHigh (idle assets count)Lower (capital locked per trade)
Best ForLarge portfolios, stable positionsHigh volatility, risk management

For cross-chain trading, isolated margin often provides better control, preventing a bad trade on one chain from draining assets on another. Use cross-margin only if you have a diversified portfolio and understand total exposure.

Connect a unified margin wallet

Onchain perpetual futures require a unified margin account to function across chains. This structure aggregates collateral from multiple networks into a single pool, allowing assets from one chain to back positions on another.

onchain perp margin
1
Install and configure your wallet

Download a reputable non-custodial wallet like Rabby or MetaMask. Ensure you have the latest version to support protocol interfaces. Back up your seed phrase offline.

onchain perp margin
2
Connect to the margin protocol

Navigate to the official website of your chosen onchain perp platform. Click "Connect Wallet" and select your wallet. Review the connection request to ensure you are interacting with the correct contract domain.

to Onchain Perp Margin
3
Switch to the unified margin account

Locate the account switcher in the protocol interface. Select "Unified Margin" or "Cross-Chain" to load your aggregated collateral balance from all supported chains.

Verify that your collateral is visible in the margin dashboard. If assets are missing, ensure your wallet is on the correct network and that you have explicitly deposited funds into the margin account.

Deposit collateral efficiently

Fund your margin pool by selecting assets that impact borrowing costs and leverage limits. Onchain platforms support various assets, each with different risk profiles.

Step 1: Choose Your Collateral Asset

Most protocols support stablecoins (USDC, USDT) and volatile assets (ETH, BTC). Stablecoins minimize liquidation risk from market swings. Volatile assets can offer higher leverage efficiency but introduce significant liquidation risk if the asset price drops.

onchain perp margin
1
Select stablecoins for lower risk

Stablecoins like USDC are the standard for onchain perp traders. Their pegged value provides predictable margin requirements and lower borrowing fees, reducing the complexity of tracking collateral fluctuations.

onchain perp margin
2
Consider volatile assets for higher efficiency

ETH or BTC can be more capital-efficient if you expect appreciation. However, a sharp price drop in the collateral asset can trigger liquidation even if your trading position is profitable. Use these only if you understand liquidation mechanics.

Step 2: Execute the Deposit

Connect your wallet to the platform. Navigate to the "Margin" or "Collateral" tab, select your asset, approve the token spend if required, and confirm the transaction. Ensure your balance meets the platform's minimum deposit threshold.

Step 3: Verify Margin Status

Check your margin dashboard for total margin, available balance, and borrowing fees. Stablecoins typically have lower fees than volatile assets, which may carry higher risk premiums.

onchain perp margin
Check margin ratio and fees

Your margin ratio determines leverage capacity. Review the platform's fee schedule to understand borrowing costs, which may be charged hourly, daily, or weekly.

Step 4: Manage Your Position

Monitor your margin level relative to the liquidation threshold. Deposit additional funds if your margin drops too low. If your collateral asset is volatile, consider rebalancing into stablecoins if the asset price drops significantly.

onchain perp margin
Monitor and rebalance as needed

Set up alerts for liquidation prices. Proactive rebalancing helps maintain your trading position and avoids forced liquidations.

Open positions with leverage

Opening a perpetual futures position requires covering the initial margin requirement. This differs from the maintenance margin, the lower threshold you must maintain to keep the position open.

onchain perp margin
1
Calculate initial margin requirements

Determine the initial margin needed, typically a percentage of the total position size based on your leverage ratio. For example, 10x leverage requires 10% of the position value as initial margin.

to Onchain Perp Margin
2
Set leverage and select the pair

Choose your leverage level and the specific perpetual contract, such as BTC-PERP. Confirm the trading pair’s liquidity and current funding rate, as these impact your entry price and ongoing costs.

3
Monitor maintenance margin and funding rates

Monitor the maintenance margin level. If account equity falls below this threshold, you face liquidation. Keep an eye on funding rates; periodic payments between long and short traders can erode your margin if the rate is unfavorable.

Leverage trading involves borrowing fees that vary based on market demand. Cross-margin allows you to share your entire wallet balance as collateral, which can help prevent liquidation compared to isolated margin, but exposes your entire balance to risk.

Monitor liquidation thresholds

Tracking your health factor or margin ratio in real-time is essential to avoid liquidation. On-chain liquidations execute automatically when collateral falls below a specific level.

Initial margin is the collateral required to open a trade, while maintenance margin is the ongoing minimum required to keep the position open [src-serp-1]. As your position moves against you, your health factor drops. When it reaches the maintenance margin threshold, the protocol liquidates the position to protect lenders. This happens instantly, often within a single block.

If your health factor approaches 1 (or 100%, depending on the platform), you are at risk. Add collateral immediately or reduce your position size to lower leverage. Relying on price alerts is insufficient; you need real-time visibility into your margin status.

Close positions and withdraw

Closing your onchain perp margin position involves unwinding the position, settling the PnL, and withdrawing funds. Each step incurs blockchain gas fees.

onchain perp margin
1
Unwind the position

Open your trading interface and select "Close" or "Market Close". This reverses your trade, calculating your unrealized PnL based on the current mark price.

onchain perp margin
2
Settle and realize PnL

The protocol settles the profit or loss. If profitable, your collateral balance increases. If you took a loss, it decreases. Check your wallet balance to confirm the net amount.

onchain perp margin
3
Withdraw to secure storage

Initiate a withdrawal to your personal wallet (like MetaMask or Ledger). This is crucial because funds remaining in the trading interface are at risk if the protocol is hacked. Always withdraw to cold storage after significant profits.

Gas and Final Checks

Consider gas fees on the specific blockchain. Layer 2 solutions like Arbitrum or Optimism offer cheaper withdrawals than Ethereum Mainnet. If withdrawing a large amount, split the transaction into smaller batches to avoid slippage or network congestion.

By following this sequence, you ensure that your profits are secure and your risk exposure is zeroed out. Never leave large sums idle in a trading interface longer than necessary.

Onchain perp margin: what to check next

Before trading, understand how cross-margin and fees function on-chain. Unlike centralized exchanges, onchain perpetuals rely on smart contracts to manage risk.

How does cross-margin work on-chain?

Cross-margin links all positions in a single account to one collateral pool. Binance notes that unified margin allows a single collateral pool to cover multiple derivatives, reducing the need to lock separate funds for each trade [src-serp-4]. This efficiency lowers the total capital required to maintain active positions across different chains.

What happens if I run out of margin?

When your collateral value drops below the maintenance threshold, the protocol triggers liquidation. Unlike traditional brokers, onchain liquidations are automated and instantaneous. You lose your collateral to keep the position solvent, and you may incur additional liquidation fees. There is no manual margin call; the smart contract executes the sale of your assets to repay the borrowed funds [src-serp-2].

How are borrowing fees calculated?

Borrowing fees vary based on market demand and the specific asset being leveraged. These fees are typically charged periodically or upon position closure. High volatility or extreme long/short imbalances can spike these costs. Always check the current funding rate before entering a leveraged trade, as fees can erode profits on long-term holds [src-serp-2].