Penalty will be forced even when user wants to lock amount #49
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)
duplicate
This issue or pull request already exists
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/main/contracts/AuraBalRewardPool.sol#L176
Vulnerability details
Impact
In case shutdown function had been called on AuraLocker, the lock function on AuraLocker will fail. This means Users will be forced to call getReward function with _lock as false which also means that 20% will be deducted from there reward as penalty even though it is not there fault.
Proof of Concept
Similar occurence
** Same issue also holds for claim function at https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraMerkleDrop.sol#L114 & AuraVestedEscrow.sol#L61 **
Recommended Mitigation Steps
Ideally getReward function should be revised:
AuraLocker.sol
AuraBalRewardPool.sol#L176
The text was updated successfully, but these errors were encountered: