Skip to article
Degrees of SatoshiFollow the connections.
Degrees of Satoshi/ Encyclopedia

Encyclopedia DeFi · Entry 173

Vault inflation attacks: donations, rounding and first deposits

Theme
DeFi
Sources
2 cited records
Reading time
About 3 minutes
Automated verification
Substantive update
In this article

At a glance

Key facts

Key facts for Vault inflation attacks: donations, rounding and first deposits
FactDetailSource
RoundingDeposits that convert to less than one smallest share unit can round to zero in the illustrated vulnerable design.[1]
DonationAdding assets without minting proportional shares can move the conversion rate.[1]
Defense exampleOpenZeppelin describes virtual assets and shares with a precision offset as a defense.[1]
01

Use base units to see the rounding problem

Consider an intentionally simplified unprotected vault with one smallest share unit and 100 asset base units after a donation. A deposit of 50 asset units computes 50 × 1 / 100 = 0.5 share units, which rounds down to zero.

The depositor receives no shares in that vulnerable calculation. This assumes the vault accepts the deposit and has no offset or minimum-share protection; it is not the behavior of every deployed vault.

02

The donation changes who receives future value

The attacker must already hold shares to benefit from increasing assets behind existing shares. A later depositor’s rounding loss can then accrue to those holders.

A donation by itself is not proof of an attack or of profitability. Share ownership, precision, transaction ordering and protection mechanisms determine the actual outcome.

03

Inspect the implementation and transaction limits

OpenZeppelin explains how virtual balances and increased share precision reduce rounding exposure and make its illustrated donation attack costly. Those properties must actually be present in the implementation being assessed.

ERC-4626 also tells integrators to handle slippage and unexpected conversion changes. Review the exact contract version and caller-enforced minimum outcome rather than assuming a familiar vault interface guarantees safe accounting.

Direct answers

Questions people ask

Does any increase in assets per share mean the strategy earned yield?

No. A direct asset donation can change the conversion without strategy earnings. Establish the cause before presenting a share-price change as investment performance.

Inspect the evidence

The answer and key facts have stable claim links. These records retain the scope and qualification when reused.

A vault inflation attack manipulates the assets-to-shares conversion of a vulnerable vault, often using a donation when few shares exist. A later deposit can then round to very few or even zero shares, shifting value toward existing holders. The weakness depends on implementation; ERC-4626 compatibility alone does not establish that a vault has suitable defenses.

Scope: DeFi · data through 2026-10-02. Verification: verified · 2026-10-02T18:19:48.887Z.

Link to this claim
Rounding: Deposits that convert to less than one smallest share unit can round to zero in the illustrated vulnerable design.

Scope: DeFi · data through 2026-10-02. Verification: verified · 2026-10-02T18:19:48.887Z.

Link to this claim
Donation: Adding assets without minting proportional shares can move the conversion rate.

Scope: DeFi · data through 2026-10-02. Verification: verified · 2026-10-02T18:19:48.887Z.

Link to this claim
Defense example: OpenZeppelin describes virtual assets and shares with a precision offset as a defense.

Scope: DeFi · data through 2026-10-02. Verification: verified · 2026-10-02T18:19:48.887Z.

Link to this claim
Revision history
  1. — First publication after primary-source research and independent automated verification.

Source register

Sources and references

Retrieval dates and locators are recorded individually.
  1. ERC-4626OpenZeppelin

    Vault share conversion, rounding, donations and inflation-attack defenses.

    Locator: Security concern: Inflation attack; Defending with a virtual offset · Version / scope: OpenZeppelin Contracts 5.x · Retrieved: 2026-10-02T17:03:43.088ZOpen source
  2. Tokenized VaultsEthereum Improvement Proposals

    Assets, shares, deposits, withdrawals, limits and preview rounding.

    Locator: Specification; Security Considerations · Version / scope: EIP/ERC-4626; retrieved document hash recorded · Retrieved: 2026-10-02T17:03:42.366ZOpen source
How this article was made

Research and drafting use AI assistance. A separate automated review checks claims against primary sources; no external expert or named human review is implied. Publication, substantive editing, source retrieval and verification are recorded separately. This version was independently checked by an automated reviewer on 2 October 2026.

Editorial method and corrections

Degrees of Satoshi editorial project. “Vault inflation attacks: donations, rounding and first deposits.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/vault-inflation-attacks/