Welcome to the pages of our blog, friends! Do you want to know if it is possible to create a full-fledged crypto exchange on a GONT platform? Then read the article!
Peculiarity: NOT decentralized, but a high-speed trading exchange. With HFT support!
Requirements for creating an exchange:
1) Multilevel protection against hacking of wallets and trade channels
2) Scalability to millions of users
3) Interaction with various popular CUs
4) Accounting and confirmation of transactions (actually, GONT gas consumption)
5) Calculation of exact billing for each TR
6) Supports of the atomic swap (Exchanges of a new generation)
7) High loads – 1000 TR / sec for HFT
8) Easy transfer of all architectures to FPGA
We will consider the architecture of the core of the exchange with the help of GONT terms:
As in the case of a decentralized exchange, we will consider all transactions on the exchange in terms of transactionality and states (STATE). Only without recording intermediate states in the BC.The internal architecture should “emulate” the reliability of the CU inside the exchange itself.
Advantages of GONT technology for the exchange:
The existing working core of GONT VM as the technological basis for the trading core of the exchange.
– Simplicity of scaling to millions of users of the exchange
– Atomicity and accuracy of accounting for all trade transactions
– Record of all traces (paths) of all transactions for proceedings and evidence. Significant simplification of the work of those support.
– TTZ technology
– TrustyTransactionsZone – transaction protection. Implementation of only highly protected transactions in a special protection mode.
– Atomicity for long chains of related transactions.
– Simplicity of comprehensive testing through trade emulation.
– Simplicity of display of all global logic of the exchange on user accounts. What solves the process of linear expansion of users’ points is simply the purchase of servers.
– Multi-level protection: protected transactions + protected wallets. Rings of protection of all operations.
– Ease of functional expansion. The modular structure of the GONT cores and self-assembly from the meta descriptions make it possible to easily expand the trusted functional FUPE GONT space.
– Exchange processing based on cores of self-assembly also protects against potentially dangerous actions of employees of the exchange itself. Because There’s no way to seamlessly infiltrate the GONT VM core.
– GONT gives the user a full statistics of delays at all stages of the transaction. This can be used to debug HFT.
Display on GONT:
The main issues for the formation of the architecture of the exchange based on GONT:
What essences of the exchange do we consider as a gas?
What essences of the exchange do we consider as FUPE?
What essences of the exchange do we consider as a Service?
GONT-Gas (AlGas) implements all transactional meanings of the exchange.
FUPE implements available resources.
To identify all objects we will consider the exchange processes:
1) Filling the trade glass with orders
2) Support of the trade of many crypto-currency pairs. For each pair – a separate glass.
3) Form the order and send it to the glass.
4) Maintaining secure user accounts.
Analysis of display on the GONT-FUPE:
1) A trading glass for the selected asset (a pair of currencies)
FUPE module: a store of order states with the possibility of sorting and matching operations.All the holders of the asset (potentially one million users) can add the application in the glass immediately. Taking into consideration the atomicity of this operation – it is possible to efficiently implement a distributed glass (several FUPE modules), so that each glass is locked independently when the order-adding transaction is processed.
AlGas:
– TR to adding and removing from the glass
– TR of reading the status of the glass
– TR of preservation of the state of the glass
What is the state of one order in the glass?
In GONT, this is pre-TR (pre-transaction), transaction before execution (In GONT transactions are treated as “states” – TR_states).
The transaction is displayed simply after the decode phase in the gVM processing machine, when displayed in a glass (i.e., the visualization of the meaning of the transaction is received, but there has not yet been an execution).Executing the same order from the glass will lead to the launch of the FUPE execute module, which is responsible for the functionality of this transaction (the actual execution of the transaction + Commit state). In this case, the conditional smart contract of the transaction will be executed. Conditional, because blockchain is not used. But the “smart contract”, on anybody is already stitched in the core at the stage of creating the service.All changes to the core of the service after the first creation will be public and the facts of the changes will be recorded in a separate BC.
2) User accounts.
Accounts must have a logical cell-structure. A certain logically closed cell (user) that is mapped to the FUPE functional space with calculations.In GONT, each user has his own gVM machine in the global GONT VM to work out the “personal” transactions of the user (his personal AlGas).In this case, this gVM user can be protected from attacks by private cryptography of the user. The global GONT itself does not know the structure of this cryptography. This is realized through private GONT gas instruction.The user can create his own unique cryptography and protection strategy. And there is no way for a global system to learn it.
3) Long atomic chains of transactions.
Multiple flow of AlGas
Example of a long chain scenario:
“Execution of a purchase (sale) order + service actions”
A: Matching on all the glasses of the same asset
+
B: Changing the state of the buyer’s and seller’s wallets
+
C: Save TR_Trace (save transaction trace)
+
D: Save State Deals
+
E: Update State cup
+
F: Distribution of messages on the transaction (initiation of callbacks)
4) Transactions and security.
By default, all transactions, even simple ones, such as order sorting, must be protected (ie TTZ! – TrustyTransactionsZone). At the same time, the GONT core strictly limits the number of possible transactions in the system at the stage of generating service gas and assembling the service cores.New types of transactions can be introduced into the system only by adding new cores to the pool of the conditional “miner” (in the case of the exchange-hoster), which is also strictly controlled.Also, cores process a lot of potentially erroneous or “anomalous” states (such as nonexistent transactions that the attacker is trying to implement).
5) Distributed glass.
In GONT, the transaction path has a distributed character and this makes it possible to parallelize the functionality.
Visualization of GONT VM: Distributed glass based on the gVM set. Distributed glass for one trading currency pair. Atomic access to each of the {gVM1, gVM2, gVM3} for glass forming transactions (from several users at once). The full glass is visualized by the transaction of aggregate state assembly via the GPS protocol.Thus, you can expand the narrow neck of performance.
6) Auxiliary modules FUPE
Example: gVM cores have a built-in timer module, which allows you to program the lifetime of orders when they are created.In general, GONT has enough FUPE modules to implement the basic (and even extended) functionality of the exchange.
Influencing documents:
1) Protocol Cross-Atomic Chain (CAC)
2) FPGA for global exchange architectures.
3) The core functional
Trading Core
The trading core is the most important part of the crypto exchange. The speed and correctness of all transactions on the exchange depends on how functional the code is.
The core performs several priority tasks:
It checks all issued warrants for the provision of financial assets. Simply put, depending on the current balance of the trader allows or does not allow him to issue a warrant for the purchase / sale of crypto currency;
It creates and changes records in the database when new orders are placed and the current orders are executed;
It prepares data for display in the trading terminal – current price levels, values for charts and stock cups, a list of the last executed orders, and so on.
It is imperative that all these functions are performed in several threads. In this case, the exchange will cope with the processing of all incoming orders, even with automatic trading using bots. Separation of functions can be carried out both virtually (separate processes for different tasks) and physically (different servers within a single local network).
Thank you for attention! Stay tuned.
GONT