Share Price Manipulation Explained in Detail
Share price is often calculated from total assets divided by total shares. If an attacker can change either side cheaply, they may manipulate how many shares are minted, redeemed, or accepted as collateral.
This can happen in vaults, staking wrappers, LP positions, and receipt-token systems.
Smart contract example
sharePrice = totalAssets * 1e18 / totalSupply;
The formula is only safe if totalAssets and totalSupply cannot be manipulated in the relevant context.
Share Price Manipulation in Auditing
Share price can control real money movement. Lending markets may value shares as collateral, vaults may use it for withdrawals, and reward systems may use it for accounting.
Auditors find every place share price is read and ask whether an attacker can move it first.
Red flags in code
-
Share price depends on raw token balances.
-
Low supply makes rounding or donations powerful.
-
Share price is used as an oracle by another protocol.
-
Same-transaction deposits, donations, borrows, or redemptions are possible.
-
Tests use only large, healthy supply states.
How to test or review it
-
Manipulate assets or supply before price reads.
-
Test direct donations and flash-loan-funded changes.
-
Fuzz low supply and rounding boundaries.
-
Check collateral valuation and liquidation paths.
-
Compare with a trusted or time-weighted price where possible.
Keep learning this topic
Donation Attack
A donation attack manipulates protocol accounting by transferring tokens directly to a contract without using the intended deposit path.
ERC-4626 Vaults
ERC-4626 is the tokenized vault standard where users deposit an asset and receive vault shares that represent a claim on the vault's assets.
Price Manipulation
Price manipulation is the intentional movement of an asset, pool, share, or collateral price so a protocol values assets incorrectly.
Practice this in real audit scenarios
Definitions help, but auditors need reps. SCH turns concepts like Share Price Manipulation into exploit labs, code review habits, and report-writing practice.
Start the free trial or see the full smart contract auditing course.