Skip to main content
All CollectionsWeb3
How to use derivatives in DeFi
How to use derivatives in DeFi

Learn how to use perpetual futures contracts, a popular crypto derivative, in DeFi protocols.

Graham avatar
Written by Graham
Updated over 6 months ago

Summary

Trade derivatives such as perpetual futures by depositing collateral in DeFi protocols. By trading derivatives, you can express your belief that available crypto assets will go up or down. Derivatives allow you to do so with leverage.

This support article covers trading perpetual futures on dYdX, a leading DeFi derivatives DApp.

Start trading derivatives with Bitcoin.com’s dYdX affiliate link to receive a 5% fee discount.

Table of contents

The basics of derivative trading in DeFi

DeFi allows people to deposit collateral and trade financial contracts that “derive” their value from underlying cryptocurrencies or digital assets. Unlike buying an underlying cryptoasset, which expresses an implicit view that the value will rise, derivatives can be bought and sold to express up and down views respectively. Also, derviatives give access to leverage, which increases your purchasing ability over spot, but also your risk.

If you are new to derivatives, please read the following article: What are crypto derivatives?

Introduction to dYdX

dYdX, a leading DeFi DApp, is a Layer 2 Ethereum decentralized exchange that specializes in perpetual futures trading. dYdX’s Layer 2 offers a massive increase in transaction speed and decrease in transaction cost, while guaranteeing that transactions are settled on Ethereum’s base layer (Layer 1). Unlike most crypto platforms with perpetual futures, dYdX runs on smart contracts, allowing users to trade without central third parties. The Bitcoin.com Wallet supports DApps on Ethereum, including layer 2, through WalletConnect.

You can read more about WalletConnect here and here’s a guide for how to use WalletConnect.

Start trading derivatives with Bitcoin.com’s dYdX affiliate link to receive a 5% fee discount.

Key terms

Before entering any trade, it’s important to understand all of the terms below.

Perpetual derivatives trading consists of either going long or short an underlying asset.

Long — Going long means you believe an underlying asset will rise in value in the future. You go long by buying a perpetuals contract, for example buying a BTC perpetuals contract.

Short — Going short means you believe an underlying asset will fall in value in the future. You go long buy selling a perpetuals contract, for example selling an ETH perpetuals contract.

Leverage — Leverage allows you to purchase more contracts than you have deposited. For example, if you have deposited 100 USDC, 3x leverage would allow you to purchase a theoretical maximum of 300 USDC worth of contracts. Leverage can amplify your returns, but they also greatly increase the risk of being liquidated. As a new user, we strongly recommend not using leverage.

Every market has a maximum leverage. BTC-USD has a max leverage of 20x, while AVAX-USD is 10x.

Leverage increases as you increase your position size. For example, let’s look at different leverage amounts if you deposit 100 USDC into your account and long (buy) BTC-USD contracts:

Leverage

USDC worth of BTC

0.5x

50 USDC

1.0x

100 USDC

10x

1000 USDC

20x

2000 USDC

Margin — Margin can be thought of as the collateral necessary to open and maintain a trade position. Margin is separated into two subcategories: initial margin and maintenance margin.

Initial margin is how much margin is needed to open a position or add to a position.

Maintenance margin is the amount of margin needed to prevent liquidation. If you run out of margin, your position will be automatically liquidated, along with a liquidation fee.

Funding — Funding is a very important consideration in trading perpetual derivatives. It is a mechanism to help the derivative contract’s price trade as close to the underlying asset as possible. How this affects trader is simple:

Perpetual’s price below underlying: Shorts pay longs (more shorts than longs, bearish sentiment)

Perpetual’s price above underlying: Longs pay shorts. (more longs than shorts, bullish sentiment)

Information panels in dYdX

Markets

Derivatives trading platforms usually offer many different perpetual contracts. DYdX supports contracts like BTC-USD, ETH-USD, and AVAX-USD. You can access dYdX’s markets by following the instructions below:

  1. Press the hamburger menu button in the bottom left corner.

  2. Tap “Trade.” This will open up one of dYdX’s markets, for example Ethereum (ETH-USD).

  3. In the top left corner, press the market name. This will open up a list of all available markets.

Buying Power — The total amount you can theoretically buy. This value is equity x max leverage, so buying power changes depending on the market.

Equity — The total value of the deposits in your account

Margin Use — The percentage of total margin (collateral) used.

Account leverage — The total leverage of your account based on all of your open positions.

  1. Press the hamburger menu button in the bottom left corner.

  2. Tap “Trade.” This will open up one of dYdX’s markets, for example Ethereum (ETH-USD). It doesn’t matter which market you’re looking at.

  3. Tap “Account.”

Funding

It’s easy to see which way the funding rate is under the “Funding button” or in the Statistics section. Negative (red) means shorts pay longs, positive (green) means longs pay shorts

Funding payments are exchanged continuously every second. The funding rate is updated every hour.

Basic trading strategies for perpetual derivatives

If you believe the underlying asset will appreciate in the future, the safest, easiest trade to do is to buy and hold the asset. For most people, derivatives are advantageous over simply owning the underlying asset for two main reasons: gain leverage, and express an opinion that the underlying asset will fall.

Leverage

Leverage exposes you to higher liquidations risks. For new users it is encouraged to use little or no leverage.

Let’s go over some examples of entering a trade in the BTC-USD market. You have 100 USD in equity. The BTC-USD market allows up to 20x leverage, or a maximum of 2000 USD position. The BTC-USD perpetual contract currently trades at 20,000 USD.

Long

Going long means you believe the price of Bitcoin will appreciate in the future. To open a long position, buy the perpetual contract.

Let’s look at some different scenarios with various leverage:

Amount bought in USD

Leverage

Liquidation price in USD

1000

10x

18,600

500

5x

16,600

200

2x

10,600

100

1x

600

How about returns? Imagine Bitcoin appreciates in price 10% to 22,000 USD.

Amount bought in USD

Profit

1000

100

500

50

200

20

100

10

Short

Going short means you believe the price of Bitcoin will depreciate in the future. To open a short position, sell the perpetual contract.

Let’s look at some different scenarios with various leverage:

Amount bought in USD

Leverage

Liquidation price in USD

1000

10x

21,400

500

5x

23,400

200

2x

10,600

100

1x

39,400

How about returns? Imagine Bitcoin depreciates in price 10% to 18,000 USD. The returns will be the same as those if longing and the price appreciated 10%.

Amount bought in USD

Profit

1000

100

500

50

200

20

100

10

You can play with this DYDX risk calculator to get a better understanding of how to size your trades appropriately.

Funding

The next most important consideration is funding. If you are in a consensus trade, i.e., a majority of market sentiment agrees with you, you’ll likely be paying to keep your position open. You can think of funding as a tax on the majority of position holders to the minority of positions holders.

How to deposit on dYdX

Before trading, you must move cryptoassets from your Bitcoin.com Wallet into your dYdX account wallet. This requires moving funds from Layer 1 to Layer 2.

Here’s how to deposit cryptoassets to dYdX:

  1. Press the “Trade now” button. Then press the “Connect wallet” button. Finally press the “Get started” button.

  2. Under the “Connect your wallet” menu, scroll down and tap on “WalletConnect.” Then tap the “Connect,” button at the bottom. Finally, tap the Bitcoin.com Wallet button.

  3. In the Bitcoin.com Wallet, approve the connection request.

  4. Return to dYdX. Scroll down and tap the “I agree button” button to agree to dYdX’s Terms of Use and Privacy Policy, and certify that you are not a resident of the United States.

  5. You will now need to link your wallet. Above the blue button at the bottom of the screen you can choose to let dYdX remember you by tapping a toggle button. After that, press the “Send request” button at the bottom of the screen.

  6. You will be taken to the Bitcoin.com Wallet (or select the Bitcoin.com Wallet). In the Bitcoin.com Wallet, approve the transaction. You will receive two signature requests one after another. Make sure to approve both.

  7. Return to dYdX. Before you can deposit USDC or an available ERC-20 token, you must enable USDC. You only need to do this once. Press the “Enable USDC” button. Choose the Bitcoin.com Wallet, then approve the transaction.

  8. Return to the dYdX app. Near the top of the screen choose which asset to deposit. USDC is the best since the other available assets are converted to USDC before being deposited.

  9. When you’ve decided on an asset to deposit, choose how much to supply by typing a number, or clicking the “MAX” button to supply all of the available asset.

  10. Press the “Confirm deposit” button, and confirm the transaction in the Bitcoin.com Wallet.

  11. Return to the dYdX app. You will see a popup that says, “Deposit in progress.” The progress bar will increase as the necessary confirmations come in.

  12. Once all confirmations come in, the message will change to “Deposit success!” Congratulations, you are now ready to trade.

How to open a position on dYdX

We are going to cover the two most common ways to open orders: market orders and limit orders. For more advanced orders please look at this dYdX support article.

Market Orders: These orders execute at the current offered prices in the order book.

Here’s how to complete a market order:

  1. Choose a market.

  2. Tap the “Buy” or “Sell” button at the bottom of the screen.

  3. At the bottom of the screen make sure it says, “Market Order.” If it doesn’t, tap the “Modify” button in the bottom right corner. Select “Market Order.”

  4. Enter an Amount. The amount defaults to the value in crypto, for example, in the BTC-USD market, “1” means one btc. You can also denominate the amount in USD by pressing the “USD” button to the right of the “Amount” field. Your current leverage amount is shown in the next field below.

You can also choose your position amount by modifying the leverage directly. Type a preferred leverage amount in the “Leverage” field, or press one of the three preset leverage buttons. 5. Check your liquidation price by tapping the “Position” button. Note, that this price will change if enter new positions or add to this one. 6. If you are comfortable with the liquidation price, tap the “Place Market order” button.

Limit Orders: These orders will only execute at a specified price (or better). For example, a limit order buy will only execute if the price is at the specified price or lower.

Here’s how to complete a limit order:

  1. Choose a market, for example BTC-USD.

  2. Tap the “Buy” or “Sell” button at the bottom of the screen.

  3. At the bottom of the screen make sure it says, “Limit Order.” If it doesn’t, tap the “Modify” button in the bottom right corner. Select “Limit Order.”

  4. Enter an Amount. The amount defaults to the value in crypto, for example, in the BTC-USD market, “1” means one btc. You can also denominate the amount in USD by pressing the “USD” button to the right of the “Amount” field.

  5. Enter a Limit Price.

  6. Check your liquidation price by tapping the “Position” button. Note, that this price will change if enter new positions or add to this one.

  7. Tap the “Place Limit order” button.

How to close a position on dYdX

  1. Press the hamburger menu button in the bottom left corner.

  2. Tap “Portfolio,” then tap “Positions.”

  3. A list of your open positions will appear. Tap the position you wish to close.

  4. Scroll down and press the “Close position” button.

  5. Choose how much of this position you wish to close. You can type the amount, or choose one of five presets (10%, 25%, 50%, 75%, Max).

  6. Click the “Close position” button. A notification should appear indicating the trade to close your position has been filled.

Did this answer your question?