We were approached by a client with the task of creating various trading pairs on their decentralized cryptocurrency exchange (DEX) called SolDEX. He explained to us that the team that made this exchange for them could not figure out how and how to fill the exchange with trading pairs, but could only figure out and adjust the already developed functionality as a whole to the client’s corporate identity.
For us, this task was not something new, since our Polygant team has already developed more than one DEX exchange and perfectly understands all the subtleties of this issue.
We changed the brand name and blurred out any references in the screenshots so as not to violate the NDA for our client.
Decentralized exchanges in most cases work on the DEX-AMM model.
AMM is an automatic market making technology. Instead of a traditional book order, liquidity pools of pairs of assets are used, and prices are calculated according to a formula based on their ratio in the pool. This formula looks like this:
where x is the Ethereum reserve (or BNB, depending on which network the exchange owner chose to work on);
y – reserve of tokens;
k is a constant.
When ETH is exchanged for tokens, the user invests them in smart contracts, and in return receives a certain number of tokens.
Before proceeding with the main task that the client approached us with, namely the creation of trading pairs, we conducted a SolDEX project review. During the review, multiple shortcomings were revealed both in the code itself and in many aspects related to security. A full report was handed over to the client, we suggested that we first deal with the identified problems, and later move on to the main task.
After we fixed all the problems identified during the code and project reviews, our team began the initial task.
Due to the fact that the exchange was developed before us by a rather incompetent development team in this matter, we had to rewrite the smart contract of the exchange, as it made mistakes in the logic of the exchange, as well as in ensuring liquidity, and it (liquidity) makes trading possible for tokens on the SolDEX exchange.
As a result, we launched the exchange from scratch. Thanks to the detection of errors in the logic of the exchange and their correction, we also completed the initial task with which the client approached us without any problems, namely, adding trading pairs.
We have added over 20 trading pairs to the SolDEX exchange. In the future, this client contacted us on some issues related to the exchange and we were happy to provide consulting services and help resolve this or that issue.