there is no incentive for end-users to call updateDistribution() function and hence the value of _pointsPerUnit being stale can result in improper calculations of distribution.
Tools Used
Manual Review
Recommended Mitigation Steps
call it internally before every lock
take precautions to check values are not stale i.e it was updated at least once in "x" blocks
Handle
hack3r-0m
Vulnerability details
https://github.com/XDeFi-tech/xdefi-distribution/blob/master/contracts/XDEFIDistribution.sol#L142
there is no incentive for end-users to call
updateDistribution()
function and hence the value of_pointsPerUnit
being stale can result in improper calculations of distribution.Tools Used
Manual Review
Recommended Mitigation Steps