dYdX: Investigation of approaches to building liquidity on DEX

In the blockchain ecosystem, where changes have been made since its inception, the need has recently emerged to exchange cryptocurrencies and stable coins for transactional purposes without much friction. Separate industries have been individually successful in terms of transparency and accountability. In order to achieve economies of scale, the further development of decentralized stock exchange transactions (DEX) like dYdX had become a necessity. This piece will look at unique approaches on how to liquefy decentralized trading platforms. Some of the figures discussed here include Atomic Bonded Cross-Chain Debt, Flash Loan, MakerDAO, Compound, dYdX, etc. One of the key drivers in the development of Liquefied DEXs is the urgent need to decentralize Platforms and applications are becoming mainstream, so that every single person can benefit from the advantages of decentralized running platforms / applications.

You can think of smart contracts as the entry point for any decentralized exchange. The initiation platform is, Ethereum and application are smart contracts. Since the turning point in the decentralized architecture was the financial industry (due to the 2008-09 financial collapse), the intent in the early days was to offer financial instruments, loans, options, etc. This study shows that Atomic Bonded Cross-Chain Debt (ABCD), particularly hash-time-locked contracts (HTLC), reduces the existing loophole and makes it impossible to economically scale DEX. One way (out of others) that liquidity on decentralized exchanges is said to be beneficial is by the fact that you / coder / miner could write smart contracts to an electronic ledger. If necessary, this feature enables atom swaps between two parties on different blockchains to transfer assets to one another in the future. The core idea behind the atomic bonds are flash swaps. Figure 1 shows the abstract functionality of the atomic bond service. Each transaction also has a corresponding signature, a corresponding output value and a corresponding blocking time. If the person / party keeping the secret announces the timeout period in advance, the swap will take place. Otherwise, when the deadlock expires, the swap is rolled back and the locked values ​​are sent back to the original owners. The bond funding key and exercise key can be referred to as central keys for the proposed model. The previous key is used to sell while the latter is used to exercise the bond. In the end, you may think of this study as a better option than other DeFi (decentralized finance) protocols because ABCD can be used on various HTLC compatible blockchains without the need for a full Turing-based programming language. The next piece of research deals with the “Flash Loan” and its benefits for the entire DeFi ecosystem.

Flash loan is a new term that has entered the decentralized ecosystem. The word in layman refers to a scenario where traders are allowed to apply for a loan with no collateral as long as the debt is repaid within the transaction period. There are two types of exchanges used in exchanging crypto assets, namely “Limit Order Book (LOB)” and “Automated Market Maker (AMM)”. In the case of the LOB, two buy and sell orders are matched to carry out the exchange for different types of crypto-assets along with the compatible costs agreed by the buyer and seller. In AMM DEXs, a cluster of liquidity pools supported by liquidity providers must deposit different tokens in order to achieve liquidity equilibrium. Figure 1, as shown here, serves as an example to overcome in building the proposed model. At the beginning of 2020 a mishap occurred in which dYdX, Compound, bZx and Uniswap experienced a hack. Figure 1 tries to show that due to the large initial capital, which eventually led to a deepening of the complications, reasons for such an incident were in the first place. The infographic below shows the process of troubleshooting the problem (bZx hack). The process includes a 3-phase solution. First, to filter transactions, the definition of the transaction pattern is a prerequisite. Second, four basic elements are created using the transaction patterns to understand the semantics of the transaction (s). The basic elements are:

  1. exchange
  2. Borrowing and Borrowing
  3. Margin trading
  4. liquidation

Third, the intent of each transaction is understood by combining restored primitives.

The 3-phase solution is called a thunderstorm. The flash loan identifier supports transaction patterns to locate and categorize the basic elements. A transaction pattern can include a transaction event, a function call, and a chain of function calls between smart contracts. A primitive classifier recovers the semantics of the transaction into four primitives (the ones mentioned above). Finally, the advanced behavior classifier reveals the most important information indicating the original purpose from which the intent could be found. Figuring out the intent will help decipher some intentions like arbitrage, avoiding exchanges, etc. The next investigation shows that some work is being done on the flash loan pool.

This particular piece focuses on decentralized finance lending protocols. If you’re a tech geek, chances are you know that DeFi protocols run on a Layer 1 blockchain. A liquidity pool has been set up to solve the crowdsourcing problems. As you can see from the infographic below, the flash loan pool is initiated by providing a loan to the largest available liquidity pool, which also corresponds to the required capital. Afterwards, borrowed funds are exchanged with the voting slip. Then the executive contract is replaced by voting. Eventually, the collateral will be absorbed by Ethereum to repay the loan (it should be noted that this is just an illustration).

These three research results above will give you an idea of ​​how liquidity stocks on decentralized exchanges can be built from scratch. One thing is certain that numerous approaches will come into play as it becomes a necessity versus a wish. One factor driving this change is the need to scale economically in any industry. To find out more about the latest updates in the blockchain industry, visit Primafelicitas.