DYdX of Decentralized Exchange (DEX)

One of the features provided by the Centralized Exchange (CEX) is the margin trading function. Margin trading allows investors to conduct leveraged transactions to improve users' purchasing power to obtain potentially higher returns. The innovation of introducing margin trading on DEX has also emerged. Examples of DEXs that provide decentralized margin trading include dYdX, NUO Network, and DDEX. The following introduces the dYdX project, which combines a decentralized lending market and margin trading on its exchange.

More blockchain technology and application classification:

Blockchain applicationBlockchain     development

Ethernet Square | Fabric | BCOS | cryptography | consensus algorithm | bitcoinOther chain

Token EconomyTraditional Financial Scenarios | Decentralized Finance | Anti-counterfeiting Traceability | Data Sharing | Trusted Deposit

Decentralized finance:

dYdX

dYdX is a decentralized exchange protocol that supports lending and margin/leverage trading. It currently supports 3 assets-ETH, USDC and DAI. By using off-chain order books and on-chain settlement, the dYdX protocol aims to create an efficient, fair and trustless financial market that is not controlled by any centralized organization. dYdX is somewhat similar to Compound. Users can provide assets (lending) to earn interest, or lend assets (borrowing), but dYdX further supports margin and leverage trading, and can use DAI or USDC for ETH margin with up to 5 times leverage transaction.

Lending

 

DYdX of Decentralized Exchange (DEX)

If you want to generate some passive income from encrypted assets, you can consider lending encrypted assets to dYdX to get some income. Its risk is relatively low, and by depositing cryptocurrency into dXdY, interest will be generated every second without any additional maintenance or management. If you are a lender on dYdX, you only need to pay attention to the earned interest rate (APR), which represents how much you will earn from the provided assets.

Where does the deposit interest come from

The interest earned by the lender will be paid by other users who have borrowed the same asset. dYdX only allows over-collateralized loans, which means that the borrower must always have enough collateral to repay its loan, if the borrower’s collateral is below the 115% mortgage rate threshold (that is, for a $100 DAI loan, below 115 USD ETH collateral), then the borrower’s collateral will be automatically sold until it fully covers its position. Mobile changes according to the relationship between supply and demand, which ensures that users can always earn market interest rates. In addition, the initial funds and the interest earned can be deposited and withdrawn at any time.

loan

You can use dYdx to borrow any supported assets (ETH, DAI and USDC) as long as you maintain the initial mortgage rate of 1.25 times / the minimum mortgage rate of 1.15 times. The borrowed funds will be deposited directly into your wallet and can be transferred, exchanged or traded freely.

As a borrower of dYdX, the two numbers to pay attention to are:

(i) Interest rate (APR)-the amount paid to repay the loan

(ii) Account mortgage rate-this is the ratio of mortgage assets/loan amount. You can borrow until the ratio reaches 125%, and once the ratio falls below 115%, you will be liquidated.

Margin & Leverage Trading

In dYdX, you can establish short or long positions with up to 5 times leverage. When performing margin trading on dYdX, funds are automatically borrowed from platform lenders.

Assuming such a scenario, your dYdX account initially has 300 DAI and 0 ETH. If you plan to short ETH (assuming ETH is currently at $150), you will:

1. Borrow 1 ETH ($150)

2. Sell ETH for 150 DAI, the balance of dYdX is now 450 DAI and -1 ETH

3. Assuming that the price of ETH drops to $100, you can now repurchase 1 ETH for $100 to repay the debt

4. Your final balance is 350 DAI-your profit is 50 DAI ($50)

  • With dYdX, you don't need to actually own ETH to open a short position. You can borrow ETH in exactly the same place and open a short position.
  • The collateral used to guarantee margin trading will continue to earn interest, which means you don't have to worry about interest loss while waiting for the order to be completed. This is a unique attribute of dYdX.
  • On dYdX, whenever a position falls below the 115% margin threshold, any existing borrowings are considered risky. To protect lenders, risky positions will be liquidated. The collateral endorsed for the loan will be sold until the negative balance is 0, and a 5% liquidation fee will be charged.

How to calculate profit/loss

For example, you use a deposit of 3 ETH to open a 5-fold long position at an opening price of $220.

You will need to borrow $220*12 = 2640 DAI to purchase an additional 12 ETH (lock a total of 15 ETH in your position)

If you close the position at $250, you will need to repay the loan of 2640 DAI = 2640/250 ETH = 10.56 ETH

This will leave you 15-10.56=4.44ETH. Therefore, your profit will be 4.44-3=1.44 ETH

Steps to calculate profit

1. Determine the initial leverage and deposit amount to determine the position size (leverage * deposit)

2. Loan amount = (position size-deposit) * opening price

3. Loan repayment = loan amount / closing price

4. Balance = position-loan repayment

5. Profit = Balance-Initial Deposit

 

Recommendation: "How to DeFi"


Original link: dYdX of Decentralized Exchange (DEX)

Guess you like

Origin blog.csdn.net/JonasErosonAtsea/article/details/109236197