Trade derivatives such as perpetual futures by depositing collateral in DeFi protocols. By trading derivatives, you can express your belief that the available cryptocurrencies and digital assets will go up or down. Derivatives allow you to do so with leverage. Trading derivatives on decentralized protocols protects you from the opaque, risky, and in some cases outright fraudulent behavior that some centralized exchanges have taken.
This article covers trading perpetual futures in DeFi with examples and links to step-by-step instructions for dYdX, a leading DeFi derivatives decentralized application (DApp), using the Bitcoin.com Wallet app.
Use the multichain Bitcoin.com Wallet app to safely and easily trade derivatives in DeFi. Through the Bitcoin.com Wallet app, you can also buy, sell, trade, earn, use, and learn about crypto. Connect to thousands of decentralized applications (dApps) through WalletConnect, such as leading derivatives trading platform dYdX. Start trading derivatives with Bitcoin.com’s dYdX affiliate link to receive a 5% fee discount.
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, derivatives give access to leverage, which increases your purchasing ability over spot, but also your risk.
What you need in order to trade derivatives in DeFi
You will need three things to trade derivatives on a derivatives platform:
- Digital wallet
- Cryptocurrency
- Derivatives platform site
Digital wallet: These wallets, also called crypto wallets or web3 wallets, hold cryptocurrencies and other digital assets. The best wallets are self-custodial like the Bitcoin.com Wallet app. Self-custody means you have full control over the contents of the wallet, whereas in custodial wallets a third party has ultimate control. Learn more about self-custody and its importance here.
Cryptocurrency: The wallet will need to contain cryptocurrency to pay for transaction fees as well as to swap. Transactions fees are used to pay for actions that make changes to a blockchain. They will be paid in the blockchain’s native currency. For example, ETH is used to pay for transaction fees on the Ethereum blockchain. In order to trade derivatives you will need certain cryptoassets the site allows to buy and sell derivatives contracts. Check what cryptoassets the derivatives platform accepts, and make sure you have some in your wallet. Use the following articles to learn how to buy or swap cryptoassets.
Derivatives platform site: It’s important to use a reputable derivatives platform that has a good number of liquid markets. The next section introduces just such a platform.
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 app supports dApps on Ethereum, including layer 2, through WalletConnect.
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 normally could. 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 using less than 1x leverage.
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, and you will pay 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 trade is simple:
- When the perpetual’s price is below the underlying: Shorts pay longs (more shorts than longs, bearish sentiment).
- When the perpetual’s price is above the underlying: Longs pay shorts (more longs than shorts, bullish sentiment).
Basic trading strategies for perpetual derivatives
The fundamentals of these strategies apply to all perpetual derivatives trading, but for the sake of specificity we are going to talk about the strategies as applied to dYdX.
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: 1) you can use leverage, and 2) you can 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 1x leverage or less.
Every market has a maximum leverage. For example, on dYdX, BTC-USD has a max leverage of 20x, while AVAX-USD is 10x.
Leverage increases as you increase your position size. Let’s look at different leverage amounts if you deposit 100 USDC into your account and long (buy) BTC-USD contracts:
LeverageUSDC Worth of BTC0.5×50 USDC1x100 USDC10x1000 USDC20x2000 USDCLeverage0.5xUSDC Worth of BTC50 USDCLeverage1xUSDC Worth of BTC100 USDCLeverage10xUSDC Worth of BTC1000 USDCLeverage20xUSDC Worth of BTC2000 USDC
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.
Going long – Going long means you believe the price of the asset will appreciate in the future. To open a long position, buy the perpetual contract.
Let’s look at some different scenarios trading Bitcoin with various leverage. Imagine you have 100 USD of collateral and buy Bitcoin at 20,000 USD:
LeverageUSD Amount of BTC PurchasedLiquidation Price (USD)1×100 USDC6002x200 USDC10,6005×500 USDC16,60010×1000 USDC18,600Leverage1xUSD Amount of BTC Purchased100 USDCLiquidation Price (USD)600Leverage2xUSD Amount of BTC Purchased200 USDCLiquidation Price (USD)10,600Leverage5xUSD Amount of BTC Purchased500 USDCLiquidation Price (USD)16,600Leverage10xUSD Amount of BTC Purchased1000 USDCLiquidation Price (USD)18,600
How about returns? Imagine Bitcoin appreciates in price 10% to 22,000 USD.
Amount Bought (USD)Profit (USD)1001020020500501000100Amount Bought (USD)100Profit (USD)10Amount Bought (USD)200Profit (USD)20Amount Bought (USD)500Profit (USD)50Amount Bought (USD)1000Profit (USD)100
Going short – Going short means you believe the price of the asset will depreciate in the future. To open a short position, sell the perpetual contract.
Let’s look at some different scenarios trading Bitcoin with various leverage. Imagine you have 100 USD of collateral and buy Bitcoin at 20,000 USD:
LeverageUSD Amount of BTC PurchasedLiquidation Price (USD)1×100 USDC39,4002×200 USDC29,4005×500 USDC23,40010×1000 USDC21,400Leverage1xUSD Amount of BTC Purchased100 USDCLiquidation Price (USD)39,400Leverage2xUSD Amount of BTC Purchased200 USDCLiquidation Price (USD)29,400Leverage5xUSD Amount of BTC Purchased500 USDCLiquidation Price (USD)23,400Leverage10xUSD Amount of BTC Purchased1000 USDCLiquidation Price (USD)21,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 (USD)Profit (USD)1001020020500501000100Amount Bought (USD)100Profit (USD)10Amount Bought (USD)200Profit (USD)20Amount Bought (USD)500Profit (USD)50Amount Bought (USD)1000Profit (USD)100
You can play with this DYDX risk calculator to get a better understanding of how to size your trades appropriately.
How to deposit assets
Before trading, you might need to move cryptoassets from your crypto wallet into the derivatives DApp, such as with dYdX. Some derivatives dApps do this to help reduce the cost per transaction and/or improve trade execution speed. Other derivatives dApps, like GMX, do not require deposits.
If you need to deposit assets, start by connecting your crypto wallet to the DApp. The DApp will most likely prompt you to make a deposit. If it doesn’t, look for a prominent “deposit” or “supply” button. Choose a cryptoasset the DApp accepts, and deposit it. Once the transaction clears, you’ll be ready to start trading.
How to open a position
There are two basic ways to open a position:
- Market orders
- Limit orders
Market orders execute at the current offered prices in the order book, whereas limit orders will only execute at a specified price (or better). For example, a limit order buy on BTC-USD of 21,500 will only buy the contract at or below 21,500.
To open a position with a market order, choose a market, such as BTC-USD, enter a position size amount, and click “Buy” to long it or “Sell” to short it.
To open a position with a limit order, choose a market, such as ETH-USD, enter a position size amount and the price at which to execute your order (limit price), and “Buy” to long it or “Sell” to short it.
How to close a position
Closing your position will turn your unrealized gains into realized gains. If your unrealized gains are negative, that amount will be deducted from your account. If it’s positive, that amount will be added to your account.
To close out a position, go to the opened positions page of the DApp. For each position there will be a “close” option. Choose the “close” option and if given the choice, fully close it.






