# A Time Bank System Design on the Basis of Hyperledger Fabric Blockchain
## 2 Background and Related Work
### The Hyperledger Fabric Blockchain  
Hyperledger Fabric (Fabric for short) is one kind of permissioned blockchain aiming mainly at business applications [12]. It is a flexible open-source system that also allows the involvement of smart contracts, which are named \"Chaincodes\" in Fabric. Chaincodes can be programmed by using several conventional programming languages such as Golang and JavaScript unlike the smart contracts in Ethereum, which are restricted to a domain-specific language, Solidity. Other components in Fabric, such as the consensus protocol and the distributed database, are modularized and pluggable, which enable the system to be applicable to many practical applications.  
Since Fabric is designated for deploying and operating on permissioned blockchains, it supports the Membership Service Provider (MSP) for providing identity checks to all nodes in the network. Anyone who wants to join to the network has to firstly enroll and get an identity. Furthermore, Fabric belongs to the group of consortium blockchains, in that it has a certificate authority (CA) in the network. In other words, the centralization of Fabric, as well as the proposed Time Bank system, would be higher than that of its Bitcoin Blockchain-based counterparts. Nevertheless, as mentioned in Section 1, a reliable time bank system is centralized in nature because its participants have to build their mutual trust by relying on a centralized TTP, the time bank system's administrant.  
In Fabric, there is another particular structure called the channel. Channels separate all on-chain organizations into different groups, and one channel owns its attached ledger. That is, only the members belonging to the same channel can share the data on the specific ledger. This configuration fulfills the requirement of conducting confidential transactions between members. Members are in control of the visibility of data through channels, and this characteristic is significant and useful in lots of business applications.  
In Fabric, the consensus is reached in the phase of ordering service so that consensus-reaching only needs the supports of endorsing peers. Therefore, Fabric can deal with many more transactions than Ethereum in the same period of time. Additionally, there is no built-in cryptocurrency in Fabric although the developers can still define and issue their own tokens in Fabric, such as the \"time credit\" in this study.  
To sum up, for building a time bank system with blockchain technology, we decided to use Fabric rather than Ethereum due to the following considerations:  
1. Fabric has a higher rate of transactions per second (TPS) since reaching consensus in Fabric does not require agreement from all on-chain members. Thus, the finality of a Fabric transaction is immediate.
2. Paying transaction fees in Fabric is not mandatory.
3. There is no cost limit in a Fabrics Chaincode unlike the gas limit in an Ethereum-based smart contract.
4. Member identification can be verified by the equipped MSP in Fabric.
5. Fabric can use channels to partition members' supply-and-demand pairs according to their geographical locations; therefore, users can query the service data only recorded on a specific channel. That is, usually, users can focus only on nearby services. Noticeably, Fabric also enables cross-channel interaction if users need to exchange the service launched on another channel.
6. The Fabric network is highly scalable. Once a new community is willing to join the time bank, the only work needed to be done is to create a new channel that includes those newcomers as the legal community members. In other words, the number of members and communities can be easily scaled up.