Crowdsensing applications collect large-scale sensing data by ubiquitous users carrying with smart devices. In crowdsensing applications, the quality of sensing data depends on the participation of high-skilled users, thus the users should be compensated for their resource consumption in the sensing task. Existing incentive mechanisms are difficult to meet the security requirements in the distributed environment of crowdsensing applications. For example, the reputation mechanism may suffer sybil attacks and whitewash attacks, which is unfair to honest users. The reciprocity mechanism is not flexible. The monetary scheme could make up the defects of the two preceding mechanisms, but it either relys on a central authority or does not give an explicit digital currency system which is provably secure, leading to possible system collapses or potential privacy disclosure caused by the ‘trusted’ center. In this paper, we propose a blockchain based incentive mechanism which uses a distributed architecture that is proved to be secure. In this distributed secure architecture, the participant users can be regarded as the nodes in a blockchain, and the payment transactions are recorded in the blockchain. The transactions will be verified by a majority of miners in the blockchain and they cannot be modified after being accepted by the miners. The incentive mechanism can prevent a part of participant users launching collusion attacks, and avoid the security threats brought by a trusted third party. Simulation experiments demonstrate the security strength and feasibility of the proposed incentive mechanism.