Decentralized Token Distribution Event

ENCOINS
7 min readMar 1, 2023

--

In this blog, we present a guide on how you can participate in the upcoming decentralized token distribution event. The event is open to everyone, regardless of whether you participated in the ISPO or not, and allows you to earn some additional ENCS tokens for signing distribution transactions. It starts on March 13. Mark the date!

ENCOINS token generation and distribution follows the scheme from one of our previous blogs: https://encoins-crypto.medium.com/fully-decentralized-token-distribution-on-cardano-9d7317d8de6. The event consists of two phases: token minting and distribution.

In the first phase, participants mint their own version of the ENCS token. It will require one transaction per participant. On March 18, the ENCOINS community on Discord will decide which version to pick by voting. The choice is purely esthetical.

The second phase (i.e., the actual distribution) starts immediately after the voting. Participants submit distribution transactions until all tokens are distributed to their rightful holders. Every distribution transaction sends the corresponding amount of ENCS to one of the addresses from the list of ENCS token holders. Each transaction costs between 2 and 2.1 ADA based on our simulations. In return, you get a reward of 100 ENCS.

By participating in the decentralized token distribution event, you help get this project running on the mainnet in a fully decentralized way. The community and the team thank you for that!

ISPO participants will receive their tokens regardless of whether they are participating in the event or not. Participation is rewarded with additional tokens.

The whole process is implemented as a Plutus smart contract. Participants first agree on the distribution parameters. Once it’s done, there is no possibility of cheating and deviating from the chosen distribution. Participants run the Distribution App concurrently, while the whole process is sequential. As a result, the number of transactions each participant gets to sign depends on the total number of participants and luck. Setting up and running the Distribution App requires some technical knowledge. The team will be answering questions on Discord throughout the event.

Prerequisites

  • System requirements: 64-bit Linux OS, a processor capable of running Cardano Node, 16 GB RAM, 280 GB of disk storage, and a broadband Internet connection.
  • Basic system administration skills.
  • 1–3 days of running time to fully synchronize Cardano Node and Kupo from scratch.
  • Some ADA to pay the transaction fees.

Installation

This guide is written for a clean Ubuntu 22.04.2 LTS system. If you use a different Linux distro or already have a fully synchronized node, modify the steps accordingly.

Make sure that your machine is well-protected. You may want to check this guide for SPOs.

Installing the Glasgow Haskell Compiler and Cabal

Follow CoinCashew’s guide. In step 6, choose GHC 8.10.7. In step 7, choose Cabal 3.6.2.0.

Installing Executables

To install additional libraries needed for Plutus, type:

sudo apt install liblzma-dev
sudo apt install libpq-dev

Create a folder for the executables:

mkdir ~/.local/bin
source ~/.profile

To compile and install Cardano Node, type:

cd ~/git
git clone https://github.com/input-output-hk/cardano-node.git
cd cardano-node
git checkout 1.35.5
cabal update
cabal new-build cardano-node cardano-cli
cp dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-node-1.35.5/x/cardano-node/build/cardano-node/cardano-node ~/.local/bin/
cp dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-cli-1.35.5/x/cardano-cli/build/cardano-cli/cardano-cli ~/.local/bin/

To confirm that Cardano Node v1.35.5 is correctly installed, type:

cardano-node --version
cardano-cli --version

Download the precompiled executable of Cardano Wallet from here. Unpack the Linux version and copy cardano-wallet into a folder in the $PATH variable. To confirm that it is installed correctly, type:

cardano-wallet version

Next, download the precompiled Kupo executable from here (version 2.3.4). Copy kupo into a folder in the $PATH variable. To add the execution right, type:

chmod +x ~/.local/bin/kupo

Finally, to build and install ENCS Distribution App, type:

cd ~/git
git clone https://github.com/encryptedcoins/encs-distribution-app.git
cd ~/git/encs-distribution-app
./build.sh

To verify that Kupo and ENCS Distribution App are on $PATH, type:

which kupo
which encs

Preparing for the Distribution Event

To clone our configuration repository, type:

cd ~/git
git clone https://github.com/encryptedcoins/encoins-tools.git

To start Cardano Node, type:

cd ~/git/encoins-tools/mainnet/scripts
./node.sh

To start Kupo, type (in another terminal):

cd ~/git/encoins-tools/mainnet/scripts
./kupo.sh

The above commands will start synchronizing Cardano Node and Kupo, respectively. This requires downloading the whole Cardano Blockchain and building the Kupo chain index. You will need about 280 GB to store all the data (yes, we know, it is a lot).

Important: Depending on your machine, it could take from several hours up to three days to fully synchronize the node and Kupo.

If you already have a synchronized node (or maybe even Kupo), you just need to change the respective lines in node.sh and kupo.sh to point to the correct locations.

Now you need to create a clean Cardano wallet (specifically for the event). We recommend using wallet software that displays information about the available UTxOs in your wallet, such as Eternl.

Next, fill in the wallet.json file with your clean wallet’s seed phrase. To edit wallet.json, type:

cd ~/git/encoins-tools/mainnet/wallets
nano wallet.json

You will need to send some ADA to this wallet before the event. We strongly recommend not keeping more than 100–150 ADA on it. You can top it up during the distribution process if needed. After the event, we recommend withdrawing ENCS and the remaining ADA to a regular wallet.

Participating in the Distribution Event

The event consists of two phases: token minting and distribution.

PHASE 1: Token minting.

To make sure that you have the latest version of the Distribution App, type:

cd ~/git/encs-distribution-app
git pull
./build.sh

To update encoins-tools, type:

cd ~/git/encoins-tools
git pull

It will update the file distribution.json to match the finalized token distribution.

To edit the encs-params.json, type:

nano ~/git/encoins-tools/mainnet/apps/encs/encs-params.json

Now you need to enter an unspent output from your wallet. For example, in Eternl, you can navigate to the UTxO tab, then copy the transaction ID into the “getTxId” field and the output index into the “txOutRefIdx” field (see Figure 1).

Unspent outputs in Eternl wallet

The resulting file should look like this:

[{ "txOutRefId"  : {"getTxId" : "0c95054d534007c698f064f1fddceb0886405caaae375a7ab3ef8504b6d5b183"}
, "txOutRefIdx" : 2
},
15000000000000]

Now, you are ready to mint!

Open four terminals (or use tmux for convenience). To start the node, type:

cd ~/git/encoins-tools/mainnet/scripts
./node.sh

To start Kupo, type:

cd ~/git/encoins-tools/mainnet/scripts
./kupo.sh

To start Cardano Wallet Backend, type:

cd ~/git/encoins-tools/mainnet/scripts
./wallet.sh

To load your wallet into Cardano Wallet Backend, type (in the fourth terminal):

cd ~/git/encoins-tools/mainnet/wallets/
./load_wallet.sh

Wait until all three applications are synchronized. To mint the tokens, type:

cd ~/git/encoins-tools/mainnet/apps/encs
encs setup

By checking the wallet, you will see the transaction that mints the tokens and sends them to a script. The transaction costs about 2 ADA. No reward, but you get to mint the tokens!

During this phase, every participant mints their own version of the ENCS token. At the start of Phase 2, the ENCOINS community on Discord will decide which version to pick by a vote. The choice is purely esthetical.

PHASE 2: Token distribution.

For this phase, you may want to check the updates on our Discord server. The official start time is 18:00 UTC on March 18. Immediately after the community vote, an update to encoins-tools (with the final encs-params.json) will be pushed. The final parameters will also be posted on Discord by a team member. To update encoins-tools, type:

cd ~/git/encs-tools
git pull

Important: It will download the final encs-params.json file according to the community vote. You should check that the contents of encs-params.json is the same as posted on our Discord server by a member of the team!

Now, you are ready to distribute!

Open four terminals (or use tmux for convenience). To start the node, type:

cd ~/git/encoins-tools/mainnet/scripts
./node.sh

To start Kupo, type:

cd ~/git/encoins-tools/mainnet/scripts
./node.sh

To start Cardano Wallet Backend, type:

cd ~/git/encoins-tools/mainnet/scripts
./node.sh

To load your wallet into the Wallet Backend, type (in the fourth terminal):

cd ~/git/encoins-tools/mainnet/wallets/
./load_wallet.sh

Wait until all three applications are synchronized. To start distributing the tokens, type:

cd ~/git/encoins-tools/mainnet/apps/encs
encs run

You can monitor the process using, for example, a hot wallet. The transactions will appear if they are accepted by the Cardano Network. You can check that you have received 100 ENCS in a transaction, spent about 2 ADA, and that the token you distribute has the same exact policy ID and asset fingerprint as specified on Discord.

The app continuously submits transactions until the distribution is completed. If you want to stop submitting, just close the Distribution app. When all tokens are distributed, you will see the message “The distribution is completed”.

And that’s it! Fingers crossed for the first completely decentralized token distribution event to go smoothly! Best of luck in distributing the tokens!

After the event is complete, all ENCS tokens should end up in the hands of their respective owners.

We did all we could in terms of testing and preparation for the event. Please, do acknowledge the following disclaimer.

DISCLAIMER:

  1. The issuing and distribution of ENCS tokens are done by the ENCOINS community.
  2. The distribution list is the result of community consensus.
  3. ENCS token is a utility token that helps run the ENCOINS protocol. The original team never advertised it as an investment. There never was an expectation of profit.
  4. There is no expectation that the original team will continue to develop and maintain the protocol. The published roadmap is merely a proposal for the future development of the protocol.
  5. This is experimental software. The original team is not responsible for losses due to a potential malfunction in the software.
  6. By running ENCS Distribution App or accepting ENCS tokens, you agree with this disclaimer.

--

--

No responses yet