Decentralised Finance (DeFi) boasts a copious and value-rich ecosystem of applications, benefits and interesting features.
From lending and borrowing to yield farming, from high APY staking protocols to margin trading, DeFi is ultimately transforming into one of the most desirable, go-to solutions for private investors, institutions, crypto VCs and retailers. With so many new, alternative value propositions being architected on almost a daily basis, DeFi is set to become the quintessential disruptor of 21st century finance.
Over the course of the last few years, the digital asset space has experienced tremendous growth and has structured a truly novel, cutting-edge economic framework. DeFi, in fact, provides blockchain projects with the infrastructure necessary to implement traditional, fundamentally centralised financial models and experiment with their propositions in a decentralised environment.
This, in turn, has led to the development of decentralised financial applications, or dApps, that can leverage the functionalities of traditional finance and essentially incorporate them within a trustless, disintermediated setting.
Indeed, the proposition that comes with hybrid TradFi-DeFi ecosystems has ignited a whole new market in the world of digital assets, captivating the imagination of leading entities in the space, sparking new concepts of wealth creation and generating innovative financial infrastructures.
This is primarily because advancements in technology, payment processors and applications have now made it possible for centralised, traditional finance (TradFi) and decentralised finance (DeFi) to offer the same services historically only available within the traditional financial sector.
The vast community of crypto aficionados, traders and digital asset investors can now benefit from trustless lending and borrowing mechanisms, can trade freely without the need for third party intermediators and can deposit crypto asset collateral to gain leverage on their trading positions.
Pertinent examples of projects looking to merge the paradigms of traditional finance with DeFi are, for instance, lending and borrowing platform Compound, decentralised exchange and AMM protocol Uniswap, DeFi liquidity protocol Aave and, finally, decentralised trading hub dYdX.
About dYdX
dYdX is a decentralised margin trading protocol built on the Ethereum blockchain. The protocol allows users to lend, borrow and make bets on the future price of crypto assets through its decentralised exchange (DEX), and its ultimate goal is to bring trading tools normally found in traditional markets, such as forex and stocks, to the blockchain environment.
While on the surface it might seem like any other Ethereum-based lending and borrowing protocol, dYdX is actually trying to take DeFi to the next logical step in its development. In fact, while decentralised lending and borrowing protocols have existed on the Ethereum network for quite some time now (think Compound), the Ethereum ecosystem overall still lacks in advanced margin trading tools and protocols, and this is precisely where dYdX comes in.
Just like with the majority of DeFi financial products, dYdX is readily available for anyone to use and build upon, with its users’ assets being completely managed, run and stored by smart contract applications, as opposed to third party escrows. The dYdX decentralised trading platform is open-source, transparent and free to use, and one of the most exciting features offered by its infrastructure is its ability to allow users to execute trustless peer-to-peer short sells and option trades on any ERC-20 asset.
dYdX’s powerful, Ethereum-built DEX supports spot, margin and perpetual contracts trading and, in true DeFi spirit, enables anyone to use it without registering, filling out KYC procedures or handing over assets to a centralised authority, like on traditional CEXes.
In a move to facilitate on-chain decentralised perpetuals trading, dYdX recently launched its Layer-2 scalability infrastructure. In fact, in order to significantly increase efficiency and scale trading on its platform, dYdX has partnered with StarkWare to design its own Layer-2 protocol for cross-margined perpetuals, based on StarkWare’s StarkEx scalability engine and dYdX’s perpetual smart contracts.
Through its in-house Layer-2 scaling solution, dYdX enables platform users to execute trades with zero gas costs, lower trading fees and reduced minimum trade sizes. This represents a major advancement in DEX perpetuals trading and will most definitely accompany dYdX on its journey of becoming the ‘numero 1’ decentralised trading protocol in the space.
At the time of writing, according to DeFi Pulse, dYdX is among the Top 4 derivative protocols within the DeFi ecosystem, with over $195 million in assets locked on its platform.
After Synthetix, Nexus Mutual and BarnBridge, dYdX has firmly established itself within the space and it arguably constitutes the most popular decentralised margin trading protocol in DeFi, with approximately $300 million in volume per day for derivatives and about $5 million in volume for its spot market.
Before diving any deeper into the protocol’s functionalities, use cases and how it works, a brief analysis of margin, collateral and perpetuals is necessary. This will help to gain a better understanding of how dYdX works and will provide the fundamental knowledge required to gauge its innovative propositions in DeFi.
What Is Margin Trading?
Margin trading essentially consists of borrowing money to make bigger bets on the price movement of a specific crypto asset or asset pair, such as BTC-USD for instance. Crypto traders will bet on the price of a crypto asset moving in a specific direction, either up or down, and they can execute their trades on an exchange’s spot market, which entails no leverage, or by using margin.
Margin trading allows them to increase their profit potential if they are right, but also maximises their losses if the trade goes against their prediction. In essence, margin is used by traders to increase their potential rewards and leverage their existing positions in the market.
For instance, traders placing their trades on the Binance CEX using a 2x, 5x, 10x or even 100x leverage (best of luck!) can profit two, five, ten or even one hundred times more than they would have if they had just entered with no margin. Trading on leverage is of course incredibly appealing for some as the potential for profit is maximised proportionally to the amount of leverage used, but the risk of liquidation is also multiplied.
Initial Margin
Initial margin is the minimum value that a trader needs to pay to open a leveraged position on, say, Huobi, Kraken or Binance. For instance, a trader could buy 10 ETH with an initial margin of 1 ETH at 10x leverage. Thus, the trader’s initial margin would be 10% of the total order, acting as collateral for the trade.
What Is Collateral?
Collateral constitutes the backbone of decentralised lending and borrowing protocols. Because identity solutions and reliable credit checks are yet to be incorporated into blockchain, almost all DeFi protocols require collateral as proof of funds and in order to remain solvent.
In DeFi lending and borrowing, collateral is the minimum deposit needed to take out and repay a loan, and the more collateral deposited the more the borrowable amount. For example, in order to borrow crypto from the Compound protocol, users will need to supply another type of crypto as collateral. Supplied collateral assets earn interest while in the protocol, but users cannot redeem or transfer crypto assets that are being used as collateral.
With Compound, the maximum amount users can borrow is limited by the collateral factors of the assets they have supplied. If a user supplies say 100 DAI as collateral and the posted collateral factor for DAI is 75%, the user can borrow at most 75 DAI worth of other assets at any given time. Thus, it is relatively easy to see how important collateral is for DeFi protocols as, without it, decentralised finance projects might risk insolvency and would, of course, not be able to function correctly.
What Is Perpetuals Trading?
Perpetual contracts are synthetic trading markets that allow for exposure to liquid assets using stablecoins as collateral. By trading perpetuals, users can participate in market movements, reduce risk and make a profit by longing and/or shorting with leverage on a futures contract. A futures contract represents a financial derivative contract, meaning a type of contract that ‘derives’ its value from the performance of the underlying asset.
In more practical terms, a futures contract is a legal agreement to buy or sell a particular commodity, asset or security at a predetermined price at a specified time in the future. Thus, a buyer of a futures contract is taking on the obligation to buy and receive the underlying asset once the futures contract expires.
On the flip side, a futures contract seller is agreeing to provide and deliver the underlying asset at the contract’s expiration date. Currently, the most liquid futures contracts with the highest trading volumes are:
- S&P 500 E-mini Futures
- Crude Oil Futures
- Gold Futures
- EuroFX Futures
- 30-Year Treasury Bond (T-Bonds) Futures
- Japanese Yen Futures
A perpetual contract is a specialised type of futures contract that, as opposed to traditional futures, doesn’t have an expiration date. This basically means that one can hold their position for as long as they like.
Furthermore, trading perpetuals is fundamentally based on the performance of the underlying asset index, consisting of the average price of the asset according to major spot markets and their relative trading volume. As a result, in contrast to traditional futures, perpetuals are usually traded at a very similar price to that on spot markets.
There are several reasons why traders might want to trade futures and perpetual contracts, as they provide them with a series of benefits and advantages such as:
- Hedging and Risk Management.
- Short Trading Exposure; Traders can bet for or against an asset’s performance even if they don’t physically have it.
- Leverage; Traders can open positions that are larger than their account balance.
The dYdX Proposition
As previously mentioned, the rise of DeFi has given birth to an explosion of digital assets and different value propositions. While many centralised and decentralised platforms designed to facilitate the exchange of these assets already exist, such platforms will usually only allow users to take long positions as it is currently pretty complex to execute short, hedged or other financial positions on a DEX.
dYdX, instead, offers decentralised peer-to-peer shorting, lending and derivatives trading on any Ethereum-based token. In addition, dYdX provides investors with some rather interesting decentralised financial strategies, including:
- Short selling; Short sells allow investors to profit on price decreases, and can be used for speculation or to hedge existing positions.
- Fully-collateralised, low-risk loans for short sellers allow token holders to earn interest fees.
As it stands, there are very few decentralised protocols offering derivatives or margin trading, and none that have any significant usage. In fact, most margin trading happens on centralised exchanges but even they somewhat fail to provide adequate financial products on decentralised assets.
In fact, in order for a decentralised derivatives and margin trading protocol to operate efficiently, there needs to be a way to exchange assets trustlessly and determine the price at which these assets will be exchanged. Thus far, several types of decentralised exchanges have been proposed, including AMMs, on-chain order books, state channels and hybrid off-chain order books.
We chose to base dYdX on the hybrid approach pioneered by 0x, as we believe it allows creation of the most efficient markets. This allows market makers to sign and transmit orders on an off-blockchain platform, with the blockchain only used for settlement. – dYdX Whitepaper
dYdX primarily chose to implement 0x’s infrastructure in order to improve its efficiency as a DEX, as well as use off-chain order books with on-chain settlement to increase trading performance. Previous attempts at decentralised derivatives proposed using an oracle based approach to feed the exchange rates of asset pairs to smart contracts. However, an oracle based approach presents some major infrastructural drawbacks.
In fact, due to the limitations of frequency, latency and cost of price updates, it is rather difficult to achieve a level of market efficiency that rivals that of centralised exchanges. In addition, using oracles entails a certain amount of centralisation in any protocol, as some central parties have full control over setting the price.
Thus, dYdX allows trading of decentralised financial products at any price agreed upon between two parties. This essentially means that contracts on dYdX do not require price oracles and there is no need for contracts to be aware of market prices, as contract agreements are settled between two entities directly to preserve decentralisation.
Lending, Borrowing And Margin Trading On dYdX
As previously discussed, in margin trading, a trader borrows an asset and exchanges it immediately for another asset. The borrowed asset must then be returned to the lender, usually with some interest, at a later date. In margin trading, traders can take both leveraged longs and short sells.
In a short sell, an investor borrows an asset and subsequently sells it for another asset. The investor capitalises if the price of the asset decreases, since rebuying the asset to repay the lender costs less than the price it was initially sold at. On the other hand, the investor loses money if the asset’s price increases.
In a leveraged long, an investor will borrow a currency and use it to buy another asset. The investor will capitalise if the asset’s price increases and will lose money if its price decreases. Profit and Loss (PnL) from the position is equal to the change in price of the underlying asset multiplied by the leverage ratio.
This means that traders executing a 2x leveraged long trade on BTC-USD on Binance Futures, for instance, and the price of BTC moves say 5%, traders will be able to capitalise on a 10% move because their trade is using 2x leverage.
Trading On dYdX
At present, dYdX performs lending and borrowing on Ethereum’s Layer-1 and supports three main assets, with these being: ETH, DAI and USDC. While some might consider this to be a rather limited selection of assets, it is important to bear in mind that dYdX is a fully trustless, permissionless decentralised margin trading protocol and is primarily designed to be as such, as opposed to a pure lending and borrowing platform. Thus, the limited selection of assets is somewhat justified.
On dYdX, users can perform two types of margin trading:
- Isolated Margin Trading
- Cross-Margin Trading
Isolated margin allows users to leverage one asset, whereas cross-margin trading lets them use all the assets in their account to take a position. In other words, cross-margin trading utilises all the assets in a user’s account, and allows traders to take unique positions to further leverage interest.
The dYdX margin trading protocol uses one main Ethereum smart contract to facilitate decentralised margin trading of ERC20 tokens. Lenders can offer loans for margin trades by signing a message containing information about the loan such as the amount, tokens involved, and interest rate.
These loan offers can be transmitted and listed on off-blockchain platforms, such as 0x. In this scenario, a trader opens a margin position by sending a transaction to the dYdX margin smart contract containing a loan offer, a buy order for the borrowed token and the amount to borrow.
Once received, the smart contract then sends the margin deposit from the trader’s account to itself and uses a decentralised exchange such as 0x to sell the loaned amount specified in the trader’s buy order. The smart contract will then hold onto the deposit for the loaned amount for the duration of the trader’s position.
Supported Margin Trading Pairs
dYdX currently offers three margin trading pairs:
- ETH-USDC
- ETH-DAI
- DAI-USDC
For instance, let’s suppose that a trader held 1 ETH in their Metamask wallet and is confident that the price of ETH will suddenly turn bullish. The trader could send their 1 ETH to dYdX as they know they will be able to leverage their position there.
On dYdX, a trader decides to go 5x leverage, and they are able to buy 5 ETH with 1 ETH. Let’s now suppose that the spot price of ETH is $2,000 and that the token moves upward to $2,500. If the trader held only 1 ETH they’d be up $500, however, because they are using 5x leverage on their initial 1 ETH position, they are currently up $2,500 (500 * 5x).
To trade on margin on dYdX, users will need to:
- Connect Metamask Wallet.
- Select Desired Trading Pair.
- Select Either ‘Isolated Margin’ or ‘Cross Margin’.
- Select Desired Leverage, up to 5x.
- Review Position and Potential Liquidation Price.
- Click ‘Open Long/Short Position’.
dYdX Margin And Borrowing Collateralisation
On dYdX’s margin trading protocol users are allowed to trade with up to 5x leverage and they will need to over-collateralise their loans in order to open leveraged positions and borrow assets. This is very common among DEXes in the space and it entails depositing more than 100% of the loan amount.
On dYdX, users must deposit 125% of the loan amount before borrowing which is actually less than other DEXes, since most require 150%. Also, liquidations can occur if a 115% collateralisation ratio isn’t maintained.
These ratios, of course, are not selected at random, but they are used to protect lenders from borrowers taking out risky loans or performing risky trades. Thus, once a loan drops into or below the 115% ratio, the borrower’s position is liquidated to protect the lender.
To borrow and lend on dYdX, users will need to:
- Go To dYdX.Exchange.
- Click ‘Trade’.
- Click ‘Margin’.
- Click ‘More’ and Select ‘Borrow’.
- Depending On The Asset Selected, Click ‘Borrow ETH/USDC/DAI’.
Interest Rates For Lending And Borrowing
Interest rates for lending and borrowing assets on dYdX follow a floating model, meaning that they are dynamic and updated instantly depending on supply and demand ratios.
This also means that interest rates are never locked to a specific yield percentage (APY) at the time of opening a position. In fact, interest rates move based on utilisation, which is the ratio between the amount ‘borrowed’ and the amount ‘supplied’, as shown in the image above.
On dYdX, both lenders and borrowers interact with what are called global lending pools. There is one global lending pool per supported asset, all managed by smart contracts. When lenders deposit assets into dYdX, these assets are deposited into their corresponding lending pool, allowing borrowers to gain access to those assets. This model inherently allows for greater liquidity and enables both lenders and borrowers on dYdX to deposit and withdraw assets at any given time.
Trading Perpetuals On Layer-2
As previously described, Perpetual contracts are synthetic trading markets that allow for exposure to liquid assets using stablecoins, such as USDC, as collateral. Besides margin trading, decentralised perpetual contracts trading is the heart and soul of the dYdX protocol.
With dYdX, users can either go long or short with leverage on a perpetual futures contract and capitalise on the price movement of the underlying asset. Perhaps the most intriguing part about this is that dYdX allows users to start trading perpetuals with as little as $10, one of the lowest minimum trade sizes in the DeFi arena.
By going long, a trader buys a Perpetual contract with the expectation that the underlying asset will rise in value in the future. Rather than buying and holding the underlying asset, traders buy synthetic, derivative exposure to the asset. On the other hand, by going short, a trader sells a Perpetual contract with the expectation that the underlying asset will decrease in value in the future.
To start trading perpetuals on dYdX, users will need to:
- Deposit USDC or any ERC-20 token into their Perpetual account on dYdX’s Layer-2 platform. In order to do so, users can deposit funds to their account by sending a Layer-1 Ethereum transaction through their Metamask wallet. To do this, users will be required to hold some ETH in their wallet to pay for the transaction fee.
- Generate a Stark Key, which is a public key that links a user’s Ethereum key with dYdX’s smart contracts. This Stark Key is used to identify a user’s account on dYdX’s Layer-2 infrastructure and is saved locally on the user’s browser. To generate a Stark Key and enable Layer-2 for dYdX, users will need to agree to the Terms of Use and Privacy Policies.
- Select A Market. With cross-margining and increased scalability, dYdX is able to offer perpetuals contracts based on more markets. Currently, the platform supports Perpetuals of BTC-USD, ETH-USD and LINK-USD among others, however, the protocol strives to launch more than 30 new contracts throughout 2021.
- Open Position Using Preferred Order Type: Market Order, Limit Order, Stop Limit Order or Trailing Stop.
- Select Preferred Leverage Ratio. It is important to note that dYdX offers up to 25x leverage on Perpetual contracts trading. Exercising risk management is thus mandatory! This is because if you’re using 25x leverage on any asset pair, your position will be liquidated if the price suddenly moves against you by 4%. Whereas, if you’re using a modest 5x leverage, your position will be liquidated if the price moves against you by 20%, giving the trade considerably more room to run.
- View Open Positions in the ‘Positions’ tab to track your profits and close eventual losses.
dYdX Launches Governance Token
On August 3rd 2021, the dYdX decentralised trading protocol announced the launch of its Ethereum-based DYDX governance token. According to the Zug-based dYdX Foundation:
DYDX is a governance token that allows the dYdX community to truly govern the dYdX Layer 2 Protocol (“the protocol”). By enabling shared control of the protocol, DYDX allows traders, liquidity providers, and partners of dYdX to work collectively towards an enhanced Protocol. – Docs.dYdX.Community
Similarly to previous governance token launches, such as Uniswap’s UNI and Compound’s COMP, a portion of the initial supply will be distributed to dedicated, past users of the protocol who meet certain requirements. In DYDX’s case, 7.5% of the initial supply will be distributed to previous dYdX users, with several token allocations being distributed over a 5-year period.
The DYDX governance token will be utilised to determine the future direction of the decentralised trading protocol and will enable token holders to vote on proposals to add new features to the platform, structuring a governance model for the project.
The possibility of a governance token launch was hinted at when, in late January 2021, dYdX raised $10 million in a Series B round primarily led by Three Arrows Capital, DeFiance Capital, a16z, Scalar Capital and Polychain Capital.
According to dYdX founder Antonio Juliano, the fundamental reason for launching a dYdX governance token was fuelled by the aspiration to eventually create a DAO-governed decentralised margin trading protocol built on advanced functionalities and ultimate decentralisation. Better put, the founder himself stated:
Our team has actively been researching how best to decentralise the protocol over time. Decentralisation will be a gradual process that could ultimately result in a DAO [decentralised autonomous organisation] to govern the community. – Antonio Juliano, The Block
dYdX Team
dYdX launched back in 2017 and it has ever since developed a strong reputation for itself, receiving long-term support from heavyweight crypto VCs and firms in the space, and gathering an experienced team of consultants, developers and blockchain architects around it.
dYdX has always set its standards incredibly high, and for good reason too! In fact, the protocol aspires to create a next generation professional trading exchange in which users are the true owners of their assets and, eventually, of the platform itself. Furthermore, dYdX seeks to empower and provide traders with the advanced tools of today’s financial ecosystem and looks to ultimately democratise global access to decentralised trading, margin trading and perpetual contracts.
The Team at dYdX is composed of:
Conclusion
Over the course of the last few years, DeFi has grown exponentially and has structured some of the most cutting-edge FinTech developments and economic frameworks. With so many propositions being architected on almost a daily basis, it is no surprise that decentralised finance is sparking such high levels of interest across the space. Arguably, one of the most note-worthy propositions is the ecosystem developed by decentralised margin trading protocol dYdX.
dYdX strives to facilitate the process of trading crypto assets on leverage in a decentralised environment, embodying a major advancement in the fledging DeFi arena. With dYdX, users can long and/or short perpetual contracts seamlessly with up to 25x leverage, as well as trade ETH-USDC and ETH-DAI on margin with up to 5x leverage.
In a sense, dYdX is inherently transforming the way traders engage with DeFi applications and decentralised exchanges (DEXes) as a whole, as it provides them with the infrastructure necessary to perform functions and leverage the benefits that were previously only available on centralised exchanges (CEXes).
It is therefore quite obvious to see how important dYdX currently is and will continue to be for decentralisation in the space as, at present, there are very few decentralised protocols offering derivatives or margin trading, and none that have any significant usage.
Overall, the stakes are high for dYdX, but its recent $10 million Series B round and the launch of its DYDX governance token all point towards a successful, liquidity-rich and incredibly prolific future roadmap.
Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.
- 000
- 0x
- 100
- 100x
- 11
- 2021
- 7
- a16z
- access
- Account
- advice
- Agreement
- agreements
- All
- Allowing
- AMM
- among
- analysis
- announced
- applications
- around
- aspiration
- asset
- Assets
- AUGUST
- authority
- autonomous
- BEST
- binance
- Binance Futures
- blockchain
- Books
- Borrowing
- Bread
- browser
- BTC
- build
- Bullish
- buy
- Buying
- capital
- cases
- change
- channels
- Checks
- CoinBureau
- commodity
- Common
- community
- Compound
- continue
- contract
- contracts
- Costs
- credit
- crypto
- crypto asset
- crypto traders
- crypto-assets
- Currency
- DAI
- DAO
- DApps
- data
- day
- decentralisation
- DeFi
- DeFi Pulse
- Demand
- Derivatives
- Design
- developers
- Development
- Dex
- DEXes
- digital
- Digital Asset
- Digital Assets
- dydx
- Economic
- ecosystem
- Ecosystems
- efficiency
- empower
- Environment
- ERC-20
- ERC20
- ETH
- ethereum
- Ethereum blockchain
- ethereum network
- exchange
- Exchanges
- experiment
- Features
- Fees
- Finally
- finance
- financial
- Financial sector
- fintech
- follow
- forex
- founder
- Framework
- Free
- full
- function
- funds
- future
- Futures
- GAS
- Giving
- Global
- good
- governance
- Growth
- High
- hold
- How
- HTTPS
- Huobi
- Hybrid
- identify
- Identity
- image
- Including
- Increase
- index
- information
- Infrastructure
- innovative
- institutions
- interest
- Interest Rates
- investment
- investor
- Investors
- involved
- IT
- Key
- knowledge
- Kraken
- KYC
- launch
- launches
- Layer 2
- leading
- Led
- Legal
- LEND
- lending
- Level
- Leverage
- Limited
- Liquid
- Liquidation
- liquidations
- Liquidity
- loan
- Loans
- locally
- Long
- major
- Majority
- management
- margin trading
- Market
- Markets
- MetaMask
- million
- Mobile
- model
- money
- Most Popular
- move
- moves
- network
- New Features
- New Market
- offer
- offering
- Offers
- Oil
- open
- opens
- Opinions
- Option
- oracle
- order
- orders
- Other
- Others
- owners
- partners
- Pay
- payment
- performance
- platform
- Platforms
- policies
- POLYCHAIN
- pool
- Pools
- Popular
- prediction
- present
- price
- privacy
- private
- Products
- Profit
- project
- projects
- proof
- protect
- public
- Rates
- readers
- reasons
- reduce
- Requirements
- research
- retailers
- Rewards
- Risk
- risk management
- Run
- Scalability
- Scale
- scaling
- security
- selected
- sell
- Sellers
- sense
- Series
- Series B
- Services
- set
- setting
- settlement
- shared
- Short
- Shorting
- smart
- smart contract
- Smart Contracts
- So
- sold
- Solutions
- Soul
- Space
- Spot
- Stablecoins
- standards
- start
- State
- state channels
- Stocks
- successful
- supply
- support
- Supported
- Supports
- Surface
- surprise
- Technology
- The Future
- time
- token
- Tokens
- top
- track
- trade
- trader
- Traders
- trades
- Trading
- trading crypto
- traditional finance
- transaction
- transforming
- treasury
- TVL
- UNI
- Updates
- USD
- users
- value
- VCs
- View
- volume
- Vote
- W3
- Wallet
- Wealth
- WHO
- within
- words
- Work
- works
- world
- worth
- writing
- years
- Yen
- Yield
- youtube
- zero