## 4 Proposed Protocol
### Reputation Management  
The model owner incorporates reputation management in the sixth and final stage to evaluate participants' performances. Based on their reputations and current deposits, participants are rewarded accordingly. The procedural details are in the ADJUSTREPUTATION() function in Algorithm 4. In the ADJUSTREPUTATION() algorithm, first, it refers to the GETPUNISHLIST() function depicted in Algorithm 5 to obtain a list of participants who will receive a reputation penalty. Consider a scenario where there are \(N\) number of trainers with the highest scores, and the highest scores are considered \((T_{1},T_{2}...,T_{N-1})\). Trainers whose scores are below \(T_{N-1}\) will be added to the punish list. For voters, the punished ones are those who have voted for trainers who were added to the punish list. ```
1:functionadjustReputation
2:\(PT,PV\leftarrow\) GETPUNISHLIST()
3:for each trainer \(t=1,2,\ldots,T\)do
4:if\(t\in PT\)then
5: penalize \(t\)'s reputation
6:endif
7: reward \(t\)
8:endfor
9:for each voter \(v=1,2,\ldots,V\)do
10:if\(v\in PV\)then
11: penalize \(v\)'s reputation
12:endif
13: reward \(v\)
14:endfor
15:endfunction
```  
**Algorithm 4** Reputation Management```
1:functionGetPunishList
2:\(PT\leftarrow\) (initialize the empty array of punished trainers)
3:\(PV\leftarrow\) (initialize the empty array of punished voters)
4:for each trainer \(t=1,2,\ldots,T\)do
5:if\(S_{t}<\) lowest of \(S_{T}\)then
6: add \(t\) to \(PT\)
7:endif
8:endfor
9:for each voter \(v=1,2,\ldots,V\)do
10:\(Z_{v}\leftarrow\) (obtain the list of trainers that \(v\) voted _accept_ for)
11:if\(Z_{v}\cap PT\)then\(\triangleright\) Check if \(v\) voted for a punished trainer
12: add \(v\) to \(PV\)
13:endif
14:endfor
15:return\(PT,PV\)
16:endfunction
```

**Algorithm 5** Punish List

## 5 Experimental and Proposed Scheme Analysis

The experiment was conducted on a machine with Windows 10 as the operating system with an Intel Core(TM) i7-8700K CPU and 32 GB RAM.A Docker container with 2 CPU cores and 2 GB of RAM was utilized to run Ganache. The smart contract was written in the Solidity language and deployed to Ganache using Truffle. In the experiment, 10 iterations with 30 participants of FL simulations were performed, with the population composed as follows:

* 20 trainers (10 malicious, 10 non-malicious)
* 10 voters (3 malicious, 7 non-malicious)

To participate, trainers and voters must initially stake a minimum of 5 million gwei (which is equal to approximately ETH 0.005, which, as of 28 April 2023, was equal to USD 9.58), and will earn rewards that are proportional to their reputations. For example, a participant with \(x\) million gwei and \(y\) reputation will receive (\(y/10\))% of their current gwei deposit, resulting in a new deposit of \(x+(x*y/10)\) gwei for the next iteration. Therefore, maintaining consistent performance and reputation is crucial for participants to maximize their rewards. ### Reputation Progression

Figure 7(a) shows that when the same reputations are established for all participants, malicious trainers are immediately banned from participating in their second iteration. There is also a slight decrease in the non-malicious trainer reputation in the second iteration, indicating some honest trainers can still submit low accuracies due to unforeseen circumstances, such as low bandwidth or unstable connectivity. A different parameter test is conducted with malicious trainers, starting with 60 initial reputation values (as opposed to honest ones starting with 40), as depicted in the results in Figure 7(b). The rationale behind this test was to simulate a scenario where collusion had occurred, and the majority of the malicious actors had managed to obtain a higher reputation than the non-malicious ones. Even though the initial collusion might be successful, as reflected by the higher reputation scores, the model update ranking allows for the collusion to be detected over time. Figure 7(c),d similarly depicts malicious voters that have a similar reputation progression to their trainer counterparts.