Skip to main content
All Collectionsv3PerpetualsAccounts & Wallets
v3 How does the integration with 0x API work?
v3 How does the integration with 0x API work?

Deposits & Withdrawals to Layer 2 with the 0x API DEX aggregator.

G
Written by Gog
Updated this week

How does it work?

All of our Perpetuals are settled and margined in USDC. However, you are able to deposit or withdraw other assets into your Perpetual account through dYdX's integration with 0x API. For example, when depositing ETH, your ETH is automatically converted to USDC using 0x API. When withdrawing funds as USDT, the USDC in your perpetual account is then converted back to ETH using 0x API.

What is 0x?

0x API is a decentralized exchange aggregator. 0x API searches 17 decentralized exchanges and intelligently routes orders to ensure traders get the best price. dYdX's integration with 0x API allows users to atomically swap an asset that they own for USDC when depositing, and then deposit. So for example if you have USDT, we construct a transaction for you that changes it to USDC then deposits to your L2 account. Similarly, when withdrawing, we can send you the equivalent. so for example send you 1 ETH for $1300 of your USDC from your L2 account. This all happens automatically on deposit within one Ethereum transaction.

Are there any fees for this conversion?

dYdX does not take any fees on this conversion. You will have to pay the Ethereum gas fees to execute these deposits and withdrawals.

You can read more about our authors here.

Did this answer your question?