Submitted by 0xStalin, also found by Aymen0909, imtybik, HChang26, and J4X
Claiming deposits using the LiquidityPool.deposit() will cause the Escrow contract to not have enough shares to allow other investors to claim their maxDeposit or maxMint values for their deposited assets.
The problem occurs when an investor hasnt claimed their deposits and has requested multiple deposits on different epochs at different prices. The InvestmentManager::calculateDepositPrice() function will compute an equivalent/average price for all the requestDeposits that havent been claimed yet. Because of the different prices that the request deposits where processed at, the computed price will compute the most accurate average of the deposits price, but there is a slight rounding error that causes the computed value of trancheTokenAmount to be slightly different from what it should exactly be.
Coded PoC
Math
hieronx (Centrifuge) confirmed
hieronx (Centrifuge) commented via duplicate issue #210:
gzeon (judge) commented:
hieronx (Centrifuge) commented:
