Showing posts with label FiiiChain. Show all posts
Showing posts with label FiiiChain. Show all posts

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.

Sunday, April 22, 2018

FiiiChain

Due to the recent workload, the new post update come a bit late. Today's topic is about our customizable blockchain solution - FiiiChain.



FiiiChain is a blockchain code foundation written in C# programming language. It is a framework which can be customized base on business requirement, be it whether you want to use it to keep transaction data (like Bitcoin to create a crypto coin) or any custom format data.

When do I need to use FiiiChain?

1. You have a database which would like to be open for everyone to access.
2. You allow everyone to make data changes in the database together.
3. You want to ensure no one can modify the history of data.
4. You want everyone to take part in governing the data integrity.

If your business model do not have the above requirement, you do not need blockchain or FiiiChain. I discover that a lot of ICO projects do not actually need a blockchain solution but yet still utilizing the technology just for the sake of crowd funding. In the end, the technology does not help in the business but creating scalability issue to the business ecosystem. The situation is like using the wrong tool to solve the wrong problem.

FiiiChain Foundation

FiiiChain is coded base on layered architecture design pattern. If you are a coder and curious about what is layered architecture, feel free to read this post. In short, it is a design pattern that segregate the whole chunk of source code into a few small modules for a specific task at the same time flexible enough in making them work independently but also anytime can combine them into a 2-tier or 3-tier or N-tier solution. It is like a car as a whole, split it into multiple parts, each part play a different role. You can combine the parts to become a bicycle or motorbike or car or bus depending on your requirement.


Block Data Structure

In FiiiChain foundation, you can define your block data structure, the data format that you want. In fact, you may just treat blockchain as an encrypted database. It is not a fancy or complicated technology once you have understood it.

The difference between a blockchain and a RDMS database is the data is not kept in a structured manner. There is no "table" concept in the block. You may define a JSON data structure and store in the block. The blocks are chained between each other base on the current block hash and previous block hash. The hash value is calculated based on the overall data of the block. The way how it use the hash to verify block is similar to verify a file checksum. If the block data has been modified, the hash value of the block will be changed, then the link between current block and previous block will be broken.

The blocks are stacked in a line from bottom to top, hence you will notice the keyword "block height" in the blockchain explorer. It mean the height of the block that you are looking at. The higher the block, the latest the block is and the latest data it stored.

FiiiChain can be customized to store block, transaction, memory pool data and so on into LevelDB (current Bitcoin DB) or the famous SQLite or any other lightweight file base client-side database.

Components

So for FiiiChain core component, it has been segregated into the following modules:

1. Network
2. Blockchain
3. Transaction
4. Consensus
5. Account
6. Hash Algorithm

Each module play a different role and their code logic can be changed easily in plug and play style as long as you code the component base on the interface defined in the FiiiChain foundation guideline.

Network

Once FiiiChain has been deployed into a node. It must be interconnected between nodes and must be in peer-2-peer (P2P) method since blockchain is a decentralized database, hence the only way to synchronize data is to connect and retrieve data from the peers in the same network. The more node we have, the tighter the security and data governance.

Blockchain

Blockchain is the key component of all, it responsible in following the consensus rule to identify the eligibility and ingenuity of a block passing down by the peers and chaining the block to the main chain by verifying the block hash, transaction signature and the proof of work.

FiiiChain has the flexibility to generate multiple side chain to cater for certain business scenario or solving certain problem. For example, it is possible to work on the lightning network implementation that leveraging on a side chain to create a payment channel for peers to make transaction in a temporary chain then finalize the settlement after a period of time to reduce number of transaction written into the main chain. This is considered as a workaround to solve today's Bitcoin scalability issue.

Transaction

Transaction component responsible in maintaining and managing all the transaction data in memory pool by working closely with Blockchain and Consensus component. It also backtrack all the unspent transaction output (UTXO) to calculate particular account wallet balance. It also verify the transaction hash and signing the transaction with private key.

Consensus

Consensus is the rule that defined in the blockchain to generate blocks, store transactions, create mining work. This is where you define the hash algorithm for proof of work, genesis block setting, coin supply limit, block generation time, block difficulty setting, coin base reward rules and mining fee setting.

You may define a new rule here such as Proof of Stake, Proof of Capacity or Practical Byzantine Fault Tolerance.

Accounts

In FiiiChain, it shall not be limited and not necessary must be using ECC or PGP/RSA method to generate private/public key set, as long as the method to generate account is unique, unpredictable and secured.

Hash Algorithm

There are quite a number of the hash algorithm available in the market. You can pick one base on your requirement such as ASIC counter or CPU/GPU friendly for your proof of work.

Summary

FiiiChain foundation is a highly flexible and customizable blockchain framework. Our main goal is to train up the existing corporate C# developer to pick up blockchain to solve the blockchain talent shortage problem in the world. C# is a higher level programming level which is easier to read and understand compare to C++.

We want to remove the dependency on the current available blockchain platform in the market. There are a lot of restriction that you have to play with them. Our solution promote fast code development and deployment to the market since we will have Bitcoin template in FiiiChain and programmers can easily pick up, learn and build from there.

Please follow us if you are a C# developer and would like to learn more about FiiiChain.

Facebook - https://www.facebook.com/fiiipay/
Telegram - https://t.me/fiiicoin

If you are interested about our project, you may download our whitepaper here:
English Version
Chinese Version

My LinkedIn Profile

#redefinecryptocurrency
#fiiichain

Tuesday, April 3, 2018

FiiiPOS

As promised, one post per week, if you missed my first post about my startup story, feel free to read from here.

Today topic is about FiiiPOS. I received a lot of questions regarding FiiiPOS. People are interested to know more about it but our official website is still under construction, hence have no other choice but to share the information through my blog here.

FiiiPOS stand for Fiii (our trademark) Point-of-Sales, it is a POS terminal that can accept cryptocurrency as payment. At this moment, we are avoiding fiat currency and limiting to support cryptocurrency payment only due to the rules and regulations about cryptocurrency is still unclear and yet to be confirmed in Malaysia, China and other country.


FiiiPOS support multi-cryptocurrency which mean not limited to Bitcoin only. We are progressively increasing more cryptocurrency support. The top 20 most popular cryptocurrency you can find in coinmarketcap.com will be supported.

The Purpose

Our main purpose of this product is to provide a platform for all the cryptocurrency available in the market to circulate and usable for transaction. A cryptocurrency value is determined by its supply and demand. If a cryptocurrency cannot be used for transaction, it is useless and valueless despite of how good the technology behind it can offer.

How It Works?

FiiiPOS
is considered as FiiiPay Merchant Edition and will be used by valid merchant only. We have a KYC process for merchant and it is differ from User Edition, the FiiiPay app. Merchant need to submit valid business licence, owner detail, contact and shop location while setting up FiiiPOS for the first time.

Prior to the user make payment to the merchant using FiiiPay app, firstly both party must come into a mutual agreement of selecting which cryptocurrency for payment. FiiiPOS has a series of cryptocurrency choices to pick, however, the condition is merchant must be willing to accept the particular cryptocurrency.

Payment

Once both party agreed upon using one particular crypto, for example: Bitcoin, merchant setup from the FiiiPOS by choosing Bitcoin, then enter the local fiat currency amount (we make it easy fiat-2-crypto conversion calculation), then choose the payment acceptance method. FiiiPOS support 3 payment methods so far:

1. QR Code
2. Bluetooth
3. NFC

Step 1: Choose Cryptocurrency


Step 2: Enter local fiat currency amount and it will instantly calculate fiat-2-crypto conversion base on the price reference from coinmarketcap.com.

Step 3: Choose payment method.


Step 4: User open up FiiiPay app then scan the QR code appear on the FiiiPOS


The payment is made instantly once user scan the QR code appear on the FiiiPOS. If you wonder how does the FiiiPay app link with your cryptocurrency wallet, the answer is NO. FiiiPay does not link directly to your cryptocurrency wallet. FiiiPay is not a crypto wallet. FiiiPay does not request your crypto wallet private key. FiiiPay is just a third party centralized digital wallet, same goes to FiiiPOS. 

Deposit

Before user begin to use FiiiPay, user need to deposit some amount of crypto to FiiiPay first. Every FiiiPay newly registered account will be given a public key address for every particular cryptocurrency. The concept is similar to the cryptocurrency trading platform available in today's market.

Withdrawal

User and merchant can withdraw the collected crypto out from FiiiPay/FiiiPOS to their own crypto wallet anytime anywhere with a small charge of transaction fee.

Mining

FiiiPOS has a unique feature which other POS terminal does not have which is mining FiiiCoin (will be covered in the next few posts). FiiiCoin is a newly developed cryptocurrency by FiiiGroup using FiiiChain (proprietary blockchain framework) and Delegated Proof of Capacity (DPoC) consensus algorithm which uses FiiiPOS available storage space and CPU power for mining to maintain the blockchain network. When FiiiPOS is idle and plugged in to charge the battery, it will automatically bring up the mining page and start mining automatically. The idea is to maximize the usage of the POS machine.

The idea is to let our merchant who have purchased FiiiPOS to earn some reward in FiiiCoin which is treated as a token of appreciation in supporting our cause. At least our merchants feel compensated in another way after paying transaction fee for every received payment.

Mining hash rate is determined by the allocated storage space

Reporting

FiiiPOS is equipped with a thermal printer. When every transaction has been made, it will print a copy of payment slip for the user and a duplicate copy for the merchant.

FiiiPOS track every transaction and is capable of generating and exporting report data in spreadsheet or PDF format for the merchant. Due to the size of the FiiiPOS is small, merchant can open the FiiiPOS web edition using a PC/laptop browser to access the report and download the exported file.

Security

FiiiPOS is a restricted device. Merchant cannot install any application into the device. It is to prevent hacker from installing virus, malware, key logger, etc to the device. Hence, the Meltdown and Spectre vulnerabilities are low.

FiiiPOS is equipped with GPS, in case merchant lost the device, we can assist to detect and recover. We has a customer service team to assist user and merchant 24/7 to lock down their account or recover the device once their phone device or POS device is missing.

Maintainability

FiiiPOS is monitored by a central monitoring system. FiiiPOS software occasionally will receive patch for bug fix and security update.

We offer one year warranty for FiiiPOS device in case of any hardware failure. We have a technical support team standby in every operating country for hardware repair or parts replacement.

Hardware Spec

Processor: 4 core CPU
Memory: 1GB RAM, 8GB Flash
Display: 4.8"
Printer: High speed thermal printer, 40mm paper roll
Communication: 4G LTE/Wi-Fi/Bluetooth/NFC
SD Card Slot: 1
SIM Card Slot: 1
Device Port: 1 micro-USB OTG
Front Camera: 2MP
Rear Camera: 5MP
Speaker: Yes
Battery: Li-ion 5200 mAh
Power: Input - 100-240V, 50-60 Hz, Output - 5V/2A
OS: Android 5.X

More Photos

















Collaboration Opportunity / White Label

If you are an owner of a cryptocurrency, you wish to circulate your crypto to the market and expand your merchant network, feel free to drop us an email to enquire: sylvester.lee@fiiipay.com

Whitepaper

If you are interested about our project, you may download our whitepaper here:
English Version
Chinese Version

My LinkedIn Profile

Follow us on Facebook Page and Telegram to get the latest news and update.

Facebook - https://www.facebook.com/fiiipay/
Telegram - https://t.me/fiiicoin


#redefinecryptocurrencies
#spendborderless


Thursday, March 29, 2018

FiiiPay - Prologue

I am back! I had stopped blogging since 2 years ago when I started to venture into the startup world. Since then, I had very limited time in blogging, I gave up the daily 9 to 5 job, no more annual leave nor sick leave, I had been selflessly involving all the problem area and solving any surfaced issue despite not under my expertise.

In year 2015 August, I resigned as a Technical Lead Consultant from HP,  joining my school mate founded a company in Shenzhen, China to build an O2O (Online to Offline) payment solution along with vouchers app which is similar to Groupon, unfortunately, we failed due to over estimated the China spending behavior and applied wrong marketing strategy.

We went through a lot, facing customers and merchants everyday problem, going around the world pitching ideas looking for funding, encountered hackers attacking our system, corrupting database, even were once happy generating CNY$ 1.4M highest revenue in a month, but things did not get along well all the time. Our operation cost was high due to over staffing and giving out too much freebies attempt to attract user to gain traction, then hacker exploited our reward system, plus the generated revenue were not be able to cover the monthly expenses. We paid a big price to learn from mistake, we dismissed all our staffs and shutdown our project in January, 2017.

However, failure did not stop us, we stand up where we fall! We tried to recover with very minimal remaining resource, a group of 4 programmers including myself, by starting to accept external software development projects. We save money, we build software for others at the same time working on our new project - FiiiPay. It is a multi-cryptocurrencies digital wallet. We also build a multi-cryptocurrencies point-of-sales terminal - FiiiPOS for merchant to accept crypto payment from the FiiiPay users.

Why multi-cryptocurrencies?

We do not want to limit ourselves to accept one kind of cryptocurrency. We do not know the exact market demand, but we do know about the volatility of a bitcoin, we do not want to restrict merchant to accept one kind of cryptocurrency. Different people different thought, we open for all.

Secondly, we consider ourselves as cryptocurrency service provider. I want to help cryptocurrency company or project to be successful by creating a method for them to circulate their coins to the market. Anyone who want to circulate their coin, you may come and look for me to discuss collaboration. We can make your crypto coin to become acceptable as payment among all our merchants.

User and Merchant Sharing Mechanism

We have two collaboration partners so far. From here, we can see it as merchant sharing. Two partners purchase our POS terminals and is going to expand their own merchant network. However, both network are sharing the same platform - FiiiPay. The combined effort result in exponentially gaining traction.

Chicken and Egg Issue

My past experience tell me that user will not use your platform unless you have a lot of freebies and merchants or you provide something that they need. On the other hand, the merchant is willing to join your platform only when you have a lot of users that could bring sales to them. So, here come the chicken and egg issue, whose problem should be tackled first? Our solution is both party requests need to be fulfilled at the same time, and that our business model can solve the problem.

Blockchain

Blockchain is the top Google search keyword in the recent years. In fact, we are also one of the companies explored into this technology last year. We are not just another payment solution provider,  we are here to provide Blockchain Solution as a Service, helping companies to learn and adopt blockchain technology in their existing business. We build customizable blockchain code - FiiiChain in C# with layered architecture design pattern and modular programming. We promote the reusability of existing organization programmers resource to pickup and improve blockchain learning curve, solving the shortage of blockchain developer talent problem. With FiiiChain code base foundation, we can easily develop any decentralized application for any industry.

Community

I am actively looking for C# or blockchain talent, if you are interested and located in Kuala Lumpur, Malaysia or Shenzhen, China, you may drop me an email at sylvester.lee@fiiipay.com. We will conduct "Blockchain in C#" training in the near future, we welcome you to join our Telegram group at https://t.me/fiiicoin and Facebook Page to follow us to get the latest news about our project, company and event.

Next Update

Since I am back to blog, stay tune for my next update about Blockchain in C# - Part 1. We build our first cryptocurrency - FiiiCoin using our C# blockchain foundation code. I am sure a lot of C# developers and my blog followers out there wish to get to know more about it.

Whitepaper

If you are interested about our project, you may download our whitepaper here:
English Version
Chinese Version

My LinkedIn Profile



#redefinecryptocurrencies
#spendborderless





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...