Introduction to LikeChain

Table of Contents

The blockchain of LikeCoin ecosystem


In early July, you might notice that the transactions of LIKE were extremely slow that all of them still kept in the pending status after waiting for a few days. The reason for that was the high gas price in Ethereum.

What is gas price?

All the Ethereum transactions will be sent to the Ethereum miners to validate for you, and there is no free lunch — they need incentive to do so. Transaction fee is the incentive for the miners in this case. Every transaction requires a certain amount of computational power and such computational power will count in a unit called Gas. Therefore, the more complex of the transaction, the more the gas.

The senders set a gas price for the gas usage in terms of Gwei/gas each time before they send the transaction. For a typical Ether transfer transaction, it needs 21,000 gas to run. Say, if you state 1Gwei for the gas price, the transaction fee will be:

21000 * 1 * 1e9 (Giga) *1e-18 (wei) = 0.000021ETH

which is around US$0.0098 at the time of writing.

Why did the gas price rise?

As every transaction have a different gas price set by the sender, the miners, of course, will have their own strategy to maximize the profit for each limited size block. Intuitively, the higher the gas price is set, the higher the chance the miners will execute the transaction.

In 2018, there had been two significant incidents that generated a lot of transactions within a short period, and everyone wanted the Ethereum network to process his/her transaction in a short time so that it caused the gas price suddenly jump to a very high-level. The Ethereum network resulted in the serious traffic congestion that lasted longer than a week. One was the CryptoKitties (Jan 2018), and the other was the airdrop competition from FCoin (Jul 2018). Both of them led the average gas price had a sudden rise to over 80Gwei where most likely it should around 10~20Gwei.

Introduction to LikeChain
The gas price history in 2018 (up to July), from Etherscan

The CryptoKitties (Jan 2018) and… the airdrop competition from FCoin (Jul 2018)… led the average gas price had a sudden rise to over 80Gwei

Why are these associated with LikeCoin (LIKE)?

LIKE, in a nutshell, is an ERC-20 token from Ethereum which means every operation on LikeCoin is actually an Ethereum transaction in the backend. Therefore, the high gas price does affect the LikeCoin transactions.

Currently, you have a couple of use cases for LIKE, for example, get directly from like.co via LikeCoin coupon or LikeCoin bonus (create a LikeCoin ID and email verification), or peer to peer transfer LikeCoin from/to your friends.

Introduction to LikeChain
LikeCoin coupon (Chinese New Year Lai See from LikeCoin Foundation, 8 or 88 LikeCoins inside)
Introduction to LikeChain
You can try to transfer LikeCoin to here (to me😁)

But you may wonder why you do not need to care about transaction fee or Ether when claiming the LikeCoin coupon or bonus or even transferring LIKE to your friends? Yes, it is because we have some black magic, which we called Transfer Delegation, in the backend.

We have some black magic, which we called Transfer Delegation, in the backend.

Transfer delegation

For the LikeCoin bonus, LikeCoin Foundation will pay the transaction fee as we are the sender of the transaction. However, for the peer to peer transfer, we, LikeCoin Foundation, bear the transaction fee for you as we want to lower the entry barrier for the one whom first time play with crypto-currency.

Think about it, if you send LikeCoin to someone using typical Ethereum transaction, you need not only to set a gas limit and also the gas price but you also need to hold enough amount of Ether for the transaction fee. To simply send LikeCoin, you will need to understand the complicated concepts and manipulate two different crypto-currencies at the same time. This is too confusing for a newbie, right? But now, as we have the mechanism of transfer delegation, you just need to set the amount of LikeCoin you are sending and sign a signature in Metamask. We will pay the transaction fee for you, and the smart contract will execute your request, exactly following what you sign.

We will pay the transaction fee for you, and the smart contract will execute your request, exactly following what you sign.

How much has LikeCoin Foundation borne?

For a typical transferDelegated function call, it needs around 90,000 gas. Most of the time, we are using 10Gwei for the gas price which means the transaction fee is 0.0009ETH (around 54LIKE at this moment). During the high gas price period (80 Gwei), if we followed the network and use 80 Gwei for gas price, the transaction fee will rise to 0.0072 ETH (around 433LIKE at this moment). The median amount of LikeCoin transferred using transferDelegated is amount 19 LIKE, which means that the transaction fee itself is about 2280% of the transaction value. Therefore, we bounded the gas price at the maximum of 50 Gwei during the high gas price period. Since the gas price we paid was still much lower than the average 80Gwei, the transactions were stuck in the transaction pool for nearly a week.

Even for now, the transaction fee (10Gwei) is still very high compared to the amount of LIKE transferred. As mentioned above, the transaction fee is about 54 LIKE, while the median amount of LIKE transferred in each transaction is about 19 LIKE, therefore the transaction fee is about 284% of transaction amount.

Is it a threat to the LikeCoin ecosystem? Yes, it is definitely a serious problem to the ecosystem, as our use cases are mainly micro-payment, such high rate of the transaction fee is absolutely unacceptable.

Does that mean LikeCoin is unrealistic? No. We were aware of the problem right at the beginning of the design of LikeCoin protocol. Our solution is to introduce a side-chain, called LikeChain, to handle most of our transactions.

Our solution is to introduce a second layer solution, called LikeChain, to handle most of our transactions

What is LikeChain?

The Ethereum community is working hard on increasing the performance and scalability of the network while reducing the cost of transactions. There are many proposals, such as sharding, Proof of Stake, Raiden Network, Plasma, etc. However, none of these is currently production ready, and we cannot sit here to wait until these techniques are ready to be part of the LikeCoin ecosystem. Therefore we are creating our own blockchain for LikeCoin alongside with Ethereum, which is LikeChain.

To handle LIKE transfer in LikeChain, the following requirements must be fulfilled:

  1. Transferring LIKE from Ethereum to LikeChain, which is done by locking up the ERC-20 LIKE in Ethereum and minting the corresponding amount of tokens in LikeChain
  2. Transferring the LIKE within the LikeChain between different entities (LikeCoin ID) with remarkably low transaction fee.
  3. Transferring LIKE from LikeChain back to Ethereum, which is done by burning the tokens in LikeChain and releasing the ERC-20 LIKE locked in Ethereum.

How do we achieve the above? The technical paper and the MVP of LikeChain will be announced soon, stay tuned to see what is coming up!

We cannot sit here to wait until these techniques are ready to be part of the LikeCoin ecosystem.

Author: Aludirk

Related links: Blockchain for creative content | LikeCoin transfer delegation | How to write a DApp