Closed c4-bot-4 closed 8 months ago
https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/PrincipalToken.sol#L906-L912
currentIBTRate < ibtRate should be currentIBTRate > ibtRate if current IBT Rate is bigger than old IBT rate, then need calculate the new ptRate
currentIBTRate < ibtRate
currentIBTRate > ibtRate
uint256 currentPTRate = currentIBTRate > ibtRate ? ptRate.mulDiv( currentIBTRate, ibtRate, roundUpPTRate ? Math.Rounding.Ceil : Math.Rounding.Floor ) : ptRate;
Error
Withdrawn by Billy_Parallel
Lines of code
https://github.com/code-423n4/2024-02-spectra/blob/main/src/tokens/PrincipalToken.sol#L906-L912
Vulnerability details
Impact
currentIBTRate < ibtRate
should becurrentIBTRate > ibtRate
if current IBT Rate is bigger than old IBT rate, then need calculate the new ptRateRecommended Mitigation Steps
Assessed type
Error