hybrix Feature Friday | June 25th

Joachim de Koning
4 min readJun 25, 2021

Every week we highlight a hybrix feature. This week we dive into: Allocating swap pairs!

Put that crypto to work
When you are holding crypto it is basically in stasis in your wallet. This means it sits there doing nothing. There is nothing wrong with that. It could be wise for your investment in the long run to simply let it be. If you are inclined to be a bit more active in trading, but do not see yourself as a trader, there is the option of putting some of your coins to work by allocating them in swappable pairs. Here we explore what that means, and give a you practise round…

Things you need

  • A computer, the internet
  • Some basic knowledge of the terminal/console (right now being an allocator is still experimental, so no UI yet…)
  • This guide is written for Mac OS and also works on Linux (for Windows you will need to configure WSL)

Why create a swap pair?

Let’s say for example, that you hold two cryptocurrencies: Digibyte and Binance BNB, and that you would like to put some of those coins to work. Making them swappable means other people that would like to turn their DGB coins into BNB or vice versa could do so via your swap pair. On every swap between these coins you can then earn a small commission in the coins that is used to pay for the swap. This grows your holdings, and gives others a chance to trade their value from their wallet without needing to go to an exchange.

Let’s do it!

Step 1.
Download the latest version of the hybrix cli-wallet under this link: https://hybrix.io/en/products (click on the hybrix cli-wallet download link on the left).

Step 2.
Create a folder and call it ‘cli-wallet’ (or whatever you like), proceed to unzip the file in that folder. You will now have everything you need at your disposal.

Step 3.
To make it easy to type cli-wallet commands and not have to re-enter your user ID and password every time we will make a little file containing the login, which you can delete after the exercise.

Using your favorite text editor, make a small file inside the cli-wallet folder called cli-login.sh containing the following text.

#!/bin/sh
./cli-wallet -u [YOUR_USER_ID] -p [YOUR_PASSWORD] $@

After having saved the file, go to your terminal in the cli-wallet folder and type: chmod +x cli-login.sh

Step 4.
Make sure you have some HY in your wallet to start with. You will need at least 15 HY. You can add some to your wallet by logging in at https://wallet.hybrix.io and sending some HY there, or getting some of it for another crypto by way of swapping. Make sure it is on Tomochain, as this will cost a lot less in fees. If it is not there yet, move it by using the Swap button, and then Move button.

Step 5.
Make sure you have some of the two crypto’s available in your wallet that you want to swap. At time of writing this article the ledgers supported for swapping are: BCH, BNB, DGB, ETH, WAVES, TOMO, and XRP. If you are still unsure of what you are doing it is wise to choose two chains that have low transaction fees and no strange oddities (like XRP, for instance, which requires you always hold 20 units per account). In that case you can choose two of BCH, BNB, DGB, WAVES or TOMO.

Step 5.
Now you can set up your allocation account.
./cli-login.sh -M allocation create

When you do this the cli-wallet creates a set of derived keys on which to handle the allocations.

Step 6.
First deposit the necessary HY onto your allocation account.
./cli-login.sh -M allocation deposit hy 12.5

You should get the transaction ID of the deposit, so you can check if everything went okay. If something went wrong, check if you are holding your HY on Tomochain or not. If not, use the web-wallet swap button to move it there first.

Step 7.
Now move most of those HY tokens into your security reserve. (This prevents allocators from being able to do front-running on swaps.)
./cli-login.sh -M allocation securityReserve 10

Step 8.
With all that ready you can now create your first pair!
./cli-login.sh -M allocation pairSet doge hy 0.3

You have just created a swap pair so people can trade from Dogecoin to HY. On every swap you get 0,3%. Make sure not to set that percentage too high, because then your pair will not be selected for swaps so quickly.

Conclusions

If you want to also make it possible for people to swap the other way (HY to Dogecoin), you must make sure to deposit some Dogecoin as well. And this goes for making any pair. By depositing some Bitcoin Cash, for example, you can already create 6 pairs with just three cryptocurrencies!

Have fun, and jump on our social media channels to let us know how it goes!

--

--

Joachim de Koning

Founder and Lead Developer of hybrix and Internet of Coins. Developer in blockchain and cryptocurrency space since 2011. Strong supporter of privacy.