# A Time Bank System Design on the Basis of Hyperledger Fabric Blockchain
## 5 Experimental Results
### Time Bank-Related Operations  
In phase 1, every user has to begin with the enrollment process. If a new identity whose name is \"[PERSON]\" completes his enrollment, then there is a key pair and a document containing the attributes of this identity. After enrolling, [PERSON] can use an application to input all the related service states and post them on the blockchain. Next is the execution of the matching processes. After [PERSON] posts his service, our system compares it with all existed services and shows all matchable ones. Then, the system queries the grades of the service owners of these candidates and chooses the highest-grade candidate before matching. As mentioned earlier, when a service request is submitted, the system has to check the sufficiency of SR's balance which is recorded on the TC. Finally, the service gets a successful match. A measurable performance index is the total execution time of the whole process from when the service is posted to when the service is matched, which is about 10 to11 seconds in our current system implementation. Of course, this time spent depends heavily on the number and scale of the involved communities and the efficiency of the adopted matching algorithm. In Phase 2, SP invokes token Chaincodes to get the time credit for his or her services and automatically activates the reward function. The wallet on the state contains two attributes: account and balance, where account is used to record users' names and balance records the time credit that the user has. If an SR is requesting a one-hour service, the SP will get 1.1 units of time credit where one is from SR and 0.1 is the reward. According to our simulation, the execution time of Phase 2 is about 5 s.  
In Phase 3, both SP and SR submit their grades. Then, the grades are off-chain encrypted with RSA. At first, the two public and private key pairs of RSA are generated by another key managing program. Figure 7: The simplified block diagram of overall operations in the proposed time bank system. Then, the user can invoke grading Chaincodes to submit their grade to others. In the states of the grade, there are four statements which are \"grade type\", \"grade giver\", \"grade receiver\", and \"grade\", where grade type indicates the grade is given to SP or SR and \"grade\" shows the encrypted grade data. Since the grades were already encrypted with RSA, their ciphertexts are shown in base-64 encoding. Then, the grade manager queries the ledger to get the encrypted grade. Notice that the grade manager also has to go through the enrolling process with MSP. The grade manager decrypts the encrypted grade data one time to get the commitments and two times to get the plain grade data. Once the grade manager collects five grades of someone, they can calculate that person's average grade and submit it to the ledger. The time cost of encrypting the grade data two times with RSA is about 7.5 s in our system. This execution time is calculated because the user has to input the grade no later than when the encrypted grade is recorded on the ledger. To show the response time more precisely, as suggested by one of the anonymous reviewers, we measured the overall time spent under the following experimental conditions: (1) there were three different kinds of possible services; (2) the number of concurrent users (i.e., number of SR + number of SP) was assumed to be less than or equal to 10; (3) the reported time spent was the average value obtained by repeating the experiment 10 times. Our experimental results of the average system response time versus the number of system users are depicted in Figure 8. We also found that the system response time increases as the number of possible services increases, but the effect is negligible (0.1 to 0.2 s increase even when the number of possible services is increased from three to 100). As pointed out by one of the anonymous reviewers, in practice, payment can be effective in the sub-second interval if the most updated user-oriented blockchain technology is used.