Research Article

Blockchain-Based Incentive Mechanism for Spectrum Sharing in IoV

Algorithm 1

Honesty degree evaluation algorithm.
Input: Current honesty degree ;
Output: Updated honesty degree .
①For each do:
②  if B =0:
     //The user has illegal behavior
③   =
④  else if B = 1 and :
     //The user is honest and the current honesty degree level is not up to the upper limit
⑤   
⑥   if :
       //Updated fidelity exceeds the upper limit
⑦     
⑧  else:
     //The user is honest and the honesty degree reaches the upper limit
⑨     = 200