DeFi — Derivatives: dYdX

Andrea Chello
The Quant Journey
Published in
7 min readDec 27, 2021

--

Soruce: https://dydx.exchange/og-image.png

dYdX is a company that specializes in margin trading and derivatives. The margin trading protocol supports USDC, DAI and ETH. The company has a spot DEX that allows investors to exchange these assets against the current bid-ask on the order book.

Order Processing

The DEX uses a hybrid on-off chain approach where dYdX stores signed or pre-approved orders without submitting them to Ethereum — saving a lot on fees.

These orders use cryptography to guarantee they are only used to exchange funds for the desired asset at the desired price.

The DEX supports limit orders and a maximum slippage parameter for market orders in an effort to mitigate the slippage associated with price moves or front running.

  • Allowing dYdX to match the orders holds little to no risk that the company could steal user funds, because the signed orders can only be used as intended per the smart contract.
  • When the orders are matched, they are submitted to the Ethereum blockchain memory pool, where the smart contract facilitates settlement.

Leverage

Levered long or short positions are possible using margined collateral. The maximum leverage dYdX currently allows is 10 times — where the leverage is higher for perpetual futures.

--

--