The value calculation of intervalPart local variable in LinearDistributionIntervalDecrease::_calculatePartPeriodReward() is harmful and it will cause 0 part period reward.
The below mentioned code returns the value of intervalPart -> interval when toEnd is true and 0 when toEnd is false for any value of startTime, payoutStart and interval.
Here is a mock example, assume the following configurations:
When toEnd is true:
As the intervalPart is equal to interval_ so when toEnd is true the returned reward from _calculatePartPeriodReward() is 0 because:
When toEnd is false:
So as per the formula here (intervalFullReward_ * intervalPart_) / interval_ it will also return 0 because intervalPart_ is 0 here.
Due to this code :
The returned reward amount from _calculatePartPeriodReward() is 0 for all boolean value of toEnd.
Manual analysis.
Follow any better approach.
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.