One of the most important and interesting projects in the area of DeFi, short for Decentralised Finance, is certainly dYdX. There is a very competent team behind dYdX and the software is completely open-source.
The project is very similar to Compound. In this case, however, the smart contract relies on a liquidity pool instead of peer-to-peer loans with algorithmically set interest rates.
To date, it ranks fifth among DeFi apps in terms of smart-contract value. In this respect, the graph shows the growth that has taken place in the last 5 months.
The main difference with Compound Finance is that dYdX focuses on a specific use-case: margin trading, which allows traders to gain from an asset’s decline in value (short selling) or growth (leveraged long position). dYdX currently supports ETH, DAI and USD Coin.
Summary
DeFi: what is dYdX?
A trader activates the process by sending a loan offer, a purchase order and the purchase amount to one of dYdX’s smart contracts. The smart contract accepts the deposit and sends it to a decentralised exchange, usually 0x, to sell the asset at the price specified by the trader.
The smart contract holds the deposit until the trader decides to close the position. At that moment the trader receives back the amount lent and the related profit. This is a rather complicated process, but it allows for decentralised margin trading without leaving the dYdX platform.
On dYdX it is possible to open short and long positions with leverage up to 4x. It is also possible to generate revenue through lending: funds can be deposited and withdrawn at any time. Interest rates are automatic and dynamic.
It is also possible to lend funds directly to an Ethereum wallet if the minimum collateral ratio is between 1.25x and 1.15x.
Limit order
As of September 10th, the platform added a very interesting feature: a separate market with both market and limit orders for ETH-DAI. This is a blockchain-based, fully fee-free real-time trading experience.
Previously, the ETH-DAI market relied on the Eth2Dai exchange and only supported market orders.
Here are some peculiarities of this solution:
- Instant creation and cancellation of orders;
- Fast matching and instant balance update;
- Limit orders on margin;
- Cross margin trading;
- Other markets (e.g. WBTC) and other order types (e.g. Stop loss) will be added shortly;
- In the near future, isolated margin trading will also be introduced.
The dYdX markets execute off-chain orders that are encrypted directly by the user, who must specify the price and quantity of the token to complete the trade, and verified by the smart contract.
Security
As proof of the seriousness of the project, the developers decided to undergo two external security audits and no critical bugs were detected. The following are the reports of both audits:
- Bramah Systems, February 2019;
- Zeppelin Solutions, April 2019.