Closed code423n4 closed 1 year ago
@Picodes I think the L-08 and L-09 findings from my QA report should somehow be grouped with this medium. I also pointed out another issue with this function there. https://github.com/code-423n4/2023-03-mute-findings/blob/main/data/HollaDieWaldfee-Q.md
mattt21 marked the issue as disagree with severity
This is a view only function that is used for our front end to display values. This does nothing to the functionality of the contract. Should be a low risk bug.
@HollaDieWaldfee100, thanks for flagging
Picodes changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2023-03-mute/blob/4d8b13add2907b17ac14627cfa04e0c3cc9a2bed/contracts/amplifier/MuteAmplifier.sol#L419
Vulnerability details
Impact
dripsInfo
is not correct when there is no deposit and returns wrongperSecondReward
.Proof of Concept
MuteAmplifier.dripsInfo
calculatesperSecondReward
as follows:firstStakeTime
is 0 when there is no deposit, soperSecondReward
will be a wrong value when there is no deposit andfirstStakeTime
= 0.Tools Used
Manual Review
Recommended Mitigation Steps
When
firstStakeTime
= 0,perSecondReward
has no meaning, so it is better to return 0.