Users can grief reward distribution #180
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/ExtraRewardsDistributor.sol#L74
Vulnerability details
Impact
Users can grief reward distributions by spending dust
Proof of Concept
If a reward is targeted for an epoch in the past, a user can front-run the txn in the mempool and call
addRewardToEpoch()
with a dust amount at an epoch after the one in question. This will cause the transaction in the mempool to reverthttps://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/ExtraRewardsDistributor.sol#L74
Tools Used
Code inspection
Recommended Mitigation Steps
Allow the backdating of rewards, which will cost more gas
The text was updated successfully, but these errors were encountered: