Monday, July 16, 2018

Delegate Proof of Capacity


Today's topic is about the consensus algorithm - Delegate Proof of Capacity (DPoC) which we developed for FiiiCoin.

History

Proof of Capacity (PoC) or also known as Proof of Space (PoSpace) is a consensus algorithm originated from Burstcoin which is somehow similar to Proof of Work (PoW) that you can find in Bitcoin. However, PoC uses storage instead of computing power to perform proof of work. Burstcoin is the first cryptocurrency that uses PoC consensus in year 2014. 

Why PoC?

We like the idea of Burstcoin which is energy efficient for mining and the concept is just nice to fit into our FiiiPOS terminal to enable for mining. We all know that the hardware spec of a POS terminal is similar to a mobile phone. Mining a PoW crypto which is power hunger using mobile phones are unfeasible, considering the weak CPU, the heat generation and the battery lifespan will be shorten quicker than usual, also trying to compete with ASIC using mobile phones is a crazy idea.

How PoC Work?

PoC is a consensus where miners make use of their device storage to keep the pre-computed hashes prior to the mining process begun. Every miner need to allocate a desired amount of storage for mining, then the mining script will plot the hashes to the allocated space and also group the hashes into scoop.

Image credits to Burstcoin Whitepaper

Once the hashes have been plotted into the allocated space. miner connects to the Node to get mining work which contain the block producer signature, base target and next block height. The miner then determines which scoop to look for the hashes, then start scanning the hashes in the plot file to look for the correct nonce. At this time, there is no CPU involvement at all. The plot file reading speed and the number of hashes in the allocated storage space determine the mining success rate.

Every account generates a unique different set of hashes base on unique account ID and nonce value. And, the miner just need to pre-compute the hashes once and save into the storage, then these hashes can be reused multiple time even though there is a block being successfully mined.

The PoC concept is a bit different compare to the Bitcoin PoW consensus whereby the hash is generated base on the entire block data. However, in order to mine a PoC block, it is determined by finding the correct nonce within the target deadline. The Node check the last 30 blocks generation time to determine the next block target deadline in order to maintain average 5 minutes (24 blocks 4 minutes for Burstcoin) block produce time. The miner need to find the correct hash within the target deadline.

Why Not Cloud Mining?

The common question that asked by the people who have listened to our idea: Since mobile phone is unfeasible for mining, why not put it into cloud or server?

A blockchain are supposed to be meant for mining for everyone. The original intension of Satoshi Nakamoto, the founder of Bitcoin, created Bitcoin – a P2P payment system that govern and maintain by everyone, using the extra computing resource that you leave it idle. Our objective is to do the same, let everyone participates in mining, together maintain the blockchain network, while leaving your FiiiPOS terminal or mobile phone running idle and charging battery.

We do not need expensive ASIC machine to power the blockchain, wasting too much energy for little purpose. We emphasize reusability, your mobile phone is the FiiiCoin node, the more mobile phone from different individual come in as part of the FiiiCoin blockchain, the higher the security of our FiiiCoin.

FiiiCoin is specifically designed for ASIC proof, quantum computer proof, cloud mining proof, computer proof and also restricted to only FiiiPOS and mobile phones allow to participate in mining. Hence, the consensus – Delegate Proof of Capacity (DPoC) is formed.

PoW vs DPoC

Rule
PoW
DPoC
Finding hash
Real time
Periodic
Hash base
Entire Block
Device ID + Account ID + Nonce
Competition
First + Highest Difficulty
First + Lowest Target Deadline
Compute Power
CPU / GPU
CPU + Storage
Minable
Everyone
Restricted device only


Potential Exploit

Burstcoin being susceptible to time-memory trade-offs, thus allowing miners to mine using PoW and using just a small fraction of space to be at the same rate as “honest miners”. The Burst PoC2 should solve the problem and FiiiCoin is also prepared for the same potential exploit.

Secondly, in order to restrict certain device to be able to participate in mining is also a challenge since today’s virtual machine technology is mature, a PC can easily virtualize a few mobile phones to perform FiiiCoin mining.


The Balance of Security, Speed, Decentralization


Every blockchain technology always grasp between the balance of decentralization, security and performance. There is no one silver bullet or one size fit all solution that can achieve these 3 characteristics. When you want to improve the security of the blockchain, you either need to jeopardize the performance or decentralization.

FiiiCoin has been designed specifically for payment ecosystem, it is a less decentralized blockchain but with better security and performance. The FiiiPOS and mobile phone mining restriction is to protect our merchants and supporters interest. With delegated PoC consensus, we can achieve higher transaction per second by letting the Super Node keep generating block with no restriction, however, it is to be confirmed later when our technical team finish the development and testing in the test net.


The Super Node responsible in producing blocks, while the normal node (wallet) is responsible in validating the block and distribute the data across the blockchain network. All the miners who wish to connect to the Super Node, they have to either own a FiiiPOS terminal or paying monthly subscription fee to enable mining with a separate mining software.

Due to the concern of a mobile phone storage limitation, it is not encouraged to install full node into the mobile phone as the blockchain size is growing overtime. However, we provide a separate lightweight wallet that only sync block headers for mobile phone.

The Death of POS Terminal

POS Terminal manufacturers are facing very tough competition in the market. There are so many POS terminal that accept credit card payment or mobile payment choices available. Payment solution provider or banks are giving out POS terminal to their merchants for free. There is transaction fee competition as well. It is just a tool for the merchant to accept payment.

Today, in order to compete with the existing market, our POS terminal – FiiiPOS need to be capable of generating revenue for our merchants even there is no transaction at all, especially in the crypto industry where not many users adopt into it yet and also without government support. Furthermore, we are into transaction fee war as well, giving lower fee compare to the bank and other payment provider. The FiiiPOS machine cost can be ROI after a period of time.

With FiiiCoin DPoC design, merchant generate free FiiiCoin out from their idling and charging POS terminal. The FiiiCoin earning can be used to offset the transaction fee as well as the cost of the machine. The FiiiCoin value is maintained by everyone who uses FiiiCoin to make payment. We are forming an ecosystem that everyone does not dump FiiiCoin to exchange for fiat currency, instead making it usable anywhere around the world with large merchant network who own FiiiPOS terminal. This is something that the existing payment solution provider cannot provide at the moment.

Summary

I believe crypto enthusiast will condemn about our blockchain design for not being fully decentralized. I would like to emphasize our priority now is taking care of our merchants and attempting to build a large payment ecosystem. It is not easy to make everyone happy unless I sell ice-cream. There is no one size fit all solution. Our goal is to distribute FiiiPOS worldwide and making it available to everyone every where, travelers able to spend crypto overseas without the need to exchange foreign currency.

I believe a crypto which is usable and acceptable by people is only considered as successful. Cryptocurrency is not supposed to be a speculative investment tool. It should not be just a technology showcase as well. No matter how good is your blockchain technology, when there is no adoption, no application, it is considered meaningless and valueless.

I am open for any comment, feel free to drop me a message in the comment section below if you have a better idea in designing a blockchain for our business model.

Send Transactional SMS with API

This post cover how to send transactional SMS using the Alibaba Cloud Short Message Service API. Transactional SMS usually come with One Tim...