For the developer wishing to build your own blockchain using Komodo's software we recommend the following approach.
Assumptions for this Documentation
Before we get into specifics, we need to cover a few assumptions we make about our readers.
We're going to start by assuming that you have a general idea of what a blockchain is.
If you're not familiar, we recommend that you read Part I of our white paper. It explains what a blockchain is, why blockchain technology is significant, the basic idea of how it works, and why you should care.
We're also going to assume that you are comfortable programming in at least one mainstream language. Technically, Komodo can work with any language, but there are some things to keep in mind before you get too excited. Find out more about languages on Komodo here.
If you're not yet a programmer, but you're interested to make a career in the blockchain revolution, welcome! The open-source nature of Komodo and our enthusiastic community make this a perfect place to begin your journey. We recommend that you come to our Discord channel and discuss your goals with our community members. We look forward to meeting you!
Visit Us in Discord
We encourage you to come to our Discord channel, and to come by frequently throughout your discovery process.
We are a deeply engaged and highly enthusiastic open-source blockchain community, always ready to get creative with like-minded people.
Ask questions in our Discord channels, such as
#cryptoconditions, and others. Team and community members are usually available to assist you.
The Basic Concept of Komodo
A Komodo-based blockchain, called an "asset chain", is a fully independent blockchain that is forked from Komodo technology and has the option of using Komodo's many services, including Komodo's security and scalability.
We use the term, "asset chain," because the coins in the blockchain are assets owned by you and your blockchain's users.
Komodo's unique combination of technology grants businesses and developers an increased level of freedom.
In Komodo, You and Your Users Get A Blockchain All To Yourself
There are many advantages to using the Komodo framework over other blockchain platforms.
One important thing to point out is that, at this time, a Komodo-based asset chain is unlike anything else currently available on the blockchain market.
Most other blockchain platforms run a layer-one blockchain; the journeyman developer runs their smart-contract code in a virtual machine, or on a side chain, which runs on top of the layer-one chain. The developer's assets are not full blockchain coins, but rather only tokens, also called colored coins, that are bound to the limitations of the parent chain. In many circumstances, your end-users pay gas and transaction fees in the coin of the layer-one chain, regardless of your end-users' objectives.
Lets compare a blockchain platform to a vehicle. With those other blockchain platforms, it is as though you are paying to ride in their car, you pay a very high price for that seat, and your end-users have to sit in your lap.
In Komodo, you get the whole car all to yourself. Add any features you want, change whatever you like, and even import the open-source designs from other blockchain ecosystems.
All that is required is that you keep the basic Komodo blockchain framework in place, as it facilitates your connection to the security of the Bitcoin hash rate that we provide, and also your connection to other Komodo asset chains and features.
No Gas/Transaction Fees
Unlike other blockchain platforms, on Komodo your end-users do not have to pay gas/transaction fees in KMD for each transaction. Instead, you get to decide what is required, and we feature many tools to facilitate your approach.
Limitless Scalability On Demand
Because your asset chain is its own independent blockchain, your scalability is limitless and is not affected by activity elsewhere in the Komodo ecosystem.
If another asset chain in the Komodo ecosystem has a sudden surge of activity, your asset chain does not slow down at all, as you are both on entirely separate blockchains.
On the other hand, if activity on your asset chain hits an extremely high rate and causes your chain to get congested, you can split your asset chain into two linked asset chains. Using this method, we have already proved that the Komodo ecosystem can run more than 40,000 transactions per second, and we are prepared to scale to 1,000,000 and beyond.
Your creativity is not limited by the mathematical constraints that affect other blockchain platforms, but instead only by hardware and your imagination.
If you want to write the first Uber-like dApp, Komodo is the platform for you.
Interoperability is a Cinch
Because our initial concept was to create a network of secure independent blockchains, we designed our network from the ground-up for interoperability.
For example, you can run as many asset chains as you want, and through our cross-chain burn protocol, you can burn coins or tokens on one asset chain and have them show up on another.
Or, maybe you want to write a smart contract that coordinates with a business partner's asset chain? Not a problem. Our technology allows you to monitor and update your chain's state and smart contracts using SPV technology to make observations of other asset chains and participating third-party blockchains.
What if you want to trade value directly with blockchains outside the Komodo ecosystem? We've got you covered. With our atomic-swap powered decentralized exchange, BarterDEX, you can swap coins with any blockchain that is based on either Bitcoin or Ethereum. We also have smart-contract technology that allows you to build decentralized gateways or bridges to other blockchain networks of your choice.
Built-in Zero-knowledge Privacy
Many blockchain platforms say they'll have privacy some day, but how and when they'll get there remains a mystery.
In Komodo, we knew privacy would be an essential feature for any developer with a good head on their shoulders. That's why we started our platform as a fork of Zcash (which is itself a fork of Bitcoin).
This allows us to provide built-in zero-knowledge technology, which is a special kind of privacy tech. Other types of privacy typically only attempt to hide your trail by blending your transaction history with other users. Those other types of privacy can protect you for some time, but not forever. Because your blended data is given to the public domain, as quantum-computing technology advances it will likely be able to unravel your currency trail -- and your privacy.
Zero-knowledge technology is much stronger. It moves your coins from one address to another with no data leftover in the public domain for later analysis. The way it works inside the blockchain engine is pretty complicated, but lucky for you, you don't have to worry about how it works. Just read Part IV of our whitepaper to make sure you fully understand the pros and cons of this privacy method, and then dive right in, using our built-in API commands.
Every asset chain has zero-knowledge privacy pre-installed, giving you the tools to protect both yourself and your end-users from people who just don't know how to mind their own business.
Your Blockchain's Engine Belongs to You
Having a blockchain all to yourself grants a competitive level of freedom to your creative endeavors.
The highly advanced developer that wishes to engineer your own consensus mechanism can move forward rapidly with your ideas, backed up with the hash rate of Bitcoin. You also have our consensus-level smart contract technology, Crypto Conditions, at your disposal, which can allow you to make adjustments to your consensus mechanism far more quickly.
Unlike other platforms, there is no need to wait for the Komodo team to update either the default daemon's functionality, or to update the main Komodo blockchain (KMD).
So long as we can audit, verify, and approve your changes before we pull them into our dPoW protective services, you are able to create at will.
Keep in mind, however, that in some cases, there may be an additional cost.
Discover What Others Create
On the other hand, a developer that does not wish to be a core blockchain engineer, but rather to spend their energy only on building decentralized applications (dApps), also receives benefits.
When an advanced blockchain engineer in the ecosystem creates a useful new concept or template on their own asset chain, they can choose to contribute this code to the default Komodo daemon.
Once accepted by the Komodo team, this functionality is then available to all developers throughout the ecosystem.
For example, one of the asset chains in our ecosystem, Verus, recently solved the Nothing-At-Stake problem that has long plagued Proof-of-Stake blockchains. They generously share their code with the rest of the ecosystem, and Verus Proof of Stake will be included in the default Komodo daemon for use by other Komodo projects soon.
Software Updates to the Daemon are Free
If there's one thing we've learned since we made our first atomic-swap in 2014, it's that blockchain technology is growing faster than any one person can possibly keep up.
There are many questions the blockchain industry faces over the next several decades. How will we approach encryption in the age of quantum computing? What will miners do as Bitcoin's block rewards decrease? How will software adapt to government interests?
The good news for you is that our team does a good chunk of the work for you. You freely receive the updates we create for your asset chain's daemon. This helps to keep your blockchain up-to-speed with many of the latest trends.
The Komodo Declaration of Independence
What if, someday, you decide you want to move elsewhere? We would be sad to see you go, but the freedom to leave is perhaps the most essential piece of Komodo's design. In fact, read our history, and you'll discover that this freedom is the reason why our platform exists in the first place.
Since your asset chain is a fully independent blockchain, there's no need go through the mess of manually transferring end-users' ERC20 tokens into a new blockchain or any other cumbersome departure. Just stop making payments for our security services, and you and your end-users can head off into the great beyond.
Many More Advantages to Discover
These are just a few (of many!) advantages that Komodo offers to our ecosystem developers.
If you want a deep dive into how the tech works, check out our full white paper here.
A Caveat for Daemon and Smart-Contract Developers
There is one caveat. Under most circumstances, only a highly skilled developer should make adjustments to the code that affects the internal workings of the default daemon. This caveat includes creating smart-contract templates using our technology.
For this reason, at this time our team is available to assist developers in writing smart-contract templates -- both those who wish to work outside the daemon and those who wish to work within it.
If you have an idea that you would like to make a reality on Komodo and you need assistance in writing a secure smart-contract template, please reach out to us. We are actively working to build up our library of smart-contract templates, and will therefore do what we can to help you safely code your smart-contract idea and add it to your daemon.
This offer is only available for a limited time, and only on an "as is" basis.
Over time, as the library of secure smart-contract templates increases, it is possible that the need to create new smart-contract templates will decrease. We also hope that a community of advanced smart-contract freelance developers will grow in our ecosystem, to facilitate Komodo's adoption.
The Cost of Running an Asset Chain
Simply creating and developing the asset chain for testing purposes does not require contact with or payment to the Komodo team.
However, in nearly all circumstances, an asset chain is only secure once it receives our dPoW connection to the Bitcoin hash rate (dPoW).
You can read more about how the security and payment are structured in the section on Komodo's dPoW security services.
In general, the cost for Komodo's security services is competitive. While the initial setup cost may or may not be higher than other blockchain platforms, the benefits that come from owning your own full blockchain, not having to pay KMD gas/transaction fees, and in being able to deploy unlimited smart contracts and ERC20-like tokens on your chain; can become a cost-saving advantage over time for both you and your end-users.
Please reach out to our team whenever you are ready to purchase dPoW. We will direct you to one of our service providers, and they can give you a direct quote for the annual cost.
We have a limited supply of early-adopter discounts. Please inquire while supply last.
A Brief Note About Languages
In considering the languages available in the Komodo ecosystem, there are two aspects to address: code that runs inside your daemon, and code that runs outside of it.
Code that runs inside the daemon is typically low-level, and working with this code requires strong experience. This low-level code may, for example, change the nature of your consensus mechanism, or provide a foundational smart-contract template that can be called from outside the daemon to be used in a dApp.
Code that runs outside the daemon can be high-level. A dApp that is built on existing smart-contract templates can exist entirely outside the daemon. It could consist of GUI's, back-end databases, and other non-daemon code and assets that make your dApp function.
In both circumstances, you are able to use whatever language you desire.
However, if you are working within the daemon, we currently recommend that you have a considerable amount of programming experience, and that you work primarily in C/C++. These are the native languages of the Komodo daemon. When making adjustments to your coin's daemon, other languages can be supported, depending on the circumstances. It may incur an additional cost. Please reach out to our team with your questions.
For anything that occurs outside of the daemon, naturally you may use any language that can throw an rpc call to your coin's daemon. Most common languages support this functionality. We are working to create wrappers for importing Komodo functionality into your workflow. If you have a language that is not yet available, we welcome you to create a wrapper and contribute it to our Github repository. Please reach out to us with your language-wrapper requests.
Install the Basic Komodo Software
So you've decided you want to take Komodo for a free test drive. Alright!
The next step is to install the software on your machine.
Follow through the instructions here, and return to this spot in the outline when you are finished.
Get Acquainted With komodod and komodo-cli
Now that you have
komodo-cli installed, skim briefly through the instructions on how to interact with a Komodo-based daemon, linked here.
You'll come back to this section later, once you're ready to execute rpc calls, API commands, and runtime parameters.
You do not need to launch or sync the main Komodo chain (KMD), and you do not need to own any KMD to test an asset chain.
Create Your First Asset Chain
komodo-cli installed you're ready to spin up an asset chain.
We recommend that you use the simplest of settings for now.
./komodod -ac_name=HELLOWORLD -ac_supply=777777 &
Execute Elementary RPC Calls
After you have your asset chain running on both nodes, we recommend executing some basic rpc calls in the terminal.
Here are links to some simple and common rpc examples:
Test Out Platform-Specific Features
We create many features, functionalities, and commands that are specifically designed for dApp and platform-oriented developers.
For example, you can learn how to make asset chains that are more complicated in nature.
Once you understand the concept, you can test a few asset-chain tricks -- like making your asset chain's consensus mechanism a mix between Proof of Work and Proof of Stake.
Discover CC Smart Contracts
Now you should be ready to head into smart contract territory.
Smart contracts on Komodo are a bit different (and if you ask us, a bit better too, but we're admittedly biased).
If you need to catch the general idea, read the section, Smart Contract Overview.
First, you must create an asset chain that has the ac_cc runtime parameter properly enabled.
With this activated, you can try a few existing templates:
- Create ERC20 tokens on your new asset chain
- Try using your built-in on-chain DEX
- Use the oracles smart-contract template to import real-world data to your blockchain, which can then affect blockchain behavior
Write Your Own Smart-Contract Templates
If you're ready to try writing your own customized smart-contract template, please read the detailed technical documentation written by our lead developer, JL777: Mastering Crypto Conditions.
Most developers don't need to design smart contracts on Komodo, but rather, only need to implement existing smart-contracts templates while developing a dApp. So don't be discouraged if the technical documentation appears too thick for your level of experience. Come to Discord when you have questions.
Learn About BarterDEX and Agama
You can learn more about both on docs.komodoplatform.com.
Visit Us in Discord
Once again, we remind you to come visit us in our Discord channel!
We appreciate your interest and hope to give you a pleasant developer experience.