The Underlying Logic of Queuing Gangs: Proof of Work