The application discloses a
smart contract vulnerability detection method and
system based on an LLM and a
verification agent, relates to the technical field of
software security and
artificial intelligence, and comprises the following steps: performing
preliminary analysis on to-be-detected
smart contract code by using a large
language model, and obtaining structured data containing suspicious
vulnerability positioning information; extracting corresponding code slices based on the positioning information, and converting the to-be-detected
smart contract code into at least two formal structure representations to extract corresponding structure fragments; constructing a plurality of heterogeneous
verification input pairs based on the code slices and the structure fragments, independently verifying the structured data by using a plurality of independent
verification agents, and outputting verification results; making a decision by aggregating the verification results of the verification agents; if the decision is positive, confirming that a
vulnerability exists and outputting a final detection result; otherwise, triggering a feedback mechanism, generating optimization instructions based on the verification results, and driving the large
language model to perform reanalysis.