Perpetual Protocol 🥨

Posted on Jun 29, 2022Read on Mirror.xyz

How To Trade with Isolated Margin Using Different Wallets

What is Isolated Margin?

By default, your account on Perp v2 is cross-margin, which means that all of the leveraged positions are covered by the same pool of funds. This method shares margin between open positions so that when needed, a certain position will draw more margin from the total account balance to avoid liquidation.

Cross margin can be convenient since you do not have to add or remove margin for each position. However, one position can affect your other positions since they will all draw on collateral from the same pools of assets. If you have several highly leveraged positions, one position being liquidated can cause others to be at risk and face possible liquidation as well!

Example: you are long ETH and long AVAX. However, the ETH position is in profit while the AVAX position is at a loss. As the price of AVAX moves further away from the entry price, the portion of your balance allocated to covering the AVAX position increases, effectively raising the leverage on your ETH position, to prevent liquidation.

So if one trade goes well but the other goes really bad, then a trader may have to close out the winning trade to realize some profits and make sure the losing position doesn’t get liquidated. You wouldn’t have to close a profitable trade if it was the only active position or if there was a way to isolate your buying power for each position. But because of the cross-margin method, a really bad position can impact all other open positions and you risk losing your entire balance.

But what if you could open both positions without one having to subsidize the other? This is exactly what isolated margin allows you to achieve!

Benefits of Isolated Margin

Instead of allocating capital into a single pool to take positions in different markets, you can divide your capital into parts and dedicate each to different positions. That way, you limit the losses to the initial balance posted, directly control how much capital you’re willing to risk and a profitable trade will not be affected by a losing trade. Another benefit is that the math is much simpler when isolating margin in this way.

Another benefit is that you may have different short-term and long-term views on a particular asset. For example, you may be bearish on the price of ETH on low timeframes (e.g., 15 minutes or 1 hour), but bullish over much longer timeframes (e.g., 1-day or 1-week). In this case, you may want to short ETH for a few hours but also take a long position in ETH that you intend to hold for a few weeks.

However, with cross margin, you cannot do this since once you open a short, when you try to execute the long position it will reduce the short position. Since the entire collateral amount is shared across different positions in an account, any opposite positions taken in a particular market will cancel each other out under the cross-margining method.

Therefore, isolated margin is also useful if you want to express differing views on the same asset or to hedge your positions. For example, you could use this technique to short a fraction of the position size for an existing long position, so that the losses are reduced in case the market moves against you.

How to Isolate Margin on Perp v2

To start trading with isolated margin on Perp v2, you’ll need to fund two (or more) different Ethereum addresses.

First, create two addresses in supported wallets like Rabby or Wallet3 (which is smoother than MetaMask for switching between addresses). Remember, if you want to use Rabby, you’ll need to deactivate the MetaMask extension from ‘Manage Extensions’.

Here’s how to create additional addresses with Rabby:

Once you have entered the seed phrases in the correct order, your new account will be created and you’ll then be able to switch between different addresses using the dropdown menu at the top of the extension.

Let’s say you have 1,000 USDC in capital: send 500 USDC to each Ethereum account (you’ll also need a small amount of ETH to cover the gas fees).

Then go to deposit on Perp v2 with the first address and use the collateral towards one position only. The most you can lose is the amount you deposited. You can then open another position using a different account to ensure the PnL of each position is isolated from one another.

Now, go to your browser wallet and change the address. If the app doesn't automatically connect to the new account, then go to the top left-hand side, click on the dropdown menu and choose “Disconnect”.

Then click on the “Connect button” and choose your wallet.

Tip: you can actually switch between different accounts faster with Wallet3 and there’s no need to disconnect and connect again, as shown below:

Once connected with the second account, you can then deposit USDC or other collateral types. The margin will be isolated from the other account, so the outcome of trades using the first address will not have any impact on this account, and vice versa. That means you no longer need to cut a winning position because of another one that’s at a loss and can take opposing positions on the same asset.

Note that you’ll have to switch between the different accounts from your wallet to manage either of the active positions. Another option is to use an account on your laptop with a browser wallet such as Rabby and then use a separate account from your mobile device using Coinbase Wallet.

No matter what happens to the position in the first account, any other positions in the other account will not be affected. The most you can lose on a position is $500, whereas with cross margin, one position can wipe out all of your capital and ruin any profitable trades that are still active.

While there are benefits to isolated margin as discussed in the preceding section, this margin method requires the trader to add collateral if the trade doesn’t go to plan. Additional funds from your available balance will be deployed to keep the margin ratio above 6.25% and to avoid liquidation.

Links

Translations of this article are available in Hindi (हिंदी) and Swahili, thanks to the help of our Perpvangelists!