The application combines the technical field of dynamic analysis, and provides a consortium chain contract
threat detection method, which can detect and process security vulnerabilities of a contract before the contract is formally deployed. The main scheme includes an
index function generation module: through a large amount of data, the execution characteristics of the contract are obtained by simulating the execution of the contract, and an
index function is constructed; a data variation module: inputting the specification data sample of the execution contract, according to the execution characteristics of the contract and the format requirements of the data, selecting the correct fuzz strategy, generating the data after variation, caching the data after variation, and waiting for the
threat discovery module to request or provide data for re-variation; a
threat discovery module: obtaining the data after variation from the data variation module, simulating the execution of the contract, obtaining the execution result of the variation data, and matching with the
index function, if the deviation reaches a certain value, a threat warning is output.