(1)Initialise , , and
(2)for i = 1 : M
(3)   broadcast ()
(4)  For s = 1 : P
(5)      if accept () = true then
(6)          send ( feedback, to )
(7)          send (cooperative instructions and relay data packets, to )
(8)          data packets ⟵ aggregate ( relay data packets)
(9)          data packets ⟵ concatenate ( relay data packets, own data)
(10)          send (data packets, to sink)
(11)         if cooperative Transmission fail = false then
(12)             reward ()
(13)         else
(14)             no reward ()
(15)         end
(16)      else
(17)         go to step (4)
(18)      end
(19)  end
(20)end
Algorithm 1: Operation of contract incentive mechanism.