Posted 25th enero 2023

Understanding the Kinesis Blockchain

understand how the kinesis blockchain works

When the concept of the Kinesis Monetary System was originally conceived, Kinesis required a state-of-the-art blockchain that had great community support, was flexible, was low cost to operate and transact upon and was able to support the unique aspects of the Kinesis Monetary System – specifically around the way the network fees and yields were managed. 

Kinesis chose the Stellar network as it provided everything we needed in order to implement the unique fees and yield structure into the blockchain.

To understand how the Kinesis Blockchain works there are a few concepts you need to familiarise yourself with:

2) Unlike an ERC-20 token, Stellar is a ledger-based system, and as of version 17 (our current version), it doesn’t support Smart Contracts.  Therefore, there are a number of accounts that form part of the Kinesis Blockchain.

3) The Stellar blockchain has a Root account, which is where the specification of the blockchain is defined and all the tokens that will ever be issued are held until distributed. 

https://github.com/stellar/stellar-core/blob/master/src/ledger/LedgerManagerImpl.cpp#L93

Therefore, the core accounts for the Kinesis blockchain are:

  • Root account – Holds all the tokens that will ever be issued.
  • Emission account – Treasury account to hold the reserve tokens.
  • Hot Wallet – Exchange transactional custodial account.
  • Cold Wallet – Exchange external custodial account.
  • Fee Pool account – Holding of fees before yield distribution.

Calculating the Coins in circulation

As outlined above, Stellar does not have a burn function, therefore to calculate the coins in circulation, sum up the coins minted and minus the coins redeemed.

Total coins in circulation = SUM (‘Coins Minted’) – SUM (‘Coins Redeemed’)

Coins Minted – Are the transfers only from the Emission account to a non-root account?

Coins Redeemed – Are any transfers from Hot Wallet back to the Emission/Root account?

How to validate the token supply of KAU and KAG? 

When your horizon service is up and running, you can query total coins in circulation via http://<HORIZON>:<HORIZON_PORT>/coin_in_circulation endpoint. It will show you the total minted, total redemption and current total coins in circulation.

If you have SQL and database skills, you can directly query your horizon database when fully ingested. We have open sourced the following: the SQL query we use to display the data in the explorer:

https://github.com/bullioncapital/kinesis-horizon/blob/main/services/horizon/internal/db2/schema/migrations/54_kinesis_coin_in_circulation.sql

When you query the horizon coin_in_circulation endpoint via the browser you will get the following response showing the ingest_latest_ledger and the records for mint, redemption and circulation data.


Please note: You will need to have a fully synced node from ledger 2 in order to get accurate coin-in-circulation. Also, when you quote the number make sure you add a Blockchain reference (see highlighted fields above).

How do we process the fees?

Blockchain Fees

When transactions are completed on the blockchain, a fee is paid by the sender, which accumulates in the ledger header. These fees are then distributed to participants in the Kinesis ecosystem on a periodic basis (currently monthly) based on their activity. A process occurs each month called ‘inflation’ where the fees from transactions are sent to an account within the KMS to be distributed as a yield.

Some fees that are generated and stored in the ledger header may not be distributed and are returned back to the emission account. Examples include when fees are paid to return coins back to the treasury account as part of a redemption or when fees are paid from the root or emission account usually generated from the emission of new coins. 

This is because the minting transaction on the blockchain is an operational transaction to send the coins to the customer and is not intended to generate fees. Any fees related to the minting of the coins would be collected through the mint as outlined below.

Mint application fees

Whenever coins are minted by users through an account on the Kinesis Mint, a USD fee is charged. The USD fees are converted proportionally to KAU and KAG daily and added to the fee pool directly.

KMS fees

A 0.22% execution fee is charged to all exchange order executions, which is collected and sent to the fee pool using the Inflation mechanism described below. Other fees that get included here are the card fees, Kinesis Pay fees etc.

Why do some accounts appear not to get paid a yield?

Why does Kinesis use the Stellar Inflation feature?

Why do we run two different Networks KAU & KAG?

Unlike the Stellar Public chain where users can issue their own asset (non-native asset), the Kinesis Blockchain is intended to be used as a single asset network or native asset. 

By having a native asset it provides us with two specific benefits:

  • Have transactions in a native currency KAU (Gold) or KAG (Silver).
  • We can collect the transaction fees in the native currency e.g if you transact KAU, we collect fees in KAU.

Are all the Kinesis accounts shown on the blockchain?

However, if customers deposit or withdraw using the KMS, distinguishing the balances of those accounts may not be possible just by looking at the blockchain. This is because where funds are deposited in the KMS, the amounts may be transferred to and from the hot wallet (custodial account) which operationally allows withdrawals more seamlessly. 

Open or Closed Source?

Kinesis embraces open source and we publish all of our code for the blockchain on our publicly available git repository.

We encourage developers and anyone interested to check out the blockchain code: