September 25 saw the end of the second Minter hackathon dedicated to the launch of decentralized exchanges (DEX). In just a week, the development teams had to create a convenient interface for monitoring the price of coins on the Minter testnet, as well as provide a simple tool for buying and selling them directly from users' wallets. DeCenter spoke with Arthur Borisov and Alexei Polyakov from the MonsterNode team, who received 10 Ethers of the prize pool, and found out what meant victory in such a difficult tender.

This time, the participants were faced with the task of developing and launching a decentralized exchange (DEX), whose users would be able to monitor the activity of all the coins issued on the Minter network, as well as carry out direct transfers to other addresses. A week was allotted for the development and launch of the trading platform, and the PHP SDK and its detailed documentation was provided to help.

As a result, the members of the MonsterNode team developed and launched a convenient Monster DEX trading platform that allows users not only to view and analyze the movement of all the coins of the network but also receive detailed information on each of them.

Source.

The exchange also provides an easy-to-use toolkit for buying and selling all assets directly between users.

Source.

It was this product that ensured victory for the developers of the MonsterNode team and 10 Ethers of the prize fund.

How Did the Exchange Start?

Since the team was not faced with the task of storing user data, they primarily developed a decentralized access point to the exchange in the same format as the official Minter wallet, i.e., signing in with a login and password from the network, as well as logging in and registering through a seed phrase. As for the interface itself, the early version of the Poloniex crypto exchange was used as the basis.

Next, the developers started working with a list of coins for which they needed a convenient browser with filters and tabular data that platform users need. It is worth noting that the coins issued on Minter have a unique feature that does not allow for trading in the usual way. The fact is that the price of any coin is influenced not only by transactions in the network that occur every five to six seconds but also by the amount of its reserve in the main coin of the Minter network (in the testnet, it's called MNT, and in the mainnet—once it's launched—it will be BIP), as well as its constant reserve ratio.

Minter blockchain is designed in such a way that immediately after the creation of a coin, it has real value, provided with a reserve and economic formulas. Moreover, the reserve creates absolute and instant liquidity for all market participants, since any coin can be exchanged for any other in just a couple of seconds and without an intermediary. Thus, any coin holder can influence its value. Nevertheless, the price of any coin can always be calculated by an economic formula.

As a result, the developers came to the conclusion that it does not make sense to keep information on transactions formed on the exchange. Instead, the future winners of the Minter hackathon were faced with the task of developing a parser, a software for collecting data for further processing and conversion into a structured format for organizing data from the blockchain. In this case, the SDK came to the rescue, which provided the team with all the necessary data from the network, namely, information on transactions, as well as data on the creation, sale, purchase, and delegation of each coin.

After the parser was ready, the members of the MonsterNode team started outputting the data in the format of graphs and summary indicators needed by the users of the exchange for trading.

“We calculated formulas by which we can find out the price of a coin at a point in time in the past, figured out how the delegation of a coin to the Validators could affect this, and also recalculated the prices to the main coin in the network, since Minter allows to exchange coins among themselves. This created some difficulties with the calculation of trading volumes and the number of transactions. But in the end, we collected data by time, which allowed us to display price change charts, take into account trading volumes and bring summary indicators to the list and filter of coins,” said the winners of the second Minter hackathon.

The team also decided to provide users with a filter by coin creators, since in the Minter blockchain, this data is displayed as the author’s wallet address. Moreover, the developers launched a filter that allows excluding from the list of coins those that were created only for delegation, coins with small collateral, or coins that have low rates in trading volumes per day.

Since with each new solution, the exchange parser acquired the storage of summary indicators, the team decided to store the data in the SQL database. And to speed up the output of the list, the developers began to cache everything in memory and reset the cache when the necessary transaction appears on the network.

Creating a convenient mechanism for swapping coins on the exchange was the next important step in launching the Monster DEX. As the developers themselves noted, the team was fascinated by the process, and in addition to the standard buying and selling functions, forms for delegating and sending coins to any address were added.

The convenient Minter API allowed the team to organize the sending of various transactions from its site in just an hour. In this case, all transactions are visible on the blockchain as carried out from the wallet of an authorized user on the exchange.

As for security, then, as in the case of any other decentralized platform, Monster DEX should have reliable protection of the software component of the exchange, through which attackers can try to steal users' private keys. To do this, the team decided to encrypt the data returned by the blockchain after authorization using openssl_ecrypt, and also store it in the user’s browser’s local storage.

As a result, the MonsterNode team has developed and launched a reliable and easy-to-use product that allows not only to manage user coins but also to monitor the dynamics and performance of other coins.

Future Monster DEX

Of course, the team had little time to implement absolutely all of their ideas, and therefore the developers have many plans to develop their product.

First of all, the team plans to add pending orders, which will also be processed through transactions on the blockchain and executed only with the user's consent. Also in the plans are adding a full wallet to the profile, modifying the Russian language interface, and upgrading the security system.

The MonsterNode team is considering with particular interest the possibility of direct purchases of the network's native digital coin (BIP in the mainnet) for Bitcoin, Ethereum, and a number of other top-end cryptocurrencies. Moreover, some opportunities of ordinary trading platforms will be present at the decentralized exchange, for example, trading history with profit calculation, various trading pairs, and pending orders (they will also be stored on the blockchain).

The team also plans to start developing simple games for the Telegram messenger with payments via the Minter blockchain. According to the developers, new ideas are constantly being born in the team, because even in the testnet, Minter offers a wide range of tools and a high level of support. And any product can be immediately transferred to the mainnet.

The decentralized exchange is not the only MonsterNode product using the Minter blockchain. The developers also created a rating of validators with an accrual check for each stake owner, support the MonsterNode, and also interact with the Minter team to improve the developer’s toolbox and debug the network before launching the mainnet.