Home/Services/DeFi Protocol Security Audit
security service

DeFi Protocol Security Audit

DeFi protocol security audit by certified engineers: manual Solidity review, flash-loan and oracle testing, PoC exploits and a free retest.

Manual, expert-ledEvidence-based findingsFree remediation retest

A DeFi protocol security audit is the difference between shipping a lending market that holds hundreds of accounts and watching a flash-loan drain it in one block. We read your Solidity or Vyper line by line, model the economics an attacker would abuse, and hand you findings your engineers can fix before mainnet.

What a DeFi protocol security audit covers

Most audits that go wrong were scoped too narrowly. A contract can be mathematically correct and still lose funds because an oracle can be nudged, a reward curve can be gamed, or an admin key sits on a single hot wallet. We scope the whole system: the contracts, the incentives that move value through them, and the off-chain pieces that feed them data. That means the token, the vault or pool logic, the governance path, and every privileged function that can move or freeze assets.

Line-by-line manual review of every Solidity or Vyper contract in scope
Reentrancy, integer and rounding errors, and unchecked external calls
Price-oracle manipulation and flash-loan attack paths
Access control on mint, pause, upgrade and treasury functions
Proxy and upgradeability patterns, storage layout and initializer safety
Economic and tokenomics review: incentives, MEV exposure, front-running
Gas and denial-of-service surfaces that can brick core flows

On-chain scope

The contracts you deploy are the core of the engagement. We work from a fixed commit hash so there is no moving target, review the full call graph, and trace how value enters and leaves each contract. Libraries you inherit from, such as OpenZeppelin, get a version and configuration check rather than a blind pass, because the vulnerable pattern is often in how a safe library was wired up.

Off-chain and integration scope

Price feeds, keeper bots, relayers, and the front end that constructs transactions all shape what an attacker can do on-chain. A protocol that trusts a single spot price from one pool is exposed no matter how clean the contract reads. We map these dependencies and test the assumptions your contracts make about the data they receive.

How we run a DeFi audit

This is manual work supported by tooling, not a Slither run pasted into a PDF. Static analyzers flag patterns; they do not understand that your liquidation function can be starved by a griefing attacker, or that a rounding direction hands a few wei to the wrong party on every trade until it compounds. Our engineers read the code the way an attacker reads it, looking for the state the developers did not expect to reach.

Phase 1: specification and threat model

We start by writing down what the protocol is supposed to do, invariant by invariant. Total supply should equal the sum of balances. A borrower should never withdraw more collateral than backs their debt. Fees should never exceed the configured cap. These invariants become the things we then try to break, and they become the properties we assert against in fuzzing.

Phase 2: manual review

Each contract gets read in full by an engineer who has audited comparable systems. We annotate every external call, every place arithmetic can overflow or truncate, and every function that changes ownership or permissions. Reentrancy gets special attention because the checks-effects-interactions pattern is easy to state and easy to violate in a helper three calls deep.

Phase 3: dynamic testing and fuzzing

We fork mainnet with Foundry and drive the protocol against real token contracts, real oracles, and real liquidity, so an exploit we write actually executes on a realistic state. Property-based fuzzing with Echidna or Foundry’s invariant testing throws thousands of random sequences at the contracts to find the input ordering that breaks an invariant. Where the logic is subtle, symbolic execution and Mythril help enumerate paths a human might miss.

Phase 4: exploit development

A finding is worth more when it comes with a working proof of concept. For a high-severity issue we write the exploit as a test that drains or freezes value on a forked chain, so your team can reproduce it in one command and confirm the fix closes it. No hand-waving about theoretical impact.

Phase 5: reporting and remediation

You get a report with every finding rated by severity, the code location, the exploit or reproduction steps, and a concrete fix. We then review your patches. The free retest confirms the fix works and, just as important, that it did not open a new hole somewhere adjacent.

1 block
how fast a flash-loan exploit can drain an unaudited pool
100%
manual line-by-line review, tooling supports it, never replaces it
Free
retest after your team fixes the findings

Vulnerability classes we hunt in DeFi

Smart-contract bugs cluster into a handful of families that account for most real losses on-chain. Knowing the family is not the same as finding the instance, but it tells you where to dig hardest.

Reentrancy and external-call ordering

Classic single-function reentrancy is well understood, yet cross-function and read-only reentrancy still catch teams out, especially in protocols that expose a view function other contracts price against. We check every path where control leaves your contract before state is settled.

Oracle manipulation and flash loans

Flash loans let an attacker borrow enormous size for the length of one transaction at zero capital risk. If any of your logic reads a price that a large trade can move, that price can be manipulated for free inside the same block. We test time-weighted feeds, Chainlink integrations, and any spot-price reads for exactly this.

Arithmetic, rounding and precision

Solidity 0.8 removed silent overflow, but rounding direction, precision loss in fixed-point math, and division-before-multiplication still leak value. In a high-frequency AMM or lending market, a one-wei error that rounds in the wrong direction becomes a real drain over millions of transactions.

Access control and privilege

Who can pause the protocol, who can upgrade it, who can move the treasury. We check that privileged functions are gated, that role changes are two-step where they should be, and that an initializer cannot be called twice or front-run on a fresh proxy.

Upgradeability and storage collisions

Proxy patterns are powerful and dangerous. A storage-layout mistake between implementation versions can corrupt balances; an unprotected upgrade function is a total loss waiting to happen. We map your storage slots across versions and confirm the upgrade path cannot be hijacked.

Economic and MEV exposure

Some attacks break no line of code and still cost users money. Sandwich attacks, just-in-time liquidity, governance vote-buying, and incentive loops that reward the wrong behavior are design problems. We model the game your protocol creates and tell you where the rational move is also the harmful one.

Get a fixed quote

Want this tested on your own systems?

Free 20-minute scoping call, a fixed price with no hourly surprises, and a free retest once you fix what we find.

Get a fixed quote

Tools we use, and where they stop

Slither and its detectors give us a fast first map of the codebase. Mythril and symbolic tooling enumerate execution paths. Foundry and Echidna drive fuzzing and mainnet-fork exploits. Tenderly helps us trace a failing transaction. All of that speeds the work, but every reported finding is confirmed by a human, because the bugs that cost real money are the ones a scanner cannot reason about: intent, incentives, and the interaction between two contracts that individually look fine.

What you get

The deliverable is built to be read by two audiences. Your engineers need the technical detail; your investors, exchange listing team, or launch partners need something they can trust at a glance.

Executive summary

A short, honest read on the protocol’s security posture, the count of findings by severity, and whether we would be comfortable seeing it hold significant value on mainnet.

Technical findings

Every issue with a severity rating, the affected contract and line, a description of the attack, a proof of concept where the severity warrants it, and a specific remediation. We prioritize so your team fixes the flash-loan drain before the missing event emission.

Retest and attestation

After you remediate, we retest at no extra cost and issue a summary of what was fixed. Many teams publish the report; we write it knowing it may be public, so it is accurate and defensible.

Standards and good practice we test against

Smart-contract security does not have a single legal framework the way payments or health data do, but there is a strong body of practice. We test against the Smart Contract Weakness Classification (SWC) registry, the guidance in the Ethereum and OpenZeppelin secure-development literature, and the patterns behind the largest historical exploits. For teams that also fall under EU financial rules, we can align the report so it supports wider security-testing obligations under frameworks such as DORA where the protocol sits inside a regulated entity.

Preparing your protocol for audit

The audits that go smoothly share a few habits, and they cost less because our engineers spend their time on logic instead of untangling a moving codebase. Freeze the code at a commit and stop changing it during the review; a target that shifts every day means findings get written against code that no longer exists. Ship us the tests you already have, because a healthy test suite tells us what invariants you believe hold, and those are the first things we try to break.

Documentation that speeds the work

A short spec of what each contract is meant to do, a description of the privileged roles and who holds their keys, and an explanation of the economic model save days. If the mechanism is novel, a whiteboard walkthrough with your engineers at the start is worth more than any document, because it lets us build the threat model against your actual intent rather than our guess at it.

Cross-chain and bridge exposure

If your protocol spans chains or depends on a bridge, that surface deserves its own attention. Message-passing bugs, replay across chains, and trust assumptions about a relayer or validator set have produced some of the largest losses on record. We scope this explicitly rather than folding it into a single-chain review, because the failure modes are different and the blast radius is larger.

Governance and admin risk

A protocol can be flawless at the contract level and still be captured through governance. We look at proposal thresholds, timelocks, vote delegation, and whether a flash loan can borrow enough voting power to push a malicious proposal through in a single block. The admin keys get the same scrutiny: a multisig with a low threshold or keys on hot wallets is a design decision we will flag plainly.

Pricing

Pricing tracks complexity: how many contracts, how many lines, how novel the mechanism, and whether the code is frozen or still moving. A single well-scoped token or vault is a very different job from a cross-chain lending market with governance and an upgrade path.

Engagement What’s included Timeline Price
Single contract One token, vault or standalone contract at a fixed commit; manual review, static analysis, report and free retest 4–6 working days from €6,000
Protocol audit A full protocol of several interacting contracts, mainnet-fork exploit testing, invariant fuzzing, economic review 8–15 working days €10,000–€25,000
Complex / cross-chain Multi-contract systems with governance, upgradeability, bridges or novel mechanisms; deep MEV and tokenomics modeling 15–25 working days €25,000–€60,000+
Retest & sign-off Verification of remediations from a prior audit, updated report and attestation 2–4 working days from €2,500
Custom / large estate Multiple protocols, ongoing pre-launch reviews, or a retained audit relationship, scoped after a call on scoping custom

Every engagement is fixed-price, quoted after a free 20-minute scoping call, and a retest is included. Get a fixed quote

FAQ

How much does a DeFi protocol security audit cost?
A single contract starts from €6,000, and a full protocol audit typically runs €10,000–€25,000 depending on the number of contracts and the complexity of the economics. You get a fixed price after a short scoping call once we have seen the code and the commit you want frozen.
How long does an audit take?
A standalone contract is usually 4–6 working days, a full protocol 8–15, and a complex cross-chain system with governance can run three to five weeks. We share critical findings the moment we confirm them, not only at the end.
Do you write proof-of-concept exploits?
Yes. For high and critical findings we ship a runnable Foundry test that reproduces the attack on a mainnet fork, so your team can confirm both the bug and that the fix closes it.
Is the audit just a Slither or Mythril report?
No. We run those tools to map the code quickly, but every finding is the result of manual review. The bugs that drain protocols are logic and economic flaws that automated scanners cannot reason about.
Do you review tokenomics and MEV, or only the code?
Both. We model the incentives the protocol creates, including sandwiching, front-running, just-in-time liquidity and governance attacks, because some of the worst losses come from a design that is technically correct but economically exploitable.
Can you audit an upgradeable proxy setup?
Yes. We check storage layout across implementation versions, initializer safety, and the upgrade authorization path, since a storage collision or an unprotected upgrade function is a total-loss risk on its own.
Will the findings stay confidential?
We work under NDA and handle your code and the report securely. Many teams choose to publish the final report after remediation, so we write it to be accurate and defensible either way.
Do you offer a retest after we fix the issues?
Yes, a retest is included. We verify each remediation and confirm the fix did not introduce a new issue in adjacent code before signing off.

Related services

Who needs this

Teams launching a lending market, AMM, staking or yield protocol, projects preparing for an exchange listing or an investor’s security requirement, and established protocols shipping a major upgrade that will move real value on mainnet.

why safetybis

Security you can prove

The same standard on every engagement, big or small.

Evidence, not opinions

Every finding ships with a reproduction and proof of concept — no vague "maybe vulnerable".

Humans over scanners

Certified engineers find the logic flaws and chained attacks automated tools walk straight past.

Fixed price, free retest

You know the cost up front, and verifying the fix is part of the deal — not a second invoice.

500+
assessments delivered
<30min
incident first response
12k+
infections removed
98%
fixed within one retest
$ safetybis quote --service "DeFi Protocol Security Audit"

Ready to lock this down?

Free scoping call, fixed price, free retest. Tell us what you're running and we'll take it from there — usually within one business day.

get in touch

Tell us what you're running

Scoping is free. We reply within one business day, and under 30 minutes for active incidents.