Things move fast at Komodo Platform. That’s why the Komodo team has decided to release a weekly briefing to cover all of the progress the Dev Team is making. This series of posts is called the Tech Tuesday Updates.
In case you’ve missed a previous edition and want to catch up, you can find all the previous Tech Tuesday updates here.
How To Give Free Coins To Users In A Multi-Chain Architecture
In the wake of the Komodo cybersecurity team sweeping compromised addresses, the first round of funds reclamation via blockchain rules is already being fulfilled. A scheme to verify ownership of stolen keys uses on-chain & off-chain methods for reconciling data through this quick resolution through the support desk. This effective use of blockchain has enabled a community project to efficiently process claims.
The bespoke blockchain reclamation solution of distributing funds to users is a real world example of effective and efficient processing of business logic on a blockchain. The quick resolution has not been fully blockchain enabled and uses off-chain & manual verification. There are two reasons for this: there is a time of centralized control of funds & no designated time for full end to end blockchain testing.
The aforementioned quick resolution to funds reclamations is an example of a future multi-chain credit or refund system that can be integrated with an on-chain payments and disbursements module.
The rest of the article is using the templated blockchain solutions to give free coins to users which uses only the blockchain, and only native code for fast processing.
Example of Smart Chains Using Antara Rewards & Antara Faucet (With ROGUE gameplay in the middle of the green chain)
6 Benefits To Using Antara Modules To Give Free Coins Away
- Free access to blockchain resources
- Rewarding community holders
- Efficient processing, native code & on-chain
- Effective and provable
- No code required
- Language agnostic client applications
Free Access To Blockchain Ecosystems
In a November 2018 Tech Tuesday, we introduced the zero-fee dApp, linking to a response I made to an EOS validator who questioned the "usefulness of KMD to users when it hits $100, when transaction fees alone are $1 — how useful is this to a dApp?" The first answer is sovereignty. dApp developers use their native coin on their own blockchain, so there is no reliance on KMD nor the price of KMD.
A second answer is tokenomics! Using coins solely as a transaction mechanism and thus worthless, but the value held in the tokens of the multi-chain ecosystem - exactly like ERC20 tokens being valuable, but without the transaction or gas fee model or the uncertainty of the future developments of the underlying blockchain.
Using Faucets
Another answer is that blockchain applications may not necessarily have any monetary value but are used for record keeping, especially in a multi-chain architecture where only one or two chains have value and the other chains facilitate state changes in a network application. This is the model used by several prominent multi-chain platforms, including Hyperledger.
In a HL network, a client sends a proposed transaction to an endorser for endorsement. This endorsed transaction has no value, but it allows for the state change of the application to be recorded by the HL ordering service and broadcast to peers (e.g. filling a block in a multi-chain environment).
Using Rewards & Faucets
Yet another scenario is that the coin is valuable and becomes central to the project's multi-chain ecosystem. This is an economic question rather than a technical question and depends on the services in the multi-chain environment and what the services these particular blockchains provide.
For projects that want to promote monetary value for their coins, giving a small amount away to users can be a strategic move that gets more people involved and increases the number of stakeholders. However, at the same time, giving free coins away may suppress perceived monetary value.
Developers can counter this price limitation by encouraging stakeholders to store and hold their coins (as opposed to dumping them on an exchange). Masternode networks are the most prominent example of incentivizing long-term stakeholders to hold a currency.
With Komodo’s Antara framework, the Rewards module allows the users of a network to lock coins away in some kind of membership rewards scheme. It serves the same purpose as masternodes but doesn’t give individual users any special powers. Follow the technical guide for deploying and using the Antara Faucet module or the Antara Rewards module to learn more.
Policy = Blockchain Rules = Consensus = Antara Modules
Again looking at Hyperledger applications, we can see that endorsed transactions follow an endorsement policy. Similarly, for an application built on Komodo's multi-chain offering, the “policy” (consensus rules) of distributing coins to new users can be done with an Antara Faucet Module. The default “policy” of an on-chain faucet is new users can get 0.1 COIN each time they query the faucet. This allows 1000 transactions to be sent if using the default smart chain transaction fee of 0.0001. The default policy of the faucet (the blockchain rules) are that a new user can get 0.1 COIN from the faucet a maximum of 5 times.
The ROGUE blockchain game has shown how to effectively bootstrap the users into a blockchain game environment. When a user starts the game, the application logic checks the user’s wallet. If there is no balance and no transactions, the user can ask the faucet for funds. This is a simple concept that has been used in the past with faucet applications that run on a web server with a separate wallet that can achieve the same result.
Example of ROGUE proof of gameplay initial funding & trading the non-fungible tokens that represent a player's character on the TokenDEX
The overheads saved by an on-chain faucet application are:
- No centralized attack target
- No separate web or other application
- No updates to the external application
- No external hosting requirements
- No additional security policies
- No reliance on a human to monitor & top up the external application
- No reliance on maintaining scripts written by an external developer
The same solution can be applied to any application. Below, we follow the fundamentals of funding a faucet and for a user to get funds from the faucet.
Creating A Smart Chain + Antara Faucet
These are the actions to take to create a smart chain using a single host and utilize the on-chain faucet. The same logic applies to a global blockchain network - simply use two hosts to create a smart chain:
- Decide on chain characteristics with the -ac_cc parameter set between 2 & 99 for a multi-chain environment
- Create a seed node
- Import private key to the seed node
- Create a mining node
- Import private key to mining node
- Start mining
The first 128 blocks will be mined within 2 hours (depending on the parameters used for your blockchain). If left to the defaults, the smart chain will only produce blocks on demand, i.e. only when there are transactions to process.
The initial pre-mine coin supply will go to the mining address. These funds will be used to create a faucet, which the seed node can use to claim 0.1 COIN.
- Query to faucet to see the balance of zero using faucetinfo
- Fund the faucet using faucetfund command
- Wait for the transaction (1 block) to be confirmed
- From the seed node, get 0.1 COIN using faucetget
- Wait for the transaction (1 block) to be confirmed
- Query the balance from the seed node or list the unspent outputs with getbalance or listunspent RPC methods
Creating A Smart Chain + Antara Rewards
Using the same formula as the faucet, these are the actions to take to create a smart chain using a single host and utilize the on-chain faucet. The same logic applies to a global blockchain network - simply use two hosts to create a smart chain:
- Decide on chain characteristics with the -ac_cc parameter set between 2 & 99 for a multi-chain environment
- Create a seed node
- Import private key to the seed node
- Create a mining node
- Import private key to mining node
- Start mining
The initial pre-mine coin supply will go to the mining address. These funds will be used to create a rewards plan.
- Create a rewards plan by defining it with the following parameters using rewardscreatefunding
- Name of rewards plan
- Amount in the fund to reward users locking funds
- APR (annual percentage rate)
- Minimum duration for locking funds
- Maximum duration for locking funds
- Minimum deposit
- Fund the rewards plan that will pay users for locking funds using rewardsaddfunding
- Users can now deposit native coin funds into the rewards plan. Typically a developer will make a GUI or integrate this function into an application. The RPC method to call is rewardslock
- After at least the minimum lock time (specified at rewards plan creation), the locked funds will accrue some rewards. The users can unlock their funds by providing the locking transaction id with the rewardsunlock RPC method, typically a developer will integrate this functionality into an application or wallet of the rewarding ecosystem
- Without a locking txid set, the rewardsunlock RPC method will unlock all rewards
So that is the basic workflow of both methods a project can use to give free coins to their users as bootstrap funds, incentives & rewards to align with the projects’ goals.
📧Komodo Newsletter
If you'd like to learn more about blockchain technology and keep up with Komodo's progress, subscribe to our newsletter. Begin your blockchain journey with Komodo today.