Teams often treat smart contract audits as only code review, but that is too narrow for DeFi. Audits also need to examine economic attack paths, oracle manipulation, composability risk, and operational controls such as monitoring and emergency response. If those pieces are excluded, a protocol can pass audit and still remain vulnerable to economically motivated exploitation.
Where DeFi audit failures usually start
DeFi teams most often narrow an audit to source-code correctness alone, then assume that a passing report means the protocol is safe to launch. That framing misses the point of a hostile financial system: the real question is whether the contract logic, the economic incentives, and the surrounding operations can still be manipulated into loss after deployment.
A useful audit therefore starts by asking what the protocol depends on, not just whether each function compiles or each require statement looks sensible. Price feeds, liquidation logic, reward calculations, governance hooks, upgrade paths, and cross-protocol assumptions can all become attack surfaces when a design is composable and capital can move quickly.
The practical consequence is that an audit has to follow value flow. If a design can be pushed into a bad state through oracle distortion, flash-loan-enabled imbalance, governance capture, or a broken dependency on another protocol, then the code review alone has not answered the security question.
Why code review is not enough for DeFi
Smart contract defects are only one class of failure. DeFi protocols are exposed to incentive shaping, asynchronous market conditions, and external system behaviour, so a design can be locally correct and still globally unsafe. The auditor needs to test whether the protocol still behaves acceptably when inputs are manipulated, liquidity is thin, or integrations do not behave as assumed.
That is why economic attack paths matter. A malicious actor may not need to break the contract in the traditional sense if they can profit from price manipulation, time-based imbalance, MEV conditions, or the protocol's own reward and liquidation mechanics. In practice, this means the audit scope should include assumptions about market depth, oracle freshness, slippage bounds, and whether the protocol can be forced to execute at the wrong price or time.
Composability is another common blind spot. In DeFi, a contract is rarely isolated, so one protocol's safety can depend on another protocol's honesty, uptime, or parameter choices. If those dependencies are not explicitly reviewed, the audit may certify a contract that is only safe in a laboratory, not in a live chain where external contracts can fail, change, or be adversarially interacted with.
What a practical DeFi audit should cover
An effective audit combines technical, economic, and operational review. Teams should expect the process to examine the code, the protocol design, and the controls around monitoring and response, because each layer can determine whether a loss is prevented, detected, or limited.
- Economic design, including reward models, liquidation incentives, governance incentives, and manipulations that can make an apparently valid trade or vote harmful.
- Oracle and pricing assumptions, including stale data, manipulation resistance, fallback behaviour, and what happens when feeds disagree.
- Composability and dependency risk, including external contracts, bridges, routers, vaults, and any integration that can change state or pricing upstream.
- Operational resilience, including alerting, pause controls, incident escalation, and whether the team can react before losses compound.
For teams that want a governance lens on this problem, NHIMG’s Ultimate Guide to NHIs, Regulatory and Audit Perspectives is useful because it frames audit evidence, access governance, and control obligations as part of the security picture rather than an afterthought. The broader lifecycle and visibility angle in the NHI Lifecycle Management Guide also helps teams think about ownership and control continuity when systems change quickly.
Risk and Threat Considerations
DeFi audits fail most dangerously when they certify a protocol that is safe only under honest inputs and normal market behaviour. Attackers look for places where the protocol trusts a price, a dependency, or an operational assumption that can be pushed out of bounds faster than the team can react.
Failure mechanism: Economic manipulation, oracle distortion, composability failures, and weak operational response let an attacker extract value without ever needing a classic code exploit.
Impact: Losses can scale quickly because the protocol may continue operating and compounding damage until liquidity is drained, positions are liquidated incorrectly, or emergency controls are too slow to matter.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | CIS 4 — Secure Configuration of Enterprise Assets and Software | DeFi audits must test protocol and operational configurations that shape exposure. |
| CIS 8 — Audit Log Management | Monitoring and response are part of audit scope for DeFi operational resilience. | |
| CIS 16 — Application Software Security | Smart contract and surrounding application logic need security testing beyond code review. | |
| Recommendation — Review and harden protocol configurations, pause controls, and operational settings before launch. Enable and retain logs that support rapid detection and incident investigation. Test contract logic, dependency assumptions, and abuse cases before deployment. | ||
| NIST CSF 2.0 | RS.MI — Mitigation | DeFi teams need rapid containment when a protocol is under active exploitation. |
| DE.CM — Continuous Monitoring | Audits should confirm the protocol can detect abnormal behaviour and manipulation. | |
| GV.RM — Risk Management Strategy | DeFi audit scope must reflect economic, oracle, and dependency risk, not code alone. | |
| Recommendation — Build and rehearse containment actions that can stop losses quickly. Continuously monitor on-chain and operational signals for abnormal protocol behaviour. Include economic attack paths and dependency risk in the protocol risk strategy. | ||
| OWASP Agentic AI Top 10 | A1 — Agent Goal Manipulation and Misalignment | DeFi automation and bots can be steered into harmful actions through manipulated inputs. |
| A3 — Tool Abuse and Unauthorized Actions | Operational automation around DeFi can become an attack path if tools are misused. | |
| Recommendation — Constrain automated actions so manipulated inputs cannot trigger harmful execution. Restrict tool-enabled actions to the minimum authority needed for protocol operations. | ||
| MITRE ATT&CK | T1659 — Content Injection | Manipulated inputs such as feeds or external data can drive harmful protocol decisions. |
| Recommendation — Hunt for manipulated inputs that can alter protocol decisions or pricing. | ||
Practitioner Guidance
What to prioritise: Treat oracle design, liquidation mechanics, and external dependencies as first-class audit targets, then test them under adverse market conditions rather than assuming the happy path. If the protocol cannot tolerate manipulated inputs or rapid state changes, the audit is incomplete.
What to verify: Check that the team can prove how monitoring, pause authority, and incident response work in practice, not just on paper. A protocol that can be exploited but cannot be frozen or observed quickly enough has not really reduced risk, it has only documented it.
Practitioner takeaway: A DeFi audit is only meaningful when it answers both “is the code correct?” and “can the protocol still be economically attacked anyway?”
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org