$1,000,000 in security audit grants are live now, Apply here →

← Resource Hub

Lending Protocol Audit Checklist: 40 Money Market Checks

By the Guardian team Updated 6 min read

Lending Protocol Audit Checklist: 40 Money Market Checks

Quick answer. A lending protocol audit should check how collateral is priced and capped, how interest and debt are accounted, whether liquidations work under stress, who can change parameters, and how integrated tokens behave. The 40 checks below cover each.

Watch: Lending Protocol Audit Checklist: 40 Money Market Checks 1:43
Video transcript

Lending protocols lend against collateral they price themselves. Get the price, debt math or liquidation wrong, and lenders absorb the bad debt.

In February 2026, YieldBlox lost about 10.97 million dollars. One trade, on a market with under one dollar of hourly volume, set its collateral price.

Size caps to market depth, and reject any price a single trade can set. Enforce supply caps on direct transfers, and verify every signed price update.

At Resupply, a donation to an empty vault made the exchange rate round to zero, and every borrow passed the solvency check.

Seed new markets in the transaction that activates them, defend share prices against donations, block rounding to zero, and accrue interest before parameter changes.

Euler lost about 197 million dollars when its donation function skipped the health check. The attacker made a position insolvent, then liquidated it at a discount.

Check health after every collateral decrease. Insolvent positions must still liquidate, pending withdrawals cannot block them, and every path pays liquidators enough.

Every setter needs an owner, a bound and often a delay. Integrated tokens and their contracts become part of your solvency too.

Guardian publishes this checklist, and each finding links to its report. Guardian's two-week Dolomite review found 2 Critical and 4 High issues.

Read all 40 checks in the full article, or talk to Guardian at guardian.security.

A lending protocol lends out depositors’ money against collateral it prices itself. If the price, the debt math or the liquidation is wrong, lenders absorb the bad debt.

This year has shown how small the entry point can be. YieldBlox, Venus and Bonzo each lost millions through one collateral asset and its price.

This checklist groups 40 checks by area, for pooled money markets and CDP designs alike. Most map to a public incident or a finding in Guardian’s lending reports.

Collateral, Oracle and Listing Checks

In February 2026, YieldBlox lost about $10.97 million on Stellar. One collateral asset, USTRY, traded on a market with under $1 of hourly volume, per Rekt.

One trade pushed USTRY from about $1.06 to $106.74. The oracle took that trade as the price, and the pool lent against it.

In March, an attacker sent THE tokens straight to Venus’s vTHE contract. A post-mortem by AllezLabs says supply caps were checked only on mint, so the cap never saw them.

THE’s price was then pushed from about $0.26 to nearly $4. Venus was left with about $2.15 million of bad debt.

In July, Cointelegraph reported that Bonzo Lend on Hedera lost about $9 million. Bonzo traced it to Supra’s oracle verifier, which accepted a manipulated SAUCE price carrying a zeroed signature.

  1. Size LTVs, supply caps and borrow caps to each asset’s real market depth.
  2. Reject any price source a single trade can set, such as a thin market (YieldBlox).
  3. Enforce supply caps on every balance increase, including direct transfers (Venus).
  4. Verify every signed price update: signature, fields and decimals (Bonzo).
  5. Reject zero, negative and stale prices, with a staleness limit per feed (Sentiment M-20 and M-07; Tenor).
  6. Price each asset from its own feed, never a fixed $1 (Ambit, High) or another token’s feed (Abracadabra, High).
  7. Never let a borrowed asset count as its own collateral (Sentiment, Critical).
  8. Keep max LTV below 100%, so a small oracle lag cannot be borrowed against (Sentiment, High).
  9. Setting an LTV to zero must not freeze positions or block liquidations (Sentiment, High).

For manipulation of onchain prices, see our oracle manipulation guide.

Interest and Debt Accounting Checks

Share and debt math fails at the edges. In June 2025, Resupply took on about $10 million of bad debt from a market built on an empty vault.

The attacker inflated the vault’s share price with a donation. Resupply’s exchange rate then rounded to zero, and its solvency check passed every borrow.

Sonne Finance, a Compound v2 fork, lost about $20 million in May 2024 to a known donation attack.

Rekt reports that its new market’s activation was executable by anyone once its timelock expired, and the attacker ran it in the same transaction as the attack.

  1. Seed new markets in the transaction that activates them, and never build on an empty vault (Sonne, Resupply).
  2. Defend share prices against donations, and check nothing can undo the defense (Buttonwood).
  3. Check that no rounding can turn an exchange rate or debt value into zero (Resupply).
  4. Round debt up and collateral down, and let borrowers repay in full (Sentiment, High).
  5. Accrue interest before any rate model or parameter change (Sentiment; Impermax).
  6. Accrue interest before pausing or unpausing a market (Ambit).
  7. Compute utilization as borrows over total assets, with nothing counted twice (Sentiment, High).
  8. Allow only vetted rate models: a malicious one can report fake interest (Sentiment, High).

For the share math behind donations, see the ERC-4626 inflation attack.

Liquidation Checks

Euler lost about $197 million in March 2023. Rekt reports that its donateToReserves function did not check the health of the donor’s position.

One attacker contract made itself insolvent through a donation. A second liquidated it at a discount and withdrew the collateral.

  1. Run a health check after every action that lowers collateral, donations included (Euler).
  2. Make sure no user can push their own position into a profitable liquidation (Euler).
  3. Liquidations still execute on deeply underwater and insolvent positions (Abracadabra; Dolomite, High).
  4. Pending withdrawals or orders must not block a liquidation (Dolomite, Critical).
  5. Minimum-debt rules must not make a position unliquidatable (Sentiment, High).
  6. A partial liquidation must leave the position healthier (Ambit, High; Avon).
  7. Every liquidation path pays the liquidator enough to act (Dolomite).
  8. Native ETH payouts must not revert a liquidation (Vanir, High).
  9. Bound slippage on swaps inside liquidations, so they cannot be sandwiched (Vanir, High).
  10. In batch liquidations, update indices between positions (Callisto, Critical).

Our 13 liquidation vulnerabilities go deeper.

Access Control, Upgrade and Pause Checks

Money markets expose many setters: fees, LTVs, oracles and rate models. Each needs an owner, a bound and often a delay.

  1. Every callback checks its caller (Buttonwood, Critical).
  2. Pool and router addresses passed in by users are allowlisted (Vanir, Critical).
  3. Fees and risk parameters have bounds and a timelock (Sentiment, High).
  4. Initializers cannot run twice, even with a zero-address owner (Sentiment, High).
  5. Pause covers every entry point, while repayments stay open (Sentiment; Magnify Cash).
  6. Upgradeable contracts keep storage gaps for future variables (Sentiment).

Integration Checks

Money markets list other protocols’ tokens and call their contracts. That behavior becomes part of your solvency.

Dolomite’s GMX V2 module is one example: borrowers post GM tokens as collateral, so Dolomite’s solvency depends on GMX’s accounting.

  1. No strict equality on amounts an outsider can nudge with 1 wei (Dolomite, Critical).
  2. Vault tokens used as collateral report decimals that match their shares (Sentiment, Critical).
  3. Rebasing and fee-on-transfer tokens are either supported or blocked (Sentiment).
  4. Approvals work with USDT, which requires resetting an allowance to zero (Vanir).
  5. Flash loan premiums are included in repayment math (Vanir, High).
  6. Reentrancy guards cover callbacks across contracts, not one function (Impermax, Critical).
  7. L2 sequencer outages come with a grace period before liquidations (Dolomite).

Preparing for the Audit

Auditors cover more ground when the team has done this first:

  • Freeze a commit and list every contract in scope.
  • Write down the solvency invariants you expect to hold.
  • List every asset, oracle, cap and LTV you plan to launch with.
  • Name every privileged role, who holds it and any timelock.
  • Run this checklist yourself and fix what you find.

Our guide on how to prepare for a smart contract audit covers the rest.

How Guardian Audits Lending Protocols

Guardian’s public lending reports include Dolomite, Sentiment, Ambit, Abracadabra Money, Callisto, Impermax and Vanir. Every finding above links to its report.

Guardian’s two-week review of Dolomite’s GMX V2 module found 2 Critical and 4 High issues. Per the case study, the fix review then caught a newly introduced Critical in the remediations.

The June 2024 review of Sentiment V2 found 5 Critical and 19 High issues.

Guardian’s audits run two competing teams on the same scope, one manual and one driving frontier AI, over an invariant fuzzing suite.

See Guardian’s audits and pentests, or read the Dolomite case study.

Frequently Asked Questions

What is a donation attack on a lending market?

An attacker sends tokens straight to a market or vault to inflate its share price or slip past its caps. Empty and new markets are easiest: Resupply’s sat on an empty vault, and Sonne’s was hit as it went live.

Why are thin collateral markets dangerous for lenders?

If an asset barely trades, one trade can set its oracle price. YieldBlox’s USTRY collateral jumped about 100 times on a market with under $1 of hourly volume, and the pool lent against that price.

Does a Compound or Aave fork still need an audit?

Yes, for everything that changed: new code, assets and parameters. Forks also inherit known bugs. Sonne, a Compound v2 fork, lost about $20 million to a donation attack Hundred Finance had suffered about a year earlier.

Sources

Audit your money market with Guardian

Guardian tests collateral pricing, debt accounting and liquidation paths against the states an attacker would reach.