Technique · Smart contracts
Rounding and precision errors
289 disclosed reports use this technique.
Reports
Filter and sortPaid and upvoted first.
-
Attacker can make stakeRate to be 1 in the StRSR contract and users depositing tokens can lose funds because of the big rounding errorSmart contracts Medium Reserve Core Audit finding
-
Unsafe casting from uint256 to uint16 could cause ticket prizes to become much smaller than intended
Smart contracts Medium Wenwin contest Audit finding +5 collaborators
-
Underflow of lpPosition.points during withdrawLP causes huge reward minting
Smart contracts High Neo Tokyo contest Audit finding +36 collaborators
-
Wrong type casting leads to unsigned integer underflow exception when current price is < last priceSmart contracts High Derby Audit finding
-
First depositor can abuse exchange rate to steal funds from later depositors
Smart contracts High Surge Audit finding +36 collaborators
-
Slashing fails when node operator doesn’t have enough staked GGPSmart contracts Medium GoGoPool contest Audit finding +10 collaborators
-
A borrower might drain the vault by calling borrow() repeatedly with small borrow amount each timeSmart contracts Medium Blueberry Update #3 Audit finding
-
First Deposit Bug
Smart contracts Medium Ondo Finance Audit finding
-
Attackers can call UToken.redeem() and drain the funds in assetManager
Smart contracts Medium Union Finance Update Audit finding
-
OpenEdition.buy() might revert due to uint overflow when it should work.
Smart contracts Medium Escher contest Audit finding +1 collaborator
-
Unsafe downcasting operation truncate user’s input
Smart contracts Medium Escher contest Audit finding +11 collaborators
-
Lock.sol: assets deposited with Lock.extendLock function are lost
Smart contracts High Tigris Trade contest Audit finding +9 collaborators
-
Certain fee configuration enables vaults to be drained
Smart contracts High Tigris Trade contest Audit finding
-
distribute() won’t update epoch[tigAsset] when totalShares[tigAsset]==0 which can cause later created bond for this tigAsset to have wrong mint epoch
Smart contracts Medium Tigris Trade contest Audit finding
-
Repaying loans with small amounts of debt tokens can lead to underflowing in the `roll` function
Smart contracts Medium Cooler Update Audit finding +9 collaborators
-
Variable balance ERC20 support
Smart contracts Medium Debt DAO contest Audit finding +16 collaborators
-
Underlying assets stealing in AutoPxGmx and AutoPxGlp via share price manipulation
Smart contracts High Redacted Cartel contest Audit finding +25 collaborators
-
Malicious Users Can Drain The Assets Of Auto Compound Vault
Smart contracts High Redacted Cartel contest Audit finding +13 collaborators
-
User’s Accrued Rewards Will Be Lost
Smart contracts High Redacted Cartel contest Audit finding
-
First depositor can break minting of shares
Smart contracts High Caviar Private Pools Audit finding +42 collaborators
-
Rounding error in buyQuote might result in free tokens
Smart contracts Medium Caviar Private Pools Audit finding +18 collaborators
-
Rounding differences when computing the invariantSmart contracts High Notional Update #4 Audit finding
-
Scaling factor of the wrapped token is incorrectSmart contracts High Notional Update #4 Audit finding +1 collaborator
-
Theft of ETH of free floating SLOT holders
Smart contracts High LSD Network - Stakehouse contest Audit finding +1 collaborator
-
Staking tokens can be stolen
Smart contracts Medium Anchor contest Audit finding
-
Oracle assumes token and feed decimals will be limited to 18 decimals
Smart contracts Medium Inverse Finance contest Audit finding +14 collaborators
-
Possible that unanimous votes is unachievableSmart contracts Medium Party Protocol Audit finding
-
Early depositors to DnGmxSeniorVault can manipulate exchange rates to steal funds from later depositors
Smart contracts Medium Rage Trade Audit finding +9 collaborators
-
Unsafe type casting of `poolValue` can malfunction the whole market
Smart contracts Medium Float Capital Audit finding
-
First ERC4626 deposit can break share calculationSmart contracts Medium Astaria Audit finding +8 collaborators
Guides and techniques
All guidesThe best explainers, cheat sheets and technique posts on Rounding and precision errors, from around the web.
-
Breaking Business Logic: 7 Attack Scenarios in E-Commerce, Payments and Application WorkflowsCovers seven business logic attack scenarios across e-commerce and payment workflows, giving hunters practical testing ideas.
Technique infosecwriteups.com
-
Payment Bypass Guide for Bug Bounty | 69 case studiesWalks through payment logic flaws with many case studies showing how to bypass checkout and pricing controls.
Methodology medium.com