First Flight #21: KittyFi

First Flight #21
Beginner FriendlyDeFiFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Lack of Events for Critical Functions in KittyValue.sol

Summary

The KittyVault contract lacks event emissions for critical functions like executeDepawsit, executeWhiskdrawal, purrrCollateralToAave, and purrrCollateralFromAave.

Vulnerability Details

  • Location: The functions executeDepawsit, executeWhiskdrawal, purrrCollateralToAave, and purrrCollateralFromAave.

  • Description: These functions perform significant state changes, such as updating collateral balances and interacting with external protocols like Aave, but do not emit events to log these actions. This can reduce the ability to monitor and audit interactions with the contract.

Impact

  • Severity: Medium

  • Effect: Lack of event emissions makes it difficult to trace state changes, reducing transparency and complicating auditing processes.

Tools Used

  • Manual code review

Recommendations

Add event declarations and emit appropriate events in the mentioned functions to facilitate better tracking of state changes.

event Depawsit(address indexed user, uint256 amount);
event Whiskdrawal(address indexed user, uint256 amount);
event CollateralSuppliedToAave(uint256 amount);
event CollateralWithdrawnFromAave(uint256 amount);
function executeDepawsit(address _user, uint256 _ameownt) external onlyPool {
// existing logic
emit Depawsit(_user, _ameownt);
}
function executeWhiskdrawal(address _user, uint256 _cattyNipToWithdraw) external onlyPool {
// existing logic
emit Whiskdrawal(_user, _ameownt);
}
function purrrCollateralToAave(uint256 _ameowntToSupply) external onlyMeowntainer {
// existing logic
emit CollateralSuppliedToAave(_ameowntToSupply);
}
function purrrCollateralFromAave(uint256 _ameowntToWhiskdraw) external onlyMeowntainer {
// existing logic
emit CollateralWithdrawnFromAave(_ameowntToWhiskdraw);
}
Updates

Lead Judging Commences

shikhar229169 Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.