Submitted by 0xA5DF, also found by 0x52, exd0tpy, horsefacts, hyh, kenzo, Lambda, minhquanym, panprog, scaraven, shenwilly, and simon135
Divisions in EVM are rounded down, which means when the fraction price is close to 1 (e.g. 0.999) it would effectively be zero, when its close to 2 (1.999) it would be rounded to 1 - losing close to 50% of the intended price.
Ive added the following tests to test/Buyout.t.sol.
Foundry
Proposed code for solution A:
(ethDeposit * 1e6) / (1e6 - ((fractionDeposit * 1e6) / totalSupply))
Proposed code for solution B:
HardlyDifficult (judge) increased severity to High and commented:
