Key Takeaways
- dYdX is a decentralized exchange built on Ethereum. It’s powered by the Layer 2 solution StarkWare.
- dYdX allows perpetual trading on a wide variety of crypto assets.
- Our guide details how to open a long position, set limit orders, and place stop losses.
Crypto Briefing explains how to use dYdX, one of the fastest-growing platforms for decentralized perpetuals trading on the Ethereum blockchain.
An Introduction to Perpetual Trading on dYdX
Since launching in 2018, dYdX has become the largest perpetual trading platform for crypto assets.
The average daily transaction volume of dYdX surged to almost $10 billion in September 2021, surpassing that of decentralized trading platforms and centralized exchanges like Coinbase.
Introduced by the centralized exchange BitMex, perpetuals, otherwise known as “perps”, are a type of derivative that allow traders to gain long or short exposure to a certain crypto asset. Perpetuals function similar to futures contracts, only they never expire according to a schedule.
dYdX is powered by the Ethereum Layer 2 solution StarkWare. Although it also offers derivatives trading on Layer 1, it will move to exclusively Layer 2 from November 2021.
Since dYdX is a decentralized exchange, users are not required to complete Know Your Customer (KYC) procedures like they are with most centralized exchanges. All you need is a funded crypto wallet and you can start trading in a matter of minutes.
dYdX uses the same order book system found on centralized exchanges. It also enables advanced order types. It is non-custodial, which means that traders retain access to their funds at all times via an Ethereum wallet.
This beginner’s guide details the step-by-step process for traders looking to start trading on-chain perpetuals.
Connect MetaMask Wallet and Generate Stark Key
Start by transferring funds from Ethereum mainnet to StarkWare.
Go to the official dYdX website and click on “Connect Wallet” on the top left-hand side of the page. A pop-up will then appear asking you to connect with an Ethereum wallet, such as MetaMask, Ledger, Wallet Connect, or imToken.
For this tutorial, Crypto Briefing used the most popular Ethereum wallet, MetaMask.
There is no backup of the Stark Key—it gets saved on the Web browser. Click on “Generate Stark Key” to generate a Signature Request. Sign the transaction—there is no gas fee to sign.
User Onboarding
After successfully creating a Stark Key, dYdX will ask you to acknowledge the legal terms. Click on “I agree” to proceed. Note that dYdX restricts access to U.S users.
Deposit USDC
To begin trading on dYdX, you must deposit funds from Ethereum mainnet. Currently, the platform only accepts the stablecoin USD Coin (USDC) as trading collateral. Top up your wallet with USDC if you do not have any funds.
After enabling USDC for spending, deposit the amount of USDC you would like to trade with. This transaction also requires paying a gas fee. USDC should then appear on your trading account. At that point, you can start trading.
Start Perpetual Trading
Deciding how much leverage to use is one of the most important steps of perpetual trading. Leverage is the amount of funds you borrow from the platform to make a trade. It serves as a multiplier on gains or losses.
dYdX allows up to 10x leverage trading. With $9.92 as Equity, the platform gives a maximum Buying Power of $99.20. Note that using 10x leverage can result in liquidation if the asset makes a 10% move in the opposite direction of your trade.
To avoid considerable losses of borrowed capital, dYdX liquidates your position after a certain threshold. Before you enter the trade, the platform automatically calculates the liquidation price of a position.
Going Leveraged Long
Select “Place market order.” In the example pictured, the amount of leverage and equity amounts to an allocation of $24.66 after accounting for a taker fee.
$24.66 buying power equates to a position size of 19 MATIC tokens at an index price of $1.30 per MATIC.
The Liquidation Price shows on the bottom right-hand side of the page. In this example, the price is $0.82 per MATIC.
Note: You can also place a limit order to buy or sell a given asset at a specified price. You can learn more about the various Perpetual order types on dYdX here.
Closing a Position With Limit Orders
To do this, go to the “Trade” tab and place a limit order to sell the asset, in this case 19 MATIC. Select a Limit Price. In the example above, Crypto Briefing selects a price of $1.80 per MATIC.
The platform will automatically enter the same leverage used in the prior buy order.
In the example above, the trade will execute if the price reaches $1.80. This would mean the position is sold at $34.20, leaving a profit of $9.54.
As the trade is only executed if the price crosses the limit price of $1.80, the MATIC position will remain open. You can also exit an open position at any time by manually clicking on “Close Position” at the bottom of the Trade tab.
Placing a Stop Loss
dYdX also lets you create stop loss orders to minimize capital loss from market volatility. This means that if the price of the asset falls, the position will close before the platform can liquidate it.
You can place a short sell after selecting “Stop” under the Trade tab. In the example above, Crypto Briefing selects a stop price of $1.20, 7.6% below the original entry price.
Click on “Place stop order.” If the price drops to $1.20, the position will be sold and the trade will close.
Derivatives trading is considered very risky and is not recommended for beginners. However, for those looking to trade perpetuals on crypto assets in a trustless manner, dYdX’s Layer 2 exchange might be the best place to get started. With deep liquidity, a range of supported assets, and low gas fees thanks to StarkWare’s technology, dYdX has created a derivatives platform that rivals the most established centralized exchanges.
Disclosure: At the time of writing, the author of this feature owned DYDX, ETH, and MATIC.