Utilizing Margin and Leverage on dYdX

Zhuoxun Yin
Jul 10, 2019 · 6 min read

We explore the different ways a trader could utilize margin functionality on dYdX. This is not intended or meant to be interpreted as trading advice. Products in open finance should still be considered experimental, and we encourage you to read our contracts, documentation or ask us questions before using the product.

This is a slightly deeper exploration of dYdX — for more introductory materials please take a look at our help page, or the first part in our series on Getting Started.


Introduction

One of the big drivers that led us to build the new dYdX was the lack of professional tools offered by Open Finance. We kept hearing from users that they wanted tools that resembled what they were already using. This was at the core of how we designed our new trading application and why we decided to center our product around trading straight from an Account — a feature called cross margin.

Cross margin (trading using your account balances as collateral) is different to isolated margin (opening a position independently collateralized from your account). While isolated margin is certainly simpler to get started, we believe cross margin is the most powerful way to get and maintain leverage in Open Finance today.

Before jumping into the comparison, it’s worth touching on the concepts of margin and leverage. We then explain how to smartly use leverage via two features supported on dYdX — Isolated Margin and particularly Cross Margin.

Margin and Leverage

Margin and leverage are extremely important concepts to any trader actively participating in the market. The underlying principles and how they’re applied are the same for Open Finance as they are in traditional markets.

Margin is the collateral amount being deposited by the trader. Borrowed funds are usually collateralized by other assets and must be repaid with interest.

Leverage is created by using margin — it is the increased buying power available to place a higher value trade than a trader otherwise could. Leverage increases the potential reward for a trader, but also increases the risk.

How to Think About Leverage

Leverage as a number in and of itself is often a misnomer, particularly when higher leverage is often touted in exclusively positive or glowing light. What should matter more is how much capital a trader is risking, and the proportion of that capital to their entire portfolio. Conversely lower leverage doesn’t always mean lower risk either.

For example — consider two scenarios for someone with a $1000 portfolio:

  1. A 5x long with $100 margin deposit = total trade size of $500. Here, 10% of the portfolio is at risk.

Leverage is really just a factor of how much margin a trader is risking, which in turn determines a trader’s distance to liquidation.

The higher the leverage selected, the smaller the margin deposit is required (less capital tied up) but the closer the trader is to liquidation. The lower the leverage, the higher the margin deposit, but the greater the distance to liquidation. The decision of whether to use leverage and how much to use really depends on many factors — how you define risk, time horizon, amount of capital to deploy etc.

Utilizing Leverage on dYdX

On dYdX we focused on arming traders with the best tools for using leverage. There are two types of leverage on dYdX that can help you utilize leverage intelligently — isolated margin and cross margin. While isolated margin is simple and typically better understood, we explain below why utilizing cross margin could be the most efficient way to utilize leverage in Open Finance.

Isolated Margin

Isolated margin trading, as its name suggests, is when you ‘isolate’ a certain amount of funds as part of a trade, at a specific leverage. Leverage determines how much margin deposit is required, and if liquidation occurs, losses are capped by the size of the isolated position.

Benefits of isolated margin on dYdX:

  • Easily view capital deployed and PNL of trade

Cross Margin

Cross margin utilizes all assets in your dYdX account balance as collateral. While on the surface this seems riskier, it can be very useful for traders for a number of reasons.

With cross margin, the fundamental thing to understand is that you are trading from your Account Balance — this is the same balance that goes up and down based on any lends or borrows that you perform. Account balances can be positive or negative.

Cross Margin trades are subject to the same collateralization rules as if you are borrowing and lending on dYdX via the Account Balances page. All positive balances earn interest and negative balances owe interest. With funds in your account, there are several actions you can take via cross margin trading.

(1) Quickly spot trade an asset for another

Example: You have deposited (lent) ETH but would rather earn the higher rate on DAI. Or perhaps you want to lock in ETH profits from earlier trades. You can cross trade and turn some or all of your ETH balance into DAI (which immediately starts earning interest).

Cross selling .1 ETH will result in my ETH balance falling by .1 ETH and DAI balance increasing by ~30 DAI.

(2) Margin Long ETH

Example: Assume your account has 1 ETH, 100 USDC and 0 DAI and 1 ETH = 200 DAI. By executing a ‘buy’ cross trade, you can take leverage and increase your ETH position. The cross trade in this case borrows DAI and sells it for ETH. If you went long 1 ETH, your balances at the end would read 2 ETH, 100 USDC, -200 DAI. The negative balance is an outstanding borrow, collateralized by ETH and USDC. This can also be achieved via the ETH-USDC market.

Cross buying .5 ETH by borrowing DAI. DAI balance goes negative (paying interest), ETH balance goes further positive (still earning interest). My account will start at 1.3x collateralized post execution

This is basically a more capital efficient CDP if the DAI borrow rate is equal to or below the stability fee because your positive ETH balance is earning interest at all times and dYdX has lower capital requirements than MakerDAO — you can start as low as 1.25x collateralized, and must keep it above 1.15x at all times.

(3) Margin Short ETH

Example: Assume your account has 0 ETH and 100 DAI. By executing a ‘sell’ cross trade, you can go short ETH. Say the price of 1 ETH is 200 DAI. Selling .1 ETH will give you 20 DAI. After this trade, your account balance will be -.1 ETH and 120 DAI and you are now short ETH. Again, this can also be achieved via the ETH-USDC market.

Cross selling .5 ETH by borrowing ETH. ETH balance goes negative (paying interest), DAI balance goes positive (earning interest). My account will start at 1.39x collateralized post execution

(4) Carry Trade DAI-USDC

Explored in this previous article.

To Summarize

Cross trading on dYdX is powerful because:

  • Any asset lent can act as collateral. If you’re already lending, you can start cross trading immediately. dYdX supports ETH, DAI and USDC, with plans to add more soon. With Cross trading, you don’t need to deposit a specific asset as collateral (as you do in Isolated). Any asset in your account will act as collateral.

There are of course risks to consider — the value of your account can fall all the way to the point of 1.15x collateral in the case of extreme price movements. Additionally, the closer your trades are in size to your account balance size means the higher risk of liquidation.

Give it a try — we’d love to hear what you think!


At dYdX we’re excited to build products that are tailor made for the main use case of crypto lending: margin trading. If you’re excited about building next-generation open financial products and would like to join the team at dYdX, check out our open roles!

dydxprotocol

The most powerful open trading platform for crypto assets

Thanks to Brendan Chou and Antonio Juliano

Zhuoxun Yin

Written by

Head of Operations at dYdX. Previously at Nimble and Bain & Company

dydxprotocol

The most powerful open trading platform for crypto assets

More From Medium

More from dydxprotocol

More on Ethereum from dydxprotocol

More on Ethereum from dydxprotocol

The dYdX Business Model

343

More on Margin Trading from dydxprotocol

More on Margin Trading from dydxprotocol

Programatic Trading on dYdX

143

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade