The deposit function in StabilityPool.sol makes two identical calls to _mintRAACRewards() in the same transaction, leading to unnecessary gas costs and duplicate computations.
The _mintRAACRewards() function is called twice:
First through _update()
Then directly at the end of the deposit function
Each call triggers raacMinter.tick() which updates emission rates based on block numbers, making the second call unnecessary.
Low. The redundant call:
Wastes gas by making an extra external call
Could potentially lead to incorrect emission rate calculations since the updates are based on block numbers
Remove the redundant call to _mintRAACRewards() at the end of the deposit function since it's already called via _update():
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.