Set up your perp trading wallet

To trade onchain perpetual futures, you need a self-custody wallet that supports the specific blockchain where the perpetual DEX operates. Unlike centralized exchanges, onchain perp margin requires you to hold assets directly in your wallet and interact with smart contracts.

1. Choose a compatible wallet

Select a non-custodial wallet that supports the target network, such as MetaMask, Rabby, or WalletConnect. Ensure your wallet is configured for the correct chain (e.g., Ethereum, Arbitrum, or Solana) where the perp DEX is deployed. Most onchain perps operate on Layer 2 networks to reduce gas fees, so verify the network compatibility before funding.

onchain perp margin
1
Install and secure your wallet

Download the wallet extension or mobile app from the official source. Immediately back up your seed phrase in a secure, offline location. Never share your private keys or seed phrase with anyone, including support staff. This phrase is the only way to recover your funds if you lose access to your device.

onchain perp margin
2
Fund your wallet with native gas tokens

Transfer the native cryptocurrency of the network (e.g., ETH for Ethereum or ETH for Arbitrum) to your wallet address. You need these tokens to pay for transaction fees (gas) when interacting with the perp DEX smart contracts. Insufficient gas will cause your margin deposits and trades to fail.

onchain perp margin
3
Connect to the official perp DEX

Navigate to the perpetual DEX interface using a verified URL. Click the "Connect Wallet" button and approve the connection request in your wallet. Always double-check the domain name to avoid phishing sites that mimic legitimate platforms. Official sources like DefiLlama can help verify the correct contract addresses and platform links.

Once connected, your wallet is ready to deposit margin and open positions. The on-chain perps infrastructure allows you to trade without intermediaries, but the responsibility for security and fund management rests entirely with you.

Choose isolated or cross margin mode

Onchain perpetual exchanges typically offer two margin modes: isolated and cross. Your choice determines how much of your portfolio is at risk when a position moves against you. This decision is the primary lever for managing liquidation risk.

Isolated margin assigns a specific amount of collateral to a single position. If that position is liquidated, only the allocated funds are lost. The rest of your wallet remains untouched. This mode acts like a firebreak, containing losses to one trade.

Cross margin uses your entire available balance as collateral for all open positions. It allows for greater capital efficiency because unused funds can support margin requirements. However, a sharp market move can drain your entire balance, liquidating all positions simultaneously.

FeatureIsolated MarginCross Margin
Risk ExposureLimited to allocated fundsEntire wallet balance
Liquidation ImpactSingle position onlyAll open positions
Capital EfficiencyLower (funds locked per trade)Higher (shared liquidity)
Best ForHigh leverage, risk controlLow leverage, trend following

For most traders, isolated margin is the safer starting point. It prevents a single bad trade from wiping out your account. Cross margin requires strict discipline and lower leverage to avoid catastrophic losses across your entire portfolio.

Calculate your liquidation price

Before you lock up your capital, you need to know the exact price at which the protocol will close your position. This is your liquidation price. It acts as a hard stop, ensuring you don’t lose more than your initial margin deposit. Understanding this number is the first step in managing onchain perp margin risk.

The calculation depends on three main variables: your entry price, the leverage you choose, and the maintenance margin required by the protocol. Maintenance margin is the minimum collateral you must hold to keep the position open. If your account value drops below this threshold, the position is liquidated.

to Onchain Perp Margin
1
Set your entry price and leverage

Decide the price at which you want to enter the market and the leverage multiplier. Higher leverage lowers your liquidation price closer to your entry, increasing risk.

to Onchain Perp Margin
2
Identify the maintenance margin rate

Check the protocol’s documentation for the specific maintenance margin requirement for the asset you are trading. This rate varies by volatility and position size.

to Onchain Perp Margin
3
Apply the liquidation formula

For a long position, the formula is generally: Entry Price / (1 + (1 / Leverage) - Maintenance Margin Rate). For a short position, it is: Entry Price / (1 - (1 / Leverage) + Maintenance Margin Rate). Most trading interfaces calculate this automatically, but verifying it manually prevents surprises.

onchain perp margin

The relationship between leverage and liquidation price is direct. As you increase leverage, the buffer between your entry price and your liquidation price shrinks. A small market move can trigger a full loss of your margin. Always calculate this before opening the trade.

Open your position with risk controls

Opening a position on an onchain perp margin platform is the moment theory meets execution. The interface is straightforward, but the stakes are immediate. Unlike traditional markets, liquidations happen in real-time, often within seconds of a sharp price move. This section walks you through the actual trade sequence, emphasizing the risk controls that keep you in the game.

onchain perp margin
1
Connect and select the market

Start by connecting your wallet to the decentralized exchange (DEX) or perp platform. Select the trading pair you intend to trade. Ensure you are on the correct network and that you have sufficient native tokens for gas fees. This is a simple step, but verifying the contract address prevents you from interacting with a fake or outdated interface.

onchain perp margin
2
Set your position size and leverage

Before entering the trade amount, set your leverage. Higher leverage reduces the initial margin required but increases the risk of liquidation. A good rule of thumb is to start with low leverage (2x-5x) until you understand the platform's liquidation mechanics. Remember, initial margin is the collateral required to open the trade, while maintenance margin is the lower minimum required to keep it open.

3
Configure stop-loss and take-profit orders

This is the most critical step. Set a stop-loss order immediately. Determine the price at which you will exit if the trade goes against you. This should be based on your technical analysis, not your emotional tolerance for loss. Similarly, set a take-profit order to lock in gains. These orders act as automated risk controls, removing the need for constant screen monitoring and preventing emotional decision-making during volatile moves.

4
Review fees and slippage settings

Check the estimated fees, including trading fees and potential funding rates if applicable. Slippage settings determine how much price movement you tolerate before the transaction reverts. For large positions, set a tighter slippage tolerance to avoid getting filled at a worse price, but be aware this may result in failed transactions during high volatility. Review the "estimated impact" if the platform provides it.

5
Execute the trade

Once all parameters are set, review the summary. Confirm the direction (long or short), the size, the leverage, and the stop-loss levels. Click "Open Position" or "Place Order." After the transaction is confirmed on-chain, monitor your position's unrealized PnL and the distance to your liquidation price. Keep your stop-loss active and do not move it further away from the entry price in hopes of giving the trade more room.

Opening the position is only half the battle. The real skill lies in managing the position after execution. Many traders make the mistake of setting a stop-loss and then forgetting about it, only to panic and cancel it when the price dips. Stick to your plan. The onchain nature of these trades means your risk is transparent and automated, but only if you set it up correctly from the start.

Monitor funding rates and position health

Perpetual futures are distinct from traditional futures because they have no expiry date. Instead of settling at a fixed date, the contract price is kept in line with the spot price through periodic funding payments between long and short traders. This mechanism means your position is a living entity that requires active management, not a set-and-forget trade.

Track the funding rate

The funding rate is the heartbeat of onchain perp margin. It is a periodic payment exchanged between traders to anchor the perp price to the underlying asset. When the rate is positive, longs pay shorts. When negative, shorts pay longs. This flow incentivizes traders to take positions that help correct price discrepancies.

You should check the current funding rate before entering a trade and monitor it while holding a position. A rapidly rising funding rate often signals that a long position is becoming overcrowded. If the rate spikes, the cost of holding your position increases, and the risk of a sharp correction grows. Conversely, deeply negative rates can signal a potential short squeeze. Use the price widget below to track the underlying asset's price action in real-time, as funding rates are directly influenced by spot price movements.

Watch your margin ratio

Your margin ratio determines your proximity to liquidation. It is calculated by dividing your unrealized loss by your total margin balance. As your position moves against you, this ratio climbs. If it hits the maintenance margin threshold, the protocol will automatically liquidate your position to cover the losses.

Set a mental stop-loss or use a price alert when your margin ratio reaches 50-60% of the liquidation threshold. This buffer gives you time to add margin or close the position before the protocol takes over. Do not wait until the last second to act; network congestion can delay transactions, leaving your funds exposed. Regularly check your position health dashboard to ensure your collateral remains sufficient for the current market volatility.

Common onchain perp margin mistakes

Even experienced traders slip up when moving leverage trading to the blockchain. The decentralized nature of onchain perpetual futures means there is no customer support to reverse a bad transaction or cover a funding rate error. You are your own risk manager, and that requires vigilance.

Ignoring gas and slippage

Onchain trading costs are not fixed. If you enter a position during high network congestion, gas fees can eat into your margin before the trade even settles. Similarly, slippage can occur if you do not set adequate price limits, especially on less liquid pairs. Always check current gas prices and set realistic slippage tolerance before confirming any transaction.

Underestimating liquidation thresholds

Margin is the collateral required to open a trade, while maintenance margin is the minimum needed to keep it open. A common mistake is assuming your initial margin is enough to absorb volatility. In onchain markets, price feeds can lag or spike suddenly, triggering liquidation if your position is undercollateralized. Calculate your liquidation price based on the maintenance margin, not just your entry.

Overlooking funding rates

Perpetual contracts do not expire, so traders pay or receive funding rates to keep prices tethered to the spot market. These rates can be positive or negative and accrue every few hours. Holding a large position through a high funding rate period can drain your margin faster than price movement itself. Check the current funding rate before opening a long-term position.

onchain perp margin

Failing to use risk controls

The 1% rule suggests never risking more than 1% of your total account equity on a single trade. Onchain, this means setting stop-losses and position sizes that align with this limit. Without these controls, a single adverse move can wipe out your entire margin balance. Use built-in risk tools or external trackers to monitor your exposure in real time.

  • Set gas price limits to avoid excessive fees
  • Calculate liquidation price based on maintenance margin
  • Check funding rate before opening position
  • Risk no more than 1% of account equity per trade

Frequently asked questions about perp margin

Understanding how onchain perp margin works is essential for managing leverage safely. These questions address the most common points of confusion for traders entering the market.