I tested local models on ten tiny Solidity contracts, planting bugs such as:

  • Reentrancy in withdraw functions
  • Missing access modifiers
  • ERC4626 rounding errors
  • Faulty signature checks
  • Subtle logic bugs

I ran Qwen2.5-Coder against DeepSeek-Coder on 7B models (or smaller) via Ollama on WSL2. If you use 33B models, ignore this.

For each contract I issued three prompts:

  • A general security review
  • A targeted check for reentrancy and access control
  • A structured report with severity tags

Instruction Following

Qwen 7B wins here. It obeys strict formatting rules almost every time. DeepSeek often adds extra text or ignores limits. When you feed model output into an automated pipeline, Qwen’s consistency matters—a parsing-fail is useless.

Targeted Checks

Qwen stays on topic. Ask it about reentrancy and it replies about reentrancy. DeepSeek wanders into gas optimization or style notes, adding noise.

Explanation Quality

Qwen spells out attack sequences clearly, showing how an exploit unfolds. DeepSeek offers generic textbook answers. Both are correct, but Qwen’s detail helps report writing.

Skepticism and Hallucination

DeepSeek flags more issues, acting like a “suspicion generator.” It also invents problems in clean code.

Qwen, by contrast, goes silent when code is buggy. DeepSeek, on the other hand, claims bugs that don’t exist.

A false alarm costs minutes; a missed bug can cost everything. I lean on DeepSeek to surface things to investigate, but I rely on Qwen for automation.

My Final Verdict

Model size matters more than brand. A 1.5B model can’t reason through multi-step bugs or keep to format.

At 7B, both handle basic flaws, yet neither replaces a human auditor for complex business logic. Think of them as triage assistants, not auditors.

My setup:

  • Qwen 7B: Default for structured reviews and pipelines.
  • DeepSeek: Second opinion to catch what Qwen misses.
  • Qwen 1.5B: Fast, low-stakes filtering only.

Buy the biggest model your hardware can run. Then worry about brand.

Do you prefer a model that is suspicious or a model that is precise?

Source: https://dev.to/pavelespitia/qwen25-coder-vs-deepseek-coder-for-solidity-review-what-i-actually-see-locally-4jh8

Optional learning community: https://t.me/GyaanSetuAi