Users can lose fractions to precision loss during migraction if _newFractionSupply is set very low
When the new fraction supply is set very low, the migration calculation rounds small contributors' shares down to zero, so they receive nothing. In some cases the vault could become permanently frozen because too few fractions can be redeemed to buy it out.
Submitted by 0x52, also found by 0x29A, hansfriese, and MEP
Precision loss causing loss of user value and potentially cause complete loss to vault.
Proof of Concept
If the supply of the fraction is set to say 10 then any user that uses migrateFractions with less than 10% of the contributions will receive no shares at all due to precision loss. Under certain conditions it may even cause complete loss of access to the vault. In this same example, if less than 5 fractions can be redeemed (i.e. not enough people have more than 10% to overcome the precision loss) then the vault would never be able to be bought out and the vault would forever be frozen.
Recommended Mitigation Steps
When calling propose require that \_newFractionSupply is greater than some value (i.e. 1E18).
stevennevins (Fractional) confirmed
HardlyDifficult (judge) commented:
Rounding can lead to loss of assets. Agree with severity.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely integer division in the migration share calculation truncates small holders' results to zero when the new fraction supply is very low.
Impact
Small contributors could lose their entire share, and the vault could become permanently frozen if too few fractions can be redeemed to buy it out.
What the attacker needed
New fraction supply set very low; contributor holds a small share
The fix
The propose function should require the new fraction supply to be above a minimum value, such as 1E18.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract splits ownership of a vault into many small units called fractions. When the vault is migrated to a new supply, each person's share is recalculated by dividing, and whole-number maths throws away the remainder. If the new total is tiny, small holders' results round down to zero and they lose their stake entirely.
What is Smart contracts?
Flaws in on-chain code that let an attacker drain funds, freeze them or break the protocol's accounting.