code-423n4 / 2024-02-spectra-findings

4 stars 2 forks source link

Upgraded Q -> 2 from #206 [1710118582077] #308

Closed c4-judge closed 8 months ago

c4-judge commented 8 months ago

Judge has assessed an item in Issue #206 as 2 risk. The relevant finding follows:

[L-01] Incorrect Return Value for previewDeposit() The calculation path for previewDeposit() and deposit() is as follows:

previewDeposit() => _convertIBTsToSharesPreview() => _getPTandIBTRates(true) deposit()    => _convertIBTsToShares()    =>_getPTandIBTRates(false) previewDeposit() should use the same rounding direction as deposit().

suggest:

function _convertIBTsToSharesPreview(uint256 ibts) internal view returns (uint256 shares) {
c4-judge commented 8 months ago

JustDravee marked the issue as duplicate of #134

c4-judge commented 8 months ago

JustDravee marked the issue as unsatisfactory: Invalid