Platform: Code4rena
Start Date: 08/09/2023
Pot Size: $70,000 USDC
Total HM: 8
Participants: 84
Period: 6 days
Judge: gzeon
Total Solo HM: 2
Id: 285
League: ETH
Rank: 45/84
Findings: 1
Award: $50.43
🌟 Selected for report: 0
🚀 Solo Findings: 0
50.4324 USDC - $50.43
https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/InvestmentManager.sol#L383 https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/InvestmentManager.sol#L396
According to EIP-4626, previewMint and previewWithdraw should round up.
In previewMint and previewWithdraw, the currencyAmount is calculated by calling _calculateCurrencyAmount.
The _calculateCurrencyAmount performs calculations using round down, which can result in a lower returnTrancheTokenAmount than expected.
https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/InvestmentManager.sol#L383
https://github.com/code-423n4/2023-09-centrifuge/blob/main/src/InvestmentManager.sol#L396
Calculations should take into account the requirements of EIP 4626 and use the correct rounding method.
ERC4626
#0 - c4-pre-sort
2023-09-14T23:49:19Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2023-09-14T23:49:26Z
raymondfam marked the issue as duplicate of #34
#2 - c4-judge
2023-09-26T18:11:38Z
gzeon-c4 marked the issue as satisfactory