sherlock-audit / 2023-12-arcadia-judging

19 stars 15 forks source link

waffleWizard96 - Unintended Emission in LendingPool Contract #194

Closed sherlock-admin closed 9 months ago

sherlock-admin commented 9 months ago

waffleWizard96

medium

Unintended Emission in LendingPool Contract

Summary

The Withdraw event is emitted in the contract without being properly initiated in the codebase.

Vulnerability Detail

The Withdraw event is being emitted without being properly initiated within the codebase. This inconsistency could lead to confusion and unexpected behavior.

Impact

The emission of the Withdraw event without its declaration in the contract or its inherited contracts could lead to compilation errors during contract deployment or execution. This issue may result in deployment failures or unexpected behavior, compromising the reliability and security of the contract. The absence of proper event declaration could impede contract functionality and integrity, potentially leading to disruptions in the system's operation.

Including this information in the impact section helps stakeholders understand the potential consequences of the issue and underscores the importance of addressing it promptly.

Code Snippet

Line 1024 of LendingPool.sol

emit Withdraw(msg.sender, account, account, openDebt, debtShares);

Tool used

Manual Review

Recommendation

Ensure that events are only emitted when they are properly initiated in the codebase. Review the logic flow to ensure that events are emitted at the appropriate times and under the correct conditions.

sherlock-admin2 commented 9 months ago

1 comment(s) were left on this issue during the judging contest.

takarez commented:

invalid

nevillehuang commented 9 months ago

Invalid, events are correct, no issue here