# RingFFL: A Ring-Architecture-Based Fair Federated Learning Framework
## 5 Security Analysis and Numerical Results
### Numerical Results
Client 1-client 4's roof deposits to client 5 will also be returned in full. However, client 1 correctly  
Figure 8: The circulation of digital currencies when there are 5 clients participating in FL. transmitted the model parameters to client 2, so client 1 received both client 2's ladder deposits of \(b\) and client 5's returned roof deposits of \(b\). That is, the number of digital currencies of client 1 eventually increases by \(b\). Similarly, client 2 correctly transmits the model parameters to client 3, so client 2 obtains both the ladder deposits of \(2b\) from client 3 and the roof deposits of \(b\) refunded from client 5. After subtracting the number of ladder deposits of \(b\) given by client 2 to client 1, the number of digital currencies in client 2's wallet also increases by \(b\) in the end. In addition, as can be seen in Figure 7(d), client 3's digital currencies are reduced by \(2b\), while the digital currencies of client 1 and client 2, who trained honestly and transmitted the local model parameters to the next client, are both increased by \(b\). This corresponds to client 3's deposits being used to compensate for the losses of client 1 and client 3. Client 4 and client 5 receive neither the model parameters nor the additional digital currencies. Thus, the fairness of FL is achieved. To illustrate the universality of the proposed mechanism to the number of clients, we increased the number of clients and reconduct the experiments. As is shown in Figures 8-11, similar results are obtained with 10 clients, 15 clients, and 20 clients participating in FL training, respectively, in which we assume that client 8 leaves halfway. Figure 9: The circulation of digital currencies when there are 10 clients participating in FL. Figures 8-11 show the case where one client leaves halfway. When more than one client leaves, the penalty mechanism still works. We conducted a simulation experiment with three clients leaving midway (client 8, client 14, and client 18), and the experimental results are shown in Figure 12.  
It can be seen from Figure 12 that when three clients do not execute roof deposits, all roof deposits of other clients will be refunded. As can be seen from Figure 12, since client 18 should make ladder deposits first among the three leaving clients, when client 18 discontinues ladder deposits, all the remaining clients will no longer perform ladder deposits and wait for the refund of their respective roof deposits. From Figure 12, it can be seen that since client 8 performs the acknowledgment step first among the three leaving clients, after client 8 leaves with useful information, their ladder deposits will be used to compensate for the loss of client 1-client 7. Although client 14 and client 18 also leave midway, they do not obtain additional useful information, so all their deposits are returned. The fairness of FL is still guaranteed when multiple clients leave in the middle of the process. To demonstrate the effect of including blockchain on training time, we give Figures 13 and 14. Figure 10: The circulation of digital currencies when there are 15 clients participating in FL. It can be seen from Figures 13 and 14 that including blockchain will take a little longer than excluding blockchain experiments with the MNIST and CIFAR10 data sets in both the IID and non-IID cases. If blockchain is not included, the time consumption mainly consists of the models' local training time, model transmission, model validation, and model aggregation time. In the case of including blockchain, the transaction confirmation time for paying deposits and deposit acknowledgment is increased, in which the confirmation operation of paying deposits and the models' local training can be executed in parallel. So, the increased time consumption mainly lies in the extra time for the confirmation operation of paying deposits over local training and the confirmation time of deposit acknowledgment.