Research Article

PrivCrowd: A Secure Blockchain-Based Crowdsourcing Framework with Fine-Grained Worker Selection

Algorithm 1

The smart contract: PostTask.
Input: This contract’s address ; requester’s public key ; requester’s certificate ; task identifier ; description of the task ; deadline of submission ; total reword ; reward per solution ; encrypted task’s data(metadata) ; signature of posting task .
1: for each and do
2: if
3:  goto final; Certificate invalid or requester unregister
4: end if
5: then
6:  goto final; Posting task's signature invalid
7: end if
8: if getBalance() then
9:  goto final; Deposit Insufficient
10: end if
11: while is not expired do
12:  broadcast(, , , , ) as a new task identified by ;
13:  transfer();
14: end while
15: end for
16: final;
17: return;