In the RAACMinter contract when we call getUtilizationRate function we get the total rTokens that are in the StabilityPool by callin the stabilityPool.getTotalDeposits() function. If user transfers rTokens directly to the StabilityPool insted of depositin them this value could be high enoug to make the following calculation (totalBorrowed * 100) / totalDeposits to return 0. This would mean that eventually we would have the lowset possible emision rate for rewards when we call the calculateNewEmissionRate function.
An User could directly tansfer RTokens to the StabilityPool in order to make the emission rate for rewards in the StabilityPool become the lowest possible emission rate. This would happen because in that scenario we would always get that the utilization of the StabilityPool is 0 and when that is true we will reduce the emission rate each time the calculation of it is called, eventually we would always get the lowest possible emission rate.
User of the StabilityPool receive rewards with the lowest possible emission rate.
Manual Reviewd
Add a storage varaible to the StabilityPool that will be used to track the total deposited amount of rTokens in it. Then use this value as a return for the getTotalDeposits function in order to avoid including rTokens that were sent directly to the StabilityPool when calculating the utilization rate of the pool.
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.