Penalty value lost if penaltyForwarder
is address(0)
#95
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
G (Gas Optimization)
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/AuraMerkleDrop.sol#L151-L152
Vulnerability details
Impact
Penalty details are lost if the
penaltyForwarder
address is address(0)Proof of Concept
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/AuraMerkleDrop.sol#L151-L152
Here the check for address(0) is used after the penalty is set to zero. If the require statement fails in this function, the accumulated penalty still remains set to zero.
Tools Used
Manual checks
Recommended Mitigation Steps
Add the address(0) check before setting the penalty as zero
The text was updated successfully, but these errors were encountered: