TKEY Metamorphoses or Development to the Maximum. How did we Prepare for the Transition to the New System?

Hi👋 The TKEY team is finally in touch; after hard and long work — we broke out of this routine, and we want to share with you the results of our work.

Today’s publication will be in an unusual format for many. Let’s talk more freely than usual. We will tell you what problems we encountered, how solved, and what is new in the project. And we will also analyze the questions: “When is the launch of TkeyNet,” “When can we expect a specialized web interface for transferring funds to the new system,” “What will happen next,” and when will the exchange eventually be launched!

Let’s start with a brief digression

The TKEY project has become a “world of contrasts” for many of us, but it seems that we have just started preparing for a smooth transition to Core 2.0, and now TkeyNet is on the way.

A fundamental psychological Thriller: information theft, fake employees, and account blocking — something did not happen for three years while developing the project. The ideal plan that usually matures in the minds of ordinary people is a classic “road map” without any additional nuances.

In practice, you can encounter a whole maze of events and scenarios. “Experts” will say: “All this is wrong planning” — but they will forget about difficult-to-predict events that have significant consequences. In 2020, for most representatives of the business sector, it became a “Coronavirus.” Hundreds of enterprises were under the threat of bankruptcy, someone could withstand, and someone had to close business.

They are always businessmen investing in the development of their business and new directions. It turns out that all the money is in its own business. For many, investments in the opening of new projects in 2020 became fatal somebody, on the contrary, was able to earn good money: “Someone is crying, and someone is selling handkerchiefs.”

For the TKEY project, 2019 was a kind of “Black Swan.” One event can create whole chains of subsequent events, so in 2019 it happened: “exchange advisors,” freezing of funds, overlapping work processes, internal investigations, betrayals, setups, and other events that naturally affected the timing of implementation of all directions.

What should we do in this situation? Anyone who has been in this position understands what it is. Before you: a burden of responsibility, work processes are frozen, funds are held, competitors add “oil to the fire,” contractors begin to bend their interests to cash in on the situation — a complete mess.

The first step in such a situation is to conduct a “cold calculation,” build a strategy that will lead many to misunderstand and give the company time to maneuver.

All warfare based on deception. Hence, when able to attack, we must seem unable; when using our forces, we must seem inactive; when we are near, we must make the enemy believe we are far away; when far away, we must make him trust we are near.” — © Sun Tzu, The Art of War.

So we did. We already understood that there is simply no time to create an intermediate link in the form of Core 2.0. If in 2019 its creation was still relevant, then in 2020, it would be a waste of time and money, and to launch the system on Core 1.0 is at least pointless because it does not meet our needs, and even more so the needs of users, not to mention the needs of large investors.

2020 came: Coronavirus, panic in the world, self-isolation, and other troubles — we quickly restructured the company, moved all processes to “remote” mode, switched absolutely all business processes to distributed mode. Regardless of the restrictions, must put labor and financial resources-continued work in the proper form and on the right rails.

What happened next?

Then you watched publications about TkeyNet and its work, and we worked hard. According to published statistics and their subtext: test results, increased transaction speed, and more. — you can see that the release of TkeyNet was supposed to take place in October.

Let’s start with the main thing that work was carried out, not only on the TkeyNet system but also on its related products. The development includes developing interfaces for interacting with the system: a user space where you can receive, transfer, and exchange assets; and a space for companies where developers can: connect their solutions, use TKEY products, and so on.

What problem was solved?

The new TKEY is an ecosystem. Neither one nor two products, the system consists of a dozen solutions responsible for performing a specific task. It took several years to create the TkeyNet system for objective reasons; the TKEY team will switch to it this year.

Solutions based on TKEY: more than ten pieces — and the amount of code is huge. The team’s task: so that all elements of the system work interconnected and without any failures. Some solutions may have a small amount of code, while others, such as TKEY Register and Engine, will consist of thousands of lines of code.

So let’s get started. At the beginning of October, when the interface team was actively preparing the frontend for TKEY products, we sent the system for tests for organizations that had previously agreed to test the beta version of TkeyNet in real-time.

The first feedback-more than pleased: fast, stable, and most importantly, convenient. Even when creating the TKEY ecosystem-we paid attention to the process of deploying the server part: configuration files, containerization, in general, launching and configuring for business tasks-takes days, weeks, not months.

First, configuration files allow you to make fine settings: access control, KYC/AML, statistics, payment data, metadata, flexible configuration of the network part: ports, permissions for receiving data. Secondly, due to the configuration files, it is much easier to start the system. You don’t need to study the documentation about the entire system, just read the configuration instructions, set the necessary values, test the functions — and go!

Everything is stable. What happened next? — Then, we encountered an interesting phenomenon: “Floating-point.”

Floating-point — the problem or the solution?

It would seem that everything is fine. Can put the system on the rails and release. However, strange calculation behavior reveals when the team received test results from one of the companies participating in this process.

Note. Beta testers are industry companies that conduct testing in their environment, for example, business areas: trade, payment systems: financial functions, and more.

A two-week test conducted by one of the companies showed that when working with the lowest values, there are inaccuracies in the calculations, and in some cases, this problem occurred with large values.

Based on the results obtained, the backend team went to look for the problem. Given that the system design to work with various financing institutions and Finance in General — all calculations must be accurate, without any errors. Even when building the TkeyNet architecture, the approach chose: using a “floating-point number.” Let’s first look together at what was the advantage of this approach.

Reference. The advantage of using this format over the fixed-point is that you can use a significantly more extensive range of values while maintaining the same relative precision.

For example, in fixed-point form, a six-digit integer number with two decimal places can represent 123,456.78. In 8-bit floating-point format, you can write numbers 1.2345678; 1,234,567.8; 0.000012345678; 12 345 678 000 000 000, and more. — To do this, you must have an additional two-digit field for recording the exponents of the base: 10 from 0 to 16, while the total number of digits will be 8 + 2 = 10.

Note. Writing a number in floating-point form allows you to perform calculations over a wide range of values, combining a fixed number of digits and accuracy.

A Bit of Theory

In the decimal system for representing floating-point numbers (3 digits), the multiplication operation, which we would write as:

0,12 × 0,12 = 0,0144.

In normal-form, it represents as:

(1,20⋅10−1) × (1,20⋅10−1) = (1,44⋅10−2).

In the fixed-point format, we would get forced rounding:

0,120 × 0,120 = 0,014.

At first glance, everything is fine. All calculations must perform without any errors.

To exclude the “human factor,” we contacted the team that participated in the testing, verified the configuration settings for any changes at the code level, and checked: “How the system startup and operation process went.”
Checked — no problems found on the side of the company acting as a beta tester. All right, let’s keep looking.

We started to “dig” in the direction of the TKEY Register. Code analysis started. First, it was necessary to reproduce the situation on their servers and find an error in the inaccuracies of calculations.

The main confusing thing was that previous testing results on our side and other companies who participated in this process did not reveal any errors. Four companies participated in beta testing, and only one company had errors with calculations.


We have deployed a system with six validators — we have enabled and written scripts that will create operations with the lowest values in transactions and transactions and create transactions with the highest values.

At the same time, we launched all the functions, including the Exchange Engine, which is built-in at the TkeyNet level.

  1. We launched the system in different locations: London, Hong Kong, Moscow, Toronto, Seoul, Dubai.
  2. Launched a trade by the Exchange when orders create, imitation of a work exchange at high loads.
  3. Included scripts for testing of transactions and trades.

Note. Scripts create the maximum load on the TKEY Register by sending millions of transactions; all numeric values are different: the largest possible numbers and tiny ones. Example of representation: 1⁰¹² and 1/1000000, conditional example of transmitted values in transactions-large: 1 834 710 854 175, smallest: 0.0000001; 0.0008370; 0.00002081, etc.

Results of the first tests in 3 days — no errors found. Search for further. In parallel, we launched autotests for other products to avoid any bugs that, as a practice has shown, can appear at the most undesirable moment.

On the fifth day, no errors. Start to analyze the module of the transaction fee because the minimum values calculate with its help.

Reference. TkeyNet uses a small transaction fee, on average: 1\10000 one ten-thousandth, which makes transfers almost accessible even if the cost of TKEY increases by x1000, the transaction fee will be less than a cent.

Seventh-day. Disabled the script for sending transactions with the maximum values; enabled the shell-script for sending transactions and transactions with the lowest values.

Twelfth day. Eureka! The reason found. An error may theoretically occur when transmitting values with the lowest values and commissions that calculate automatically, but the “Commission module” only prompted the search for a solution.

Next day. We began to study the problems of “floating point” — we analyzed the errors inherent in this approach. We immersed ourselves in the “problem with accuracy.”

A bit of theory

+ 3.141276
— — — — — -

Reference. The lower three digits of the terms are lost. Suppose, for example, that you need to add up many numbers, all approximately equal to three. After adding a thousand of them, the current amount is about three thousand; lost numbers not restore. Rounding errors can affect the convergence and accuracy of iterative numerical procedures.

The accuracy is 53 bits. As repetition is applied repeatedly, accuracy improves at first but then deteriorates.

The fly in the ointment has become — a spoonful of honey

Error found, now to find a solution to eliminating the inaccuracy of the calculations in the code. Research and analysis of the problem led to an elegant solution: use a string instead of floating-point arithmetic, and make changes to the TKEY Register.

The value of the asset amount passes in a String — without loss of accuracy, is a reliable way to provide it. Also, this solution prevented the problem of different protocols and systems that do not have the functionality to represent small-or-large decimal values.

String a class with methods and variables for working with strings in the programming language. Besides, the string provides better reliability of software code.

At the API and SDK levels, the amount in a transaction is passed as a string. At the TKEY Register level, each sum encodes as a 64-bit signed integer in the format: hyper.

For example, 77,938,729 = 7.938729 units of a tokenized asset; to get the original value in 64-bit representation, the tokenized asset’s unit is reduced by 10,000,000. Digits represent in Int64s values are stored as signed integers to avoid errors. A non-zero unit-1\10000000 represent by an integer that is equal to 1.

We rewrote the work of these functions in all products — conducted joint testing — the result is positive; hooray!

What’s next?

Also, given the complete incompatibility of the first Core 1.0 Protocol and the new TkeyNet system, the development team needed to prepare a specialized web interface for “transferring funds.”

It would seem: “Take it and do it!” On the surface, everything is always simple — in fact, development requires

  • planning,
  • building architecture,
  • writing documentation, development, testing,
  • informing specialists who will control the processes or indirectly participate in them.

Mind Map

As mentioned above, Core 1.0 and TkeyNet are incompatible. Besides, everyone uses different ways to store TKEY: mobile app, local wallet, cold storage. Accordingly, the options and scenarios for transfers are various.

The team needed to create a Mind Map-a diagram of connections and paths to automate this process as much as possible in the current conditions of incompatibility.

The web interface must have the following properties:

For example, for users who store funds in a local wallet, it is much easier to implement the process of “transferring funds,” on the other hand, regardless of the storage location. The team needs to provide an automatic process for validating assets during the “transfer” to exclude “duplicates,” information falsification, and, of course, ensure the complete accuracy of the data transferred to the new system.

The main thing is that the task needs algorithmically without the human factor more accurately with minimal participation.

The user goes to the web interface → First step: Generates a key pair (public and private key) → Second step: selects a storage location: “TkeySpace,” “Local wallet,” or “WIF” →Third step: loads data → Fourth step: Clicks the “Send” button.

Reference. An encryption key is secret information (a set of numbers and letters) used by the algorithm to encrypt and decrypt information. The public key is available to everyone. The private key is known only to the owner.

A private key is confidential information and is only available to you.

The public key is your new tkey-account in TkeyNet, where the transfer of the asset.

The algorithm based on the provided data — processes information, checks the Core 1.0 registry — creates a transaction in the new system to the user’s tkey-account, which he received at the first step in the web interface.

Again, there are nuances. For example, TkeySpace is a multi-currency wallet, and a private key consisting of 12 words (a backup phrase) provides access to a group of digital currencies. It means that some users in the app used TKEY and other digital currencies, so a validation process requires that does not affect other currencies.

Also, according to the statistics of support requests, the team understands that users only store TKEY in the mobile app.

Given all this, the paths separate, and the mind map expands accordingly.

Task. You need to create the best user path that will be as convenient as possible and emphasize the reality of the complete incompatibility of systems.

Web Security

Well, the mind map sorts out. The process of interacting with the web interface takes place online. So we need to ensure web security to the maximum:

  • Use proven encryption methods.
  • Eliminate points of failure.
  • Make information unchanged.
  • Work out the server-side.
  • Conduct a security audit.

Who is fluent in Nginx, Apache, and especially fond of cloud resources — understand the importance of this issue that the implementation should be as competent in code and the server. From an operational point of view, DevOps covers a wide range of issues, from the platform and infrastructure that the product runs on to security.

Task. Creating a stable structure for high loads and availability: 99%. To develop a data encryption strategy, enable fault tolerance solutions, think through strategy anti-phishing, conduct a web security audit, provide recommendations to users, and write step-by-step instructions.


Also, the entire process should be automated: From the user receiving a “key pair” to the final goal — receiving funds in the new TkeyNet system.

A key pair is a set consisting of two keys: a private key and a public key.

As mentioned above, the mind map shows various scenarios for transferring funds. Therefore, we need a single validation system that automatically processes and verifies all data and requests.

This problem solves with the help of the blockchain and “script checking.” The main nuances are working out instructions for users and providing tools that will help them simplify the “transfer of funds” procedure as much as possible.

Well, that’s settled. Now it is necessary to work out scenarios of “social engineering,” as well as “human factor,” for example, in the style when the user “seemed” or “wanted to deceive, it didn’t work out.”

It looks like this:

  • The Algorithms have checked all applications, all funds credit to the new system.
  • The data converge.
  • There are no discrepancies.

It would seem that everything is fine. However, we received a message in the support service: “I had funded” or “why was one request processed, and the second one not?”

A means that you need to fully inform and advise support agents and the corresponding regulations: “How the transfer process is going,” “how the algorithms work,” “What to do in a particular case,” and more. A implies that a process of additional verification and arbitration is needed. In case of any disputes, the appointed administrator checks the executed request manually. Checks hashes, amounts, and more.

The administrator’s task is only to make sure that there are no failures and check for errors. The scripts have already verified the information, and all actions perform algorithms.

Results. The task related to the “transfer of funds” has been analyzed, but you can already understand that any technical process has several procedures, even without going into the technical part. If you look at the proportions, then a specialized web interface is 0.1% of the entire development process in our reality.

What are the results?

When creating a system, you need to identify the market’s problems, weaknesses, legal nuances and study the economic issue.

Businesses and their owners, as practice shows, are interested in creating the final user experience, and lesser extent, they want to dive into the complex mechanisms of the system.

Accordingly, we face connecting various systems: payment systems, banks, exchanges, digital systems using new technologies.

The main advantage today: the depth of integration of the system for actual executable processes of enterprises; the TkeyNet system provides comprehensive digitization of processes and versatility, making it easy to deploy products in various organizations.

A business can focus on providing the best user scenarios, easily connecting to the system using the API, and connecting your interfaces.

TKEY solution is a powerful engine with hundreds of functions configured for banks, payment systems, exchanges, and any other business or financial world representatives who have security requirements and work under high load.

In many ways, the success of IT solutions may depend on the integration process and its compliance with international standards, so the TKEY ecosystem is customized.

At the same time, about 90% of resources, or development costs, are hidden from the end-user. The business or user no longer needs to understand the complex subtleties and processes to interact with the system. As mentioned above, we have prepared an excellent solution based on containerization and configuration files for businesses and users — clear interfaces for managing their finances.

Someone will describe TkeyNet as a large-scale framework for building an IT product, and users will be able to taste all the power as the system develops. After all, the difficult part is over.

The basis of the entire system is a powerful technical component. Mathematical algorithms, cryptography, distributed registry, payment routing, search algorithms, built-in exchange engine, exchange system, data accounting systems, and much more.

To date, the backend at the TkeyNet level has been complete. The frontend part is almost complete. The user interface debugging and tuning is underway: minor bugs are fixed and require a minimum of time to debug them.

What will happen next? What are your plans and actions?

Now about the main thing. After reviewing the material, and as we said earlier, the TKEY asset will be placed on its exchange, given that the system already has an Exchange Engine built-in for decentralized trading. Besides, some users are aware of the agreements that we had with other exchanges. Therefore, the TKEY asset will list not only on its exchange but also on other exchanges.

Please note. The system’s task is to combine various payment systems under a single technical standard, which is why Exchange Engine is one of the powerful and vital functions of the TKEY ecosystem.

For a better user experience, we are developing TKEY Online. A single interface that includes a similar architecture to TkeySpace; in other words, it is also as secure as possible, and access to it is carried out using a private key, but there are some differences:

  1. A built-in decentralized exchange based on TkeyNet.
  2. Instant transactions are available in the system.
  3. Implemented TKEY ID for easy sending and receiving of assets.
  4. Access to all tokenized assets that connect to the TkeyNet.

Learn more about point 4. Any connected asset to the system automatically becomes available in TKEY Online and the future other products of the company. We have developed an integrated system so that all functions can easily migrate and interact in various applications based on TkeyNet.

Note. Now we are working on TKEY Online. The first trading pair planned: USDT or any other asset in a similar representation, for example, TUSD, but we do not exclude the ruble pair.

Actions planned for this month. A dedicated web interface for transferring funds is in the final stage of development. After completing improvements to the web interface for transferring funds, we will launch TkeyNet and publish the web interface.

Given that TKEY Online is under development, TkeyNet will be launched in a closed mode for the company’s developers to carry out a “transfer of funds.”

Important. On the day of the release of TKEY Online — trading will begin. Therefore, our team recommends using the web interface in time to get access to funds during trading.

In the interval between the publication of TKEY Online, tests will be conducted: exchange operations with the company’s partners to integrate the trading process fully.

The whole team has a task-to-release TKEY Online with the availability of exchange operations. The release of TKEY Online may take place a week before the possibility of exchange operations, i.e., the product will be released-users will have access to funds, but the “trading” function will be temporarily unavailable.

However, we aim for a full-fledged launch without any restrictions, so we are following the launch strategy: TKEY Online and Trading in one day. We will likely have time to launch it before the end of the month.

Also, as you understand, TKEY Online integrates with the company’s partners forbidding, so the process of its development is no less. The timing of testing trading operations and the completion of the development of TKEY Online itself will show whether TKEY launch Online before the end of the month or it will happen in the first half of January.

In conclusion

The entire team is fully aware of the complexity of “delays.” We have a huge responsibility, so all products will have to work stably and without any excesses.

TkeyNet is a new level of the system, not the one you saw earlier, in the representation of Core 1.0, but the one you and we deserve. Therefore, we still recommend not giving up — and going to the end of this path with us!

And now, we invite you to plunge into the meaning of the new system on the new website →

TKEY is changing, and these changes are getting better!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Official TKEY blog in Medium. Infrastructure for the financial ecosystem