Smart Contracts vs. Smart Chains: Sept 18, 2018 Tech Tuesday Update

Komodo Team
Komodo Team

Smart Contracts vs. Smart Chains: Sept 18, 2018 Tech Tuesday Update
Table of Contents
Table of Contents

Everyone knows what smart contracts are and how they work but not so many people are familiar with Smart Chains. In this Tech Tuesday Update, we will cover the differences of smart contracts vs. Smart Chains.

Smart Contracts & Antara Modules Testing Service

The notary node operator blackjok3r has made a set notary node testnet scripts for the KMD Labs Discord channel’s ongoing testing. As we learned from the KMD Labs & PIRATE AMA on Monday 10th September, the purpose of these test notaries is primarily to allow for cross-chain interop fungibility between KMD Labs chains for week-to-week testing.

The KMD Labs chain doesn't just serve the Komodo community, it also serves dApp developers and dApp platforms by giving them a service to publicly test their creations with a dedicated and experienced team of testers, as well as exposing the functionality of new products to the the ever-growing Komodo community.

It's important to emphasize that Komodo’s Antara Framework allows much more than just simple smart contracts.  In fact, when comparing smart contracts vs. Smart Chains, this is one of the biggest differences. Smart Chains come equipped with the Antara module library, which offers a wide selection of powerful modules that can be activated on demand. Options include oracles, tokens, Dilithium quantum security, stablecoins, instant micropayment channels, and more. Modules never require gas fees. Instead, they just require payment of one ordinary transaction fee, which is paid in the Smart Chain's native coin.

As we’ve been learning from Komodo's Lead Developer James’ demonstrations and explanations through these early development phases, a developer using Komodo’s technology can handle an unimaginable number of ways of integrating a UTXO based system of conditions, fulfillment and rulesets to manage your own ways of achieving consensus for a given application.

Oracle Price Feed dApp Not Only For BTC Prices

Testing continues on the Antara framework. Last week's Tech Tuesday update introduced the Oracle Antara module which puts off-chain data on-chain. This is just one of many Antara Modules still in development and testing.

How do you speed up testing? Automation. There are already integration tests for some of the existing Antara modules for tokenized assets, rewards and the simple dice betting module.

Testing oracles at this stage is not automated to that extent due to the heavy development focus. The Oracle Antara module is being tested against a trustless price feed module and a payment gateways module. More of this will be covered in later weeks.

However, because oracle data can contain dozens of combinations of data types, the test team made a simple oracle dApp to facilitate their testing and reduce human input errors. The utility app takes a bitcoin price feed and saves it to the blockchain for use in other Antara module tests. The first surprise of this week though is this is how easy it is to compile the oracle utility dApp:

  1. Compile oraclefeed sourcecode

gcc oraclefeed.c -lm -o oraclefeed

  1. Execute oraclefeed binary

./oraclefeed

The next surprise, which followed shortly after, came when James 'jl777' Lee said oracle_dapp is NOT only for btcprice feed. I used it for posting merkleroots and processing withdraws.

Merkleroots...of what? Hashed data. The first thing I can think of is a verification or “source of truth” for some decentralized data like IPFS hosted files for example.

Instant Blockchain Payments Secured By Bitcoin’s Hashrate

Yet another powerful Antara module that is currently in testing is the Payments Channels module. This module allows two addresses to establish a direct channel between the two, which allows both 0-confirmation instant payments, as well as very low fee micropayments. It makes it practical to send, say, $0.25 worth of coins to someone, without having to pay more than the transaction itself in fees.

These 0-confirmation payments are also extremely secure, as they are protected by Komodo's delayed Proof of Work (dPoW) security mechanism prior to being mined in a block. Imagine sending a transaction to the mempool and it cannot be double-spent.

This is the solution created by Komodo Dev Mihailo Milenkovic, who is the first person to create a working Antara module apart from jl777. Mihailio opened up a channel (yes, an on-chain channel and technology very similar to Lightning Network) with 100 payments with a value of 10000 satoshis in each payment, and spent one to make certain it worked.

The very basic explanation in three steps is:

  • Set up a payment channel with your denominations (10k satoshi in this case)
  • Optionally, wait for the payment channel to be notarized by Komodo onto Bitcoin for bitcoin level security
  • Send out transactions to those payment channels to be spent like any other type of transaction, one at a time or in multiples, to the destination of your choosing

If you need to send 50k satoshi, authorize the release of 5 of those 10k payments by sending the the payment details to the person’s destination address.

If you really want to read more about how this Payment Channels Antara module works in relation to being an alternative to Lightning Network, as well as overcoming standard protocol level problems like blockchain reorganization, chapter 10 of the “Mastering Crypto Conditions” text goes into a lot more detail.

This technology is so new, the RPC commands to make it happen are still not in the project’s main source repository. I, or someone on the Komodo team, will do my best to present a working demonstration of this technology as early as practically possible.

zk-SNARK only blockchain - PIRATE

The purpose of zk-SNARK technology is to enable privacy in transactions. The technology came out of the Zcash project (which is a bitcoin fork), of which Komodo is a source code fork. Komodo has disabled z-transaction functionality on the KMD chain but zero-knowledge privacy remains one of the 18 different ways you can customize your Smart Chain with Komodo. Any project that launches a Smart Chain with Komodo can choose their own privacy settings, which includes disabled privacy, optional privacy, and mandatory private transactions.

Pirate Chain was the first Smart Chain to customize the chain such that private, zero-knowledge proof transactions are mandatory. The anthropological or genealogical view of PIRATE is BTC > ZEC > KMD > PIRATE.

The discussion topics in the last week revolved around:

  • The emission rate of new coins over the next 3 years
  • The ZEC announcement of sprout to sapling release and what it means for PIRATE which does not allow for transparent transactions
  • Full node wallet possibilities

Smart Contracts vs Smart Chains

Now that we've covered some information about the options available to all Smart Chain projects, let's do a quick review.

Smart Chains are completely independent. Each Smart Chain has its own decentralized network and coin. Smart Chains are secured with the power of the Bitcoin hash rate via Komodo's delayed Proof of Work (dPoW) security mechanism. Moreover, Smart Chains are scalable on-demand, as they can be tethered to other Smart Chains with Komodo's Multi-Chain Syncing technology.

Smart Chains are fully customizable. You can choose your consensus rules, pre-mine supply, block rewards, number of blocks between reductions in block rewards, the magnitude of reductions in block rewards, and, of course, your privacy settings, among many other options.

Finally, Smart Chains also come equipped with powerful dApps that don't require gas fees and run natively on the each node of the Smart Chain's network. The module options include things like oracles and instant micropayment channels, as well as tokens, stablecoins, and quantum security.

This all stands in sharp contrast to ordinary smart contracts. If you use a smart contract platform to launch your dApp or make your tokens, then you do not have your own blockchain. Instead, you are simply paying to use someone else's blockchain. Or, more precisely, you are paying the nodes on the smart contract's network to process your code for a price, known as gas fees.

While this pay-to-play model doesn't sound so bad at first-- after all, it's just paying for a service-- the reality is that this model causes massive congestion. Since there is but one blockchain with one network, all third-party dApps and contracts must wait in line to use the chain. When congestion gets bad, it can take hours or even days for the network to process your code. It can also become extremely expensive to run your business. These limitations of smart contract platforms make Smart Chains a far superior choice.

If you want to customize and launch a Smart Chain now, you can do so with Komodo's Antara Composer. The Antara Composer is an easy-to-use web app that lets you customize and launch your Smart Chain in just a few minutes. If you need some help getting started, check on this blog post on how to make a blockchain with the Antara Composer.



Great! Next, complete checkout for full access to Komodo Platform Blog | En
Welcome back! You've successfully signed in
You've successfully subscribed to Komodo Platform Blog | En
Success! Your account is fully activated, you now have access to all content
Success! Your billing info has been updated
Your billing was not updated