DEX223 Development Report — June–July
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.
Completion of the DEX Core Development
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:
WETH9 — this contract is a wrapper for native coins, it transforms native coins into tokens and back. This principle of working with native coins is used on all DEX in EVM blockchains.TOKEN_CONVERTER — EIP-7417 token converter for switching between ERC223 and ERC-20.POOL_LIBRARY — contract that defines all liquidity pool logic.POSITION_MANAGER — works with NFTs that represent a liquidity provider’s position in the pool.FACTORY — a contract producing other contracts, for example, liquidity pools. As soon as a liquidity provider creates a pool that did not yet exist on the DEX, the Factory contract comes into play.SWAP_ROUTER — token swap router, this is exactly what traders interact with when swapping tokens.CORE_AUTOLISTING — autolisting contract implying payment of listing fees.FREE_AUTOLISTING — free autolisting contract. Core and Free imply two different lists.AUTOLISTINGS_REGISTRY — the registry that contains all tokens that have gone through the autolisting process.
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.
SwapLiquidity PoolsToken Manager and Auto Listings
Margin Trading Module
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:
Cheese Bank — November 2020, $3.3 million.Warp Finance — January 2021, $7.7 million.UwuLend — June 2024, $19.4 million.KiloEX — April 2025, $7.5 million.LoopScale — April 2025, $5.5 million.
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.
UI update
As mentioned above, the UI underwent changes:
The design system was updated (affects the displayed interactive elements like buttons, dropdowns, etc.).The margin module contracts differ from the original plan due to newly discovered challenges during development; therefore, UI needed to be updated.Particularly, Margin Swap UI was updated to display positions that the user is swapping from.Token import functionality was significantly simplified.Core UI was finalized, missing tooltips and minor bugs were fixed. It is now production-ready: app.dex223.ioA new page “Liquidation risks” was added.Remove liquidity and Borrow Market UI templates were updated to account for the latest contracts/Oracles change.Margin swap directly from an Order was added (more on this one in the next report as we are currently working on this feature).Position and Order management was reworked.A “Position health status” was implemented after analyzing competitor designs. It was recognized that most of the users are already familiar with this concept and format.Manual liquidation through UI was created.
Figma templates for the core and margin trading module are available via hyperlinks.
D223 Profitability
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
An important ideological victory
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.
Conclusion
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.
DEX223 Development Report — June–July was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.