## 3 Deepfake Detection System through Collective Intelligence and Deep Learning
### Integrated Vote
#### 3.3.1 Configuration of User Voting  
Fair Election of Voters in a Blockchain Environment  
Prior to conducting user voting based on collective intelligence for integrated voting, a way to fairly and safely elect voters in a blockchain environment is needed to ensure objectivity and neutrality in voting. In this study, random numbers are generated through RANDAO, a secure random number generation method in a blockchain environment, and voters are elected based on them. Figure 6 shows the operation process of RANDAO, and Equation (1) shows the final random number calculation. \[RN=S_{a}\ \bigoplus\ S_{b}\ \bigoplus\ S_{c} \tag{1}\]  
RANDAO is a random number generation method in a blockchain environment, where the random number generators a, b, and c in the block n send the hash values of the random seeds \(S_{a}\), \(S_{b}\), and \(S_{c}\) of Secure Hash Algorithm 3 (SHA3) [31], SHA3(\(S_{a}\)), SHA3(\(S_{b}\)), and SHA3(\(S_{c}\)) to the blockchain. Then, after receiving the original seeds \(S_{a}\), \(S_{b}\), and \(S_{c}\) after  
Figure 5: Integrated voting process of the proposed system. blocks are promised in advance, the hash value is obtained, verified to match the previously recorded value, and the value obtained by Xoring the seed is used as the random number \(RN\). The above method guarantees that a secure random number is generated if there are one or more flawless random number generators due to the impossibility of modifying the previous block and the integrity of the blockchain. The proposed system elects a voter by matching the generated random number with the system client UID using the peer node as a seed provider for random number generation. Algorithm 1 shows the pseudocode of voterSelector where the proposed system elects voters based on RANDAO. ```
Input:Nodes = (\(n\), \(n\), \(n\), \(...\)) : ICP nodes \(NV\) : Number of voters needed \(UA\) = (\(u\), \(u\), \(u\), \(...\)) : Users Account Set Output:\(V\) = (\(...\)) : Elected Voters
1\(R\) \(\leftarrow\) RANDAO(Nodes)
2 forin\(NV\)do
3\(R\) \(\leftarrow\) SHA3(\(R\)) #hashchain-style seed amplification with SHA3 Hashing
4\(targetFitting\) \(\leftarrow\) ABS(\(u\):\(R\))
5 forin\(k\) = 1 to n(\(UA\))do #approximation search for hashed \(R\) in UA
6\(gap\) \(\leftarrow\) ABS(\(u\):\(R\))
7 if(gap \(<\) targetFitting) then
8\(targetFitting\) \(\leftarrow\) gap
9\(targetVoter\) \(\leftarrow\)\(u\) #closest approximation of \(R\)
10 endif
11 endfor
12\(V\) \(\leftarrow\)\(V\)\(\cup\) targetVoter
13 endfor
14 if(n(\(V\)) == \(NV\)) then
15 return\(V\)
16 endif
```  
**Algorithm 1**voterSelector pseudo code  
The Allocation of Vote Weight for a Fair Vote  
Voting based on collective intelligence using user participation requires a method to resist voting manipulation by malicious users. This study differentiates user voting weights  
Figure 6: Random number generation through RANDAO in a blockchain environment. for voting stability. Through this, each user has a voting weight proportional to the system's contribution. This contribution is expressed as reputation, and accordingly, policies such as systematic differential compensation can be applied. According to game theory [32], users generally avoid actions that could be malicious to the system. The voting weight of the proposed system borrows from Steemit's reputation-based content management method. In order to calculate voting weight based on reputation, each user has their own reputation raw, which is calculated as reputation score through Equation (2). \[RS_{k}=[log\{abs(RR_{k})\}-9,\ 0]\times\{(RR_{k}\ \geq\ 0)?\ 1:-1\}\times 9+25 \tag{2}\]  
Reputation raw is a value for gradually changing the reputation score in an integer range and is formed in the range of \(10^{9}\) or higher. Reputation raw is increased through content registration, voting participation, correct prediction of voting results, and objection to deepfake content, which are actions that contribute to the system. Through the formula, reputation raw is calculated as an integer reputation score in the range of 25 to 100.