custom assets
In order the issuers to distribute a custom asset or token under the supervision of the anchor on the Kuknos Network, Four unique accounts will be used. First, is distribution control account , which is owned by anchor ,by this account kuknos network ensures that asset issuing is under control and each issuer comply with legal principles of asset issuing, distribution control accounts is declared to the kuknos foundation and owned by anchors .distribution accounts are listed under root account. Second, is the source account. The source account is the account of the entity looking to create a new token. Third is the issuing account. The issuing account is created by the source account as a mechanism to create new tokens. The Forth account is the distribution account. The goal of distribution account is to act as the mechanism for distributing tokens to the public.
Most of the Kuknos documentation is centered on financial institutions as anchors. An anchor is an entity that acts as a bridge between existing currencies and the Kuknos Network, and involves setting up systems like a compliance server and a bridge server. It is not necessary to become an anchor in order to create custom assets and tokens on the Kuknos Network.
The following presents a breakdown of the transactions required to the issuers create a custom token. The transactions can be translated to API requests or can be executed using Kuknos Laboratory.
Steps
Transaction 1: Create the issuing account
Account: source account
Operations:
- Create Account: create issuing account in system
- starting balance: minimum balance + transaction fee
Signers: source account
Transaction 2: Create the distribution account
Account: source account
Operations:
- Create Account: create distribution account in system
- starting balance: minimum balance including trustlines
Signers: source account
Transaction 1 and Transaction 2 are submitted to the network by the token creator. This creates the issuing and distribution accounts and gives the source entity access to the public and private key of each account. The issuing account is funded with minimum balance with no entries. It is given additional money to handle the transfer fee of transferring the assets at the end of the escrow agreement, and additional money to handle the fee of transferring the assets to the distribution account. The distribution account must be funded with the minimum balance with one entry, as it will need to create a trustline (an entry) in the future. The starting balances are the minimums need in order to make the accounts valid on the Kuknos Network – the actual amount used to create the two accounts can be any amount, as long as it’s larger than the minimums. The distribution account can start off being funded with the minimum balance without entries, but the next transaction will create a trustline for the account, thus raising its minimum balance.
Transaction 3: add distribution control to root account
Account: root account
Operations:
- Manage Data: adds distribution control to root account
Signers: root account
Transaction 1 ,2 and 3 are submitted to the network by the token creator. This creates the issuing ,distribution control and distribution accounts and gives the source entity access to the public and private key of each account. The issuing account is funded with minimum balance with no entries. The distribution account must be funded with the minimum balance with one entry, as it will need to create a trustline (an entry) in the future. The starting balances are the minimums need in order to make the accounts valid on the Kuknos Network – the actual amount used to create the two accounts can be any amount, as long as it’s larger than the minimums. The distribution account can start off being funded with the minimum balance without entries, but the next transaction will create a trustline for the account, thus raising its minimum balance.
[IMPORTANT] once the anchor created a distribution control account (operation 1 of transaction1) and added it to the root account (transaction2), it does not need to create new distribution control and add it to root account. it can use the same distribution control account for its next accounts.
Transaction 4: Creating Trust
Account: distribution account
Operations:
- Change Trust: create a trustline to the issuing account
- asset: asset code format
- code: asset code
- issuer account: issuing account
- trust limit: max tokens
- asset: asset code format
Signers: distribution control account signers
Transaction 4 consists of a change trust operation, its source is distribution control account and the destination account is issuer account id .it is worth mentioning that any change trust to unprecedented asset (asset that is not issued on network yet) should be originated from distribution control account.
Transaction 5: Asset Creation
Account: issuing account
Operations:
- Payment: give the distribution account the tokens
- destination: distribution account
- asset: asset code format
- code: asset code
- issuer account: issuing account
- trust limit: tokens to be created
Signers: issuing account
If asset issuer account has enabled it’s auth required flag, this means that issuer must approve with ownership of specific account to its issued asset. If that is the case ,issuer should allow distribution control to have asset.
Transaction 6: Asset Creation
Account: issuing account
Operations:
- Set Option – Home Domain: set home domain of kuknos.toml
- home domain: domain location
Signers: issuing account
Transaction 6 is created and submitted to the network. The domain location should be set to the domain that is hosting your kuknos.toml file (which contains metadata regarding your token).
At this step, a kuknos.toml must be created and hosted on a domain of choice. The kuknos.toml file should contain metadata relevant to the token being created. Maintaining a kuknos.toml file is important, as it provides transparency for the asset and its usage.
A standard kuknos.toml declaration of an asset should contain the following for each asset issued (all values in curly brackets are variable, and should be filled in):
[[CURRENCIES]]
code="{asset code}"
issuer="{public key of issuing account}"
display_decimals={integer}
The field display_decimals represents the maximum decimal place that should be displayed by clients (wallets, exchanges, etc) on their user interface.
Other fields that can be included in the kuknos.toml file include:
name="{name}"
desc="{description of asset}"
conditions="{conditions for usage and distributions of the asset}"
image="{url of an image to associate with the asset}"
(OPTIONAL) Transaction A: Limit Token Supply
Account: issuing account
Operations:
- Set Option – Thresholds & Weights: remove all weights and thresholds
- master weight: 0
- low threshold: 0
- medium threshold: 0
- high threshold: 0
Signers: issuing account
Transaction A is created and submitted to the network by the issuing account. By setting the weights and thresholds all to zero, this creates a lockout scenario. All keys, including the master key of the account, will become invalid keys. Locking an account prevents any further transaction to be created using this account, consequently meaning that no more tokens can be created. The XDR form of this transaction can be published once submitted to show proof of the account being locked.
WARNING: AFTER CARRYING OUT THIS STEP YOU CAN NO LONGER CREATE NEW OPERATIONS OR SUBMIT NEW TRANSACTIONS WITH THE ISSUING ACCOUNT. THIS STEP IS FINAL.
Transaction 6: Token Distribution
Account: distribution account
Operations:
- Manage Sell Offer: create an offer to sell the created tokens
- selling: created asset code format
- code: asset code
- issuer account: issuer account
- buying: asset code format
- code: asset code
- issuer account: issuer account
- amount: amount to sell
- price: sale price in paymons
- offer id: 0
- selling: created asset code format
Signer: distribution account
Transaction 6 is created and submitted to the network by the distribution account. In this step, the created asset is being sold for a different asset. The different asset could be another created asset, a fiat currency, a cryptocurrency, or paymons. If the offer id is set to zero, a new offer is being created. The amount is the price of 1 unit of asset to be sold (selling) in terms of the asset that is being bought (buying).
By submitting Transaction 6, the created token will be listed on the Kuknos Network’s decentralized exchange. In order to be listed on exchange clients like Kuknos Term and Kuknos Port, please refer to their websites for listing instructions. It’s encouraged to be listed on exchange clients to increase visibility.
Additional Examples:
Examples for some of the transactions and more about issuing assets can be found here. In addition, this article](../assets) provides more in-depth explanations of key terms regarding asset creation. A preliminary guide that walks through explaining token creation using Kuknos Laboratory is available.
Resources:
- Minimum Account Balance Calculation – Kuknos.org
- Concept: kuknos.toml – Kuknos.org
- Concept: Trustlines – Kuknos.org