DeFi Security Audit & Protocol Due Diligence

DeFi Security Audit — A DeFi security audit reviews both the code and the economics of a protocol: not only whether functions execute correctly, but whether the incentives, price sources, liquidation paths and composability assumptions still hold when an attacker arrives with a flash loan and full control of transaction ordering.

What a defi security audit covers

The largest DeFi losses are rarely pure implementation bugs. They are correct code operating on wrong assumptions: a price feed that can be moved, a bad-debt path with no backstop, a bonding curve that can be walked, a reward accounting model that can be farmed by entering and exiting inside one block. A reviewer who only reads Solidity will pass these.

We model your protocol as an adversary would: what is the cheapest capital that moves the system into a state you did not anticipate, and what does the attacker take out? That means invariant testing on solvency and share pricing, flash-loan-funded exploit simulation on a forked network, and a written review of every external protocol you depend on — because your risk includes their design decisions.

Vulnerability classes we look for

Oracle manipulation and price staleness

Spot reads from manipulable pools, insufficient TWAP windows, missing deviation and heartbeat checks, and fallback logic that silently degrades to a weaker source.

Flash-loan-enabled state manipulation

Any parameter derived from a balance, supply or reserve an attacker can inflate within one transaction — including governance weight, collateral value and reward rates.

Liquidation and bad-debt handling

Liquidations that are unprofitable at scale, partial-liquidation griefing, missing close factors, and insolvency paths with no socialisation mechanism.

Share price and vault inflation

First-depositor share inflation, donation attacks against ERC-4626-style accounting, and rounding that leaks value on every deposit or withdrawal.

Reward and emission accounting

Reward debt errors, checkpointing that can be skipped, claims that survive a withdrawal, and emissions that can be recycled in a loop.

Composability and dependency risk

Assumptions about integrated protocols that they never promised — pause behaviour, upgrade rights, fee switches, and re-entrant callbacks through a partner contract.

Governance capture and parameter risk

Borrowable governance tokens, timelocks that can be bypassed, and parameter ranges that allow an admin (or a compromised admin) to drain value legitimately.

Slippage, deadlines and MEV exposure

Unbounded slippage, deadlines set to block.timestamp, and routing that hands sandwichers a guaranteed profit at user expense.

In scope

Not in scope unless agreed

How the engagement runs

  1. Scoping and threat modelling

    We fix a commit hash, agree the in-scope contracts and read your architecture docs, then build a threat model: who the actors are, what the trust boundaries are, and which invariants must never break. Nothing is reviewed against assumptions we have not written down.

  2. Manual review

    Line-by-line review by at least two auditors working independently, focused on authorisation, accounting, upgrade paths, external integrations and the gap between what the code does and what the documentation claims it does. Most critical findings come from this phase, not from tooling.

  3. Static and dynamic analysis

    Static analysers appropriate to the language, plus property-based fuzzing and invariant testing to push the system into states no unit test covers. Tooling is used to widen coverage, never to replace the manual pass.

  4. Exploit-path simulation

    Candidate findings are proven on a forked network with a working proof of concept. We report what an attacker can actually do and what it costs them, not a theoretical severity label.

  5. Reporting

    Every finding gets a severity rating, reproduction steps, the affected code, the impact in concrete terms and a specific remediation. You get a draft for discussion before anything is finalised.

  6. Fix review and re-test

    We re-test every remediation against the original proof of concept and check that the fix has not opened a new path. The final report is yours to publish.

What you receive

How we rate severity

SeverityWhat it means
CriticalDirect loss of funds or permanent freezing of assets, exploitable by any actor.
HighLoss of funds or protocol insolvency under realistic conditions, or requiring a privileged actor to misbehave.
MediumBroken protocol behaviour, denial of service, or value leakage that does not directly drain the contract.
LowEdge-case incorrectness with limited impact, or an issue requiring implausible preconditions.
InformationalCode quality, gas efficiency, documentation mismatch and defence-in-depth suggestions.

Pricing

Single token contract: starts from $999, report in 24–48 hours. dApp, GameFi or RWA project: starts from $2,999. DeFi protocol, L2 / rollup, Bridge, ZK circuit, AI agent / MCP: scoped per project after we have seen the code.

DeFi Security Audit: frequently asked questions

What does a DeFi audit cover that a normal smart contract audit does not?

Economics. We test whether the incentives and price sources survive an adversary with flash-loan capital and control over ordering — bad debt, share inflation, reward recycling, governance capture — not just whether the functions are implemented correctly.

Do you write invariant tests for us?

Yes. We write the invariant and fuzzing harness as part of the review and hand it over, so your CI keeps testing the same properties long after the engagement ends.

Can you review a protocol that is already live with TVL?

Yes, and we prioritise differently: what is exploitable now, what can be mitigated by a parameter change today, and what needs an upgrade. Anything critical is reported the day we find it.

How do you handle protocols that integrate other protocols?

We treat every dependency as untrusted and document what you are assuming about it — pause rights, upgradeability, fee changes, re-entrancy through callbacks. Composability risk is written into the report as an explicit assumption list you can monitor.

What do you need from us to start an audit?

A repository or contract address, a commit hash to freeze the scope, whatever architecture or spec documentation exists, and a point of contact who can answer design questions. If documentation is thin we will write our understanding of the system back to you and ask you to confirm it — that step alone catches design-level bugs.

How long does an audit take?

A single token contract is 24–48 hours. A typical dApp or mid-sized protocol runs one to two weeks. Large DeFi systems, L2s, bridges and ZK circuits are scoped per project after we have seen the code. We will give you a fixed timeline with the quote, not an estimate that moves.

Is a re-test included after we fix the issues?

Yes. Fix review is part of the engagement, not an upsell. We re-run the original proof of concept against your patched code and confirm the fix has not introduced a new path.

Related security services

Get a fixed quote in 24 hours

Send the repository and a commit hash through the contact form, message @bugtester25 on Telegram, or book a 30-minute scoping call. 200+ protocols audited · $4B+ secured · 0 hacks post-audit. Prefer email? info@safeedges.in.