Lack of event emission after sensitive action #49
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
valid
Lines of code
https://github.com/code-423n4/2022-08-rigor/blob/main/contracts/HomeFi.sol#L92
https://github.com/code-423n4/2022-08-rigor/blob/main/contracts/HomeFi.sol#L113
Vulnerability details
Impact
The initialize function of the HomeFi contract does not emit the AdminReplaced event after setting the value of the _msgSender() to be the admin.
Consider emitting events after sensitive changes occur to facilitate tracking and notify off-chain clients following the contracts’ activity.
Proof of Concept
https://github.com/code-423n4/2022-08-rigor/blob/main/contracts/HomeFi.sol#L92
https://github.com/code-423n4/2022-08-rigor/blob/main/contracts/HomeFi.sol#L113
Tools Used
vscode
Recommended Mitigation Steps
add event
The text was updated successfully, but these errors were encountered: