📦

Audit History

defi-protocol-templates - 5 audits

Version comparison

Capability and finding changes across audited versions, newest first.

VersionDateResultReview itemsChange vs previous
v5 LatestJul 23, 2026, 09:50 PM 5 confirmed0No capability change
v4 Jul 8, 2026, 10:58 AM 1 confirmed0No capability change
v3 Jul 5, 2026, 11:14 PM No confirmed findings0Contains scriptsExternal commands
v2 Jun 30, 2026, 02:50 PM 5 confirmed0No capability change
v1 Feb 24, 2026, 08:10 PM No confirmed findings0Baseline

Jul 23, 2026, 09:50 PM

All 26 static findings are false positives caused by Solidity require statements and Markdown backticks, not dynamic loading, command execution, or reconnaissance. Semantic review found exploitable token-handling and receiver-authorization flaws, missing slippage protections, and a broken flash-loan repayment flow in examples described as production-ready.

1
Files scanned
475
Lines analyzed
7
Review items
0
False positives ignored

Confirmed security concerns (5)

High
Unauthenticated Flash-Loan Callback Grants Token Allowance
The receiver accepts calls from any address and approves that caller to spend the requested asset. An attacker can request an allowance and drain held tokens.
The callback has no caller or asset validation and directly approves msg.sender for amount plus fee. This creates a clear unauthorized-spending path.
High
Unsafe ERC20 Transfer and Accounting Assumptions
Several contracts ignore ERC20 return values and update accounting from requested amounts. Failed or fee-charging transfers can create unbacked balances, shares, or payouts.
The examples call transfer and transferFrom without SafeERC20 or return checks, while state changes use nominal inputs. Nonstandard ERC20 behavior makes the accounting unsafe.
High
AMM Omits User Slippage and Deadline Controls
Liquidity and swap functions accept no minimum return or deadline. Users cannot constrain adverse price movement, enabling sandwich losses and stale execution.
The public AMM methods expose only amounts and token selection. No minimum shares, minimum output, maximum input, or transaction deadline is enforced.
Medium
Flash-Loan Repayment Flow Is Inconsistent
The receiver grants an allowance, but the provider never pulls repayment. The sample receiver therefore leaves the provider balance unchanged and positive-fee loans revert.
The provider only checks its final balance, while the receiver only calls approve. No transferFrom or direct repayment connects those operations.
Medium
Unaudited Examples Are Presented as Production-Ready
The skill calls these templates production-ready despite exploitable authorization and token-accounting flaws. This claim may encourage unsafe deployment without required hardening.
The production-ready claim is explicit, while the document itself recommends testing and professional audits and contains concrete exploitable flaws.
Audited by: codex

Jul 8, 2026, 10:58 AM

The static script and command findings are false positives caused by Solidity require statements and Markdown code fences. No prompt injection, data exfiltration, or host command execution was found. Manual review found a high-risk content issue because simplified DeFi examples are presented as production-ready templates.

1
Files scanned
475
Lines analyzed
3
Review items
0
False positives ignored

Confirmed security concerns (1)

High
Unsafe Production DeFi Template Claims
The skill presents simplified Solidity examples as production-ready templates. The AMM, governance, and flash loan examples omit deployment-grade safety controls, which could lead users to copy unsafe fund-handling logic.
Line 11 claims production-ready templates, while the cited contract sections show simplified AMM, placeholder governance execution, and incomplete flash-loan repayment handling. The evidence is direct, although some code may be intended as illustrative documentation.
Audited by: codex

Jul 5, 2026, 11:14 PM

All static findings are false positives caused by Solidity require statements and Markdown backticks in SKILL.md. I found no prompt injection, command execution instructions, data exfiltration intent, or host reconnaissance behavior. Users should still audit any generated smart contracts before deployment.

1
Files scanned
467
Lines analyzed
2
Review items
0
False positives ignored
Audited by: codex

Jun 30, 2026, 02:50 PM

The static script, external command, C2, and weak cryptography findings are false positives caused by Solidity syntax, Markdown code fences, and DeFi terminology. No prompt injection, network exfiltration, filesystem access, or executable automation was found in SKILL.md. The remaining risk is semantic: the skill presents simplified DeFi contracts as production-ready, which could lead users to deploy unsafe financial code without review.

1
Files scanned
467
Lines analyzed
5
Review items
2
False positives ignored

Confirmed security concerns (5)

Medium
Production-Ready Claim for Unaudited DeFi Templates
The skill describes the Solidity examples as production-ready, but the included contracts are simplified templates for high-value financial systems. Users could deploy them without sufficient audit, testing, or threat modeling.
The production-ready wording is explicit, and the file contains deployable Solidity examples. The risk depends on user behavior, so this is a marketplace safety concern rather than confirmed malware.
Medium
Raw ERC20 Calls in Financial Templates
The staking, AMM, and flash loan examples call ERC20 transfer, transferFrom, and approve directly. This can mishandle non-standard tokens and should use hardened token transfer helpers.
The raw ERC20 calls are directly visible in the cited code. They are common in examples, but they are risky in production DeFi templates.
Medium
AMM Template Omits User Price Protection
The AMM swap and liquidity functions do not include minimum output, minimum shares, deadline, or oracle-aware protections. This exposes users to slippage and MEV risks if copied directly.
The AMM functions are present and lack user-supplied protection parameters. This is a clear smart contract design gap, though not malicious intent.
Medium
Governance Template Is Incomplete for Real Execution
The governance contract records votes but leaves proposal execution as a placeholder. It also lacks quorum, timelock, proposal payload validation, and execution target controls.
The cited code shows vote accounting and a placeholder execution comment. The missing controls are material for production governance systems.
Low
Static Script Findings Are Solidity Require Statements
The analyzer flagged Solidity require statements as dynamic script loading. These lines are input checks inside smart contracts, not JavaScript require calls or dynamic module loading.
Every cited line is within a Solidity code block and uses Solidity require semantics. No host language dynamic import or require call is present.
Static false positives ignored (2)

These static matches were dismissed by semantic review or matched schema-only tokens, so they are shown for transparency but do not drive the quality score.

Low
Static External Command Findings Are Markdown Syntax
The analyzer flagged Markdown backticks and code fences as shell execution. These are documentation delimiters and inline file references, not Ruby or shell command execution.
The cited locations are Markdown fences or an inline resource path. No shell interpreter, process execution, or command string appears.
Low
C2 and Weak Cryptography Findings Are Terminology Matches
The high-risk keyword matches occur in Solidity imports, contract names, token fields, proposal descriptions, and DeFi best practices. No evidence found of command and control behavior or weak cryptographic implementation.
The suspicious terms are explained by DeFi and Solidity context. I found no network endpoint, encoded payload, persistence mechanism, or cryptographic algorithm implementation.

Detected Patterns

Unaudited Financial Contract TemplatesDirect Token Transfer PatternSimplified Flash Loan Callback Flow
Audited by: codex

Feb 24, 2026, 08:10 PM

Static analyzer produced false positives by misidentifying Solidity smart contract code as malicious scripts. All flagged patterns (require statements, C2 keywords, crypto algorithms) are standard DeFi/smart contract constructs. The skill contains educational Solidity templates only with no code execution, network access, or filesystem operations. Safe for publication.

1
Files scanned
469
Lines analyzed
0
Review items
0
False positives ignored
No confirmed security findings were recorded for this completed audit.
Audited by: claude