This article is a commentary on the published report, with added context from the author. The report outlines the current development status of the DEX core, the margin trading module, and the D223 holders’ income system. Let’s go through everything in order.
The Dex223 development team has published a report covering the June–July period.
Previous reports can be found here: DEX223_development.
This article is a review with comments from the author on the provided report. The report contains a description of the development status: the DEX core, the margin trading module, and the D223 holders’ income system. Let’s go through everything in order.
The developers report that the platform core is completed, and this is excellent news.
What is the DEX core? The core of any DEX is a minimal set of smart contracts and user interface elements that enable token swaps.
The set of smart contracts of the DEX223 core deployed on the Ethereum mainnet:
Currently, the status of the main functionality of Dex223 is pending approval by the quality analysis team. But even now you can look around and interact with the main functionality of Dex223 — for this you just need to go to app.dex223.io.
Swap
Liquidity Pools
Token Manager and Auto Listings
As planned earlier, the margin trading module entered the active development phase immediately after the completion of the platform core development. The active development phase revealed problems with price oracles, leading to numerous subsequent updates.
The issue lies in how fixed-point numbers are (or rather, are not) stored in the EVM environment. Therefore, fixed-point numbers are represented in the Q64.96 format, where “64” is the number of bits of the integer part, “96” is the number of bits for the fractional part, for a total of 160 bits. This is a huge number necessary for working with a wide range of prices and liquidity. Operations with such numbers can potentially lead to an overflow of the uint256 format (the main type for representing integer variables), which in turn will lead to unpredictable consequences.
And as history shows, ignoring the specifics of decentralized oracles leads to losses of millions of dollars:
This is only a small part of the incidents where attackers deliberately targeted decentralized oracles. If you look at the dates of the incidents, the conclusion suggests itself: developers have been aware of these pitfalls for years but continue to encounter them.
In order to reduce the likelihood of manipulation of a decentralized oracle, the team decided to simplify calculations by reducing the price to the first 6 digits. It was also decided to use the Chainlink oracle as a backup. The backup oracle is important not only for liquidation accuracy but also if a user decides to run their own oracle.
In order to ensure that in an emergency situation the users’ funds are not locked in the contract, in the initial implementation the developers will have the ability to manually manage the contract.
The liquidity pool contract also includes the observations function, which stores historical data for TWAP calculations. Time‑delay or time‑weighted average prices (TWAP) is protection against instant manipulations.
Changes in the backend part naturally led to changes in the UI. In the test version of Dex223, margin trading is present, as well as position tracking functionality, however, this is not yet the last update on the way to the final implementation.
For testing and debugging, the developers launched a trader contract in the Sepolia test network and a decentralized oracle. The developers urge users to join the testing of the margin trading module, for which they have provided a step-by-step instruction in the report.
As mentioned above, the UI underwent changes:
Figma templates for the core and margin trading module are available via hyperlinks.
This module was planned to be addressed after the completion of the margin trading module, so currently, neither a contract nor a UI has been implemented.
The co-founder and driving force behind DEX223, the author of the ERC-223 standard — Dexaran — is celebrating a victory he has been striving for almost a year. A detailed explanation of the ERC-20 flaw — accounting for $83.6 million in losses — has been added to the official Ethereum.org website.
This time, in addition to the report, a working version of DEX223 is also presented.
There are issues inherent to the entire industry, and they need to be addressed; with 100% certainty, no one wants to join the collection of projects that have lost millions from frivolous games with oracles. Therefore, the project is moving forward steadily, albeit not quickly, incorporating the best secure coding solutions in the EVM ecosystem as well as offering its own unique ones.
The release of the main core and the official recognition of the ERC-20 problem are strong signals of progress. As Dexaran emphasizes, these tools can and should be used to promote a new style of application design in the EVM ecosystem, and in fact, this will be the beginning of a large-scale marketing campaign for DEX223.
Note: This analysis is entirely the author's vision. It is not a call to action or investment advice.This article is for informational purposes only and does not constitute financial advice. Investing involves risk, and you should consult a qualified financial advisor before making any investment decisions. Original reporting sources are credited whenever appropriate and as required.