Basic architecture of LikeChain
Introduction toLikeChain
The blockchainof LikeCoin ecosystem
In early July,you might notice that the transactions of LIKE were extremely slow that all ofthem still kept in the pending status after waiting for a few days. The reasonfor that was the high gas price in Ethereum.
What is gas price?
All theEthereum 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 isthe incentive for the miners in this case. Every transaction requires a certainamount of computational power and such computational power will count in a unitcalled Gas. Therefore, the more complex of the transaction, the more the gas.
The senders seta gas price for the gas usage in terms of Gwei/gas each time before they sendthe transaction. For a typical Ether transfer transaction, it needs 21,000 gasto 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 aroundUS$0.0098 at the time of writing.
Why did the gas price rise?
As everytransaction have a different gas price set by the sender, the miners, ofcourse, will have their own strategy to maximize the profit for each limitedsize block. Intuitively, the higher the gas price is set, the higher the chancethe miners will execute the transaction.
In 2018, therehad been two significant incidents that generated a lot of transactions withina short period, and everyone wanted the Ethereum network to process his/hertransaction in a short time so that it caused the gas price suddenly jump to avery high-level. The Ethereum network resulted in the serious trafficcongestion that lasted longer than a week. One was the CryptoKitties (Jan2018), and the other was the airdrop competition from FCoin (Jul 2018). Both ofthem led the average gas price had a sudden rise to over 80Gwei where mostlikely it should around 10~20Gwei.
The gas pricehistory in 2018 (up to July), from Etherscan
TheCryptoKitties (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 anutshell, is an ERC-20 token from Ethereum which means every operation onLikeCoin is actually an Ethereum transaction in the backend. Therefore, thehigh gas price does affect the LikeCoin transactions.
Currently, youhave a couple of use cases for LIKE, for example, get directly from like.co viaLikeCoin coupon or LikeCoin bonus (create a LikeCoin ID and emailverification), or peer to peer transfer LikeCoin from/to your friends.
LikeCoin coupon(Chinese New Year Lai See from LikeCoin Foundation, 8 or 88 LikeCoins inside)
You can try totransfer 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, itis because we have some black magic, which we called Transfer Delegation, inthe backend.
We have someblack magic, which we called Transfer Delegation, in the backend.
Transferdelegation
For the LikeCoin bonus, LikeCoin Foundation will pay the transaction fee as we are thesender 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 barrierfor 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 holdenough amount of Ether for the transaction fee. To simply send LikeCoin, youwill need to understand the complicated concepts and manipulate two differentcrypto-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 setthe amount of LikeCoin you are sending and sign a signature in Metamask. Wewill pay the transaction fee for you, and the smart contract will execute yourrequest, exactly following what you sign.
We will pay thetransaction fee for you, and the smart contract will execute your request, exactly following what you sign.
How much hasLikeCoin Foundation borne?
For a typicaltransferDelegated 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 is0.0009ETH (around 54LIKE at this moment). During the high gas price period (80Gwei), if we followed the network and use 80 Gwei for gas price, thetransaction fee will rise to 0.0072 ETH (around 433LIKE at this moment). Themedian amount of LikeCoin transferred using transferDelegated is amount 19LIKE, which means that the transaction fee itself is about 2280% of thetransaction value. Therefore, we bounded the gas price at the maximum of 50Gwei during the high gas price period. Since the gas price we paid was still muchlower than the average 80Gwei, the transactions were stuck in the transactionpool for nearly a week.
Even for now,the transaction fee (10Gwei) is still very high compared to the amount of LIKEtransferred. As mentioned above, the transaction fee is about 54 LIKE, whilethe 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 threadto 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 transactionfee is absolutely unacceptable.
Does that meanLikeCoin is unrealistic? No. We were aware of the problem right at thebeginning of the design of LikeCoin protocol. Our solution is to introduce aside-chain, called LikeChain, to handle most of our transactions.
Our solution isto introduce a second layer solution, called LikeChain, to handle most of ourtransactions
What isLikeChain?
The Ethereumcommunity is working hard on increasing the performance and scalability of thenetwork while reducing the cost of transactions. There are many proposals, suchas sharding, Proof of Stake, Raiden Network, Plasma, etc. However, none ofthese is currently production ready, and we cannot sit here to wait until thesetechniques are ready to be part of the LikeCoin ecosystem. Therefore we arecreating our own blockchain for LikeCoin alongside with Ethereum, which isLikeChain.
To handle LIKEtransfer in LikeChain, the following requirements must be fulfilled:
TransferringLIKE from Ethereum to LikeChain, which is done by locking up the ERC-20 LIKE inEthereum and minting the corresponding amount of tokens in LikeChain
Transferring the LIKE within the LikeChain between different entities (LikeCoin ID) withremarkably low transaction fee.
Transferring LIKE from LikeChain back to Ethereum, which is done by burning the tokens inLikeChain and releasing the ERC-20 LIKE locked in Ethereum.
How do weachieve the above? The technical paper and the MVP of LikeChain will be announced soon, stay tuned to see what is coming up!
We cannot sithere to wait until these techniques are ready to be part of the LikeCoin ecosystem.
以下方式关注我们
官网: https://like.co/
Medium:medium.com/likecoin/zh/
Facebook:fb.com/LikeCoin.Foundation , fb.com/groups/likecoin
电报群:t.me/likecoin
Twitter:twitter.com/likecoin_fdn
Youtube:youtube.com/c/LikeCoin
Github: github.com/likecoin