_zeroDurationPointBase
can potentially be exploited to get more scores
#139
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
WatchPug
Vulnerability details
_zeroDurationPointBase
can be set at deploy time so that locks with 0 duration can get scores.However, if the value of
_zeroDurationPointBase
is being set high enough. It can potentially be exploited by repeatedly lock(), and unlock() with 0 duration to get scores.This can get amplified with flashloans.
https://github.com/XDeFi-tech/xdefi-distribution/blob/3856a42df295183b40c6eee89307308f196612fe/contracts/XDEFIDistribution.sol#L245-L247
Recommendation
Consider changing
_zeroDurationPointBase
to a constant of value1
.The text was updated successfully, but these errors were encountered: