totalDeclaredReward >= totalReleasedReward
not true in AbstractRewardMine
#246
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
cmichel
Vulnerability details
The
AbstractRewardMine
contract states the following about the two variables:According to the description, it should be the case that
totalDeclaredReward >= totalReleasedReward
at all times.But it's not true as
totalReleasedReward = totalDeclaredReward + _globalWithdrawn >= totalDeclaredReward
.Recommended Mitigation Steps
I don't think the implementation in the abstract contract makes sense, the derived contracts all correctly overwrite it.
Maybe it should be a
virtual
function without an implementation that needs to be overridden.The text was updated successfully, but these errors were encountered: