TRX1 Dev Blog #10 (October 2021)

Thor Rune Xchain
4 min readNov 3, 2021

In this episode, you will learn about new commands for THORChain Monitoring bot, about problems, I had to face, and about the revival of the traders’ leaderboard.

I spent part of October on a long-awaited vacation traveling in Egypt. Therefore, this report will not get too long and tedious.

THORChain Monitoring Bot

First, the bot migrated to a new server where it has access to 4 times more CPU and memory resources. This resulted in a significant performance boost. Unfortunately, one of the motivators was the failure and corruption of the database. Luckily, the database contained almost no critical data. It mainly contained statistical and historical data. The only thing is that users will have to re-add addresses to the lists to view the benefits from the liquidity pools.

Second, I added a few new commands to the bot. Some of them merely redirect to existing sections of the bot:

/lp — go to the Liquidity Yield menu
/queue – display the queue graph for last 24 hours
/stats – show the last network statistics
/nodes – the list of THORNodes

And there are two new commands.

/chains

This command will show you a list of connected blockchains, their status and current Vault addresses. For EVM networks there is also a router address.

/chains’ output

In addition to entering a command, you can reach this section through the “Metrics” menu.

/mimir

The bot already has notifications of changes of major constants by team members via Mimir. However, it lacked a section where you could check all available constants and their modified values. And now it’s here. Use “/mimir” command or navigate to the appropriate section of the bot in the “Metrics” menu. In the info message you will find a complete list of THORChain constants with their current and default values. If necessary, the message is split into several if the list is too large to fit into a single message.

/mimir’s output

Impermanent loss protection

A setting has been added to enable and disable the effect of impermanent loss protection on the final figures of liquidity provisioning yields in the pools.

IL protection toggle

Miscellaneous

As usual, I tried to fix the bugs and issues with the bot that I was able to find in the past weeks. Partially fixed the issue with redundant transaction queue notifications.

Several things have been improved in the texts to make the messages more informative.

1317 port’s doom

Port 1317 was disabled on nodes unexpectedly for many developers, who used it to get information about the internal state of the THORChain network in a decentralized manner. We understand and acknowledge that the use of this port may have had an impact on slowing down key node functions, such as generating new blocks.

Nevertheless, after such an unexpected surprise, urgent measures had to be taken to keep my tools working.

aiothornode library has been update to version 0.0.21 in which it is connected to a single central point https://thornode.thorchain.info/. This change obviously had a negative effect on the reliability and speed. I also had to add a retry mechanism because this server often responds with errors or timeouts. In the future, I plan to bring up my own lightweight node to have 24/7 access to THORChain data.

The fresh version 0.0.21 of the library is uploaded to PyPI. Source code is on GitHub.

Chaosnet Traders’ Leaderboard

The website of the Chaosnet traders’ leaderboard has been revived! Corrections have been made to achieve compatibility with the new APIs.

What’s new? Swap transactions containing multiple output transactions were also taken into account.

Please look at the result of the work: https://leaderboard.thornode.org/

At this point, the leaderboard should already be fully synchronized.

MCCN traders’ leaderboard screenshot

Conclusion

My next plans are:

  1. Bot: new price movement detection algorithm
  2. Bot: Slack integration
  3. Leaderboard: filter by pool.
  4. Runiverse: continue working.

That’s it. Thank you for reading. Leave your feedback on my projects. You are always welcome!

--

--