Price Per Share

A vault's exchange rate between one share and the underlying asset; the value an inflation attack manipulates via donation.

Price per share (sometimes pricePerShare or share price) is the exchange rate between a single vault share and the underlying asset it represents. In an ERC-4626 vault it is effectively totalAssets / totalSupply: the amount of underlying that one share can redeem. It is the quantity a depositor cares about, and the quantity an attacker targets.

Why it is attackable

When a vault derives totalAssets from its raw token balance (asset.balanceOf(address(this))), anyone who can transfer the underlying can raise the numerator without minting new shares — inflating the price per share by donation. This is the core mechanic of the inflation attack, and the same primitive that let attackers double pricePerShare on lending oracles in incidents like Cream Finance (2021) and Resupply (2025).

Defensive framing

A robust vault treats price per share as an invariant surface: it should change only through legitimate deposit and withdraw flows, never through a raw transfer. Property tests assert exactly this — that a donation cannot move the price per share — and defenses like virtual shares and internal balance tracking exist to keep the exchange rate anchored to recorded positions rather than a manipulable balance.

Need expert guidance on Price Per Share?

Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.

Get a Quote