Lending Protocol Security Audit

Lending Protocol Audit — A lending protocol audit reviews the full credit lifecycle of a money market — collateral valuation, borrowing limits, interest accrual, liquidation and bad-debt handling — to establish whether the protocol can be made insolvent by price movement, market conditions or a deliberately constructed position.

What a lending protocol audit covers

Lending markets fail in a small number of well-understood ways: an asset is listed with parameters that do not match its liquidity, liquidations stop being profitable exactly when they are most needed, an oracle prints a wrong price for one block, or interest accrual and share accounting drift apart. Each of these has drained a major protocol.

We audit the mechanism, not just the code. That means checking collateral factors against real market depth, simulating liquidation cascades at scale, testing what happens when a liquidator cannot repay in the same block, and confirming that a position can never be opened that the protocol cannot close profitably.

Vulnerability classes we look for

Collateral factor and asset listing risk

Parameters set without reference to on-chain liquidity, correlated collateral treated as independent, and long-tail assets listed with blue-chip parameters.

Liquidation profitability and cascades

Incentives too small to attract liquidators under gas spikes, close factors that leave dust positions, and cascade behaviour that moves the price against the protocol.

Bad debt and insolvency handling

No socialisation path, no reserve backstop, and accounting that keeps lending against collateral that no longer exists.

Interest rate model errors

Accrual skipped in some paths, utilisation calculations that can be manipulated, rounding that quietly favours borrowers, and kinks that can be pinned by a single actor.

Oracle failure modes

Staleness, deviation, sequencer downtime on L2s, and fallback oracles with different security assumptions than the primary.

Interest-bearing and rebasing collateral

Balance changes outside transfers, exchange-rate manipulation of LSTs and vault shares, and depeg behaviour of wrapped assets.

Borrow-side re-entrancy and ordering

Health checks that run before state settles, and callbacks during transfer that let a borrower act while the position looks healthy.

Isolated market and mode configuration

E-mode style categories with parameters that break the underlying assumption, and isolation limits enforced in one path but not another.

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.

Lending Protocol Audit: frequently asked questions

Do you review our risk parameters as well as the code?

Yes. Collateral factors, liquidation bonuses, caps and rate curves are reviewed against real on-chain liquidity for each listed asset. Parameters that are safe on paper and unsafe in a thin market are a finding, not a footnote.

Can you simulate a liquidation cascade?

Yes. We simulate on a forked network with realistic depth, including gas spikes and liquidator capital limits, and report the price move at which liquidations stop being profitable.

How do you handle liquid staking tokens as collateral?

As their own risk class: exchange-rate manipulation, withdrawal queue delays, depeg behaviour in stress, and whether your oracle prices the wrapper or the underlying.

Do you cover L2-specific risks?

Yes — sequencer downtime feeds, delayed oracle updates, and forced-inclusion behaviour, all of which change whether a liquidation can happen when it needs to.

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.