RebateFi Hook

First Flight #53
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Impact: low
Likelihood: high
Invalid

Missing Events for Critical State Changes

Description

  • The contract fails to emit events when fee parameters are modified, making off-chain monitoring, analytics, and user notification impossible. This lack of transparency undermines trust and makes the protocol difficult to integrate with external systems.

function ChangeFee(bool _isBuyFee, uint24 _buyFee, bool _isSellFee, uint24 _sellFee) external onlyOwner {
if(_isBuyFee) buyFee = _buyFee; // No event emitted
if(_isSellFee) sellFee = _sellFee; // No event emitted
}

Risk

Impact:

  • Difficult to track fee changes off-chain

  • Reduced transparency for users

  • Harder to monitor contract activity

Proof of Concept

Add the following to `RebateFiHookTest.t.sol`

function test_NoEventOnFeeChange() public {
rebateHook.ChangeFee(true, 1000, true, 4000);
(uint24 buyFee, uint24 sellFee) = rebateHook.getFeeConfig();
assertEq(buyFee, 1000);
assertEq(sellFee, 4000);
// No events emitted to track these changes
}

Recommended Mitigation

+ event FeesChanged(uint24 buyFee, uint24 sellFee);
function ChangeFee(bool _isBuyFee, uint24 _buyFee, bool _isSellFee, uint24 _sellFee) external onlyOwner {
if(_isBuyFee) buyFee = _buyFee;
if(_isSellFee) sellFee = _sellFee;
+ emit FeesChanged(buyFee, sellFee);
}
Updates

Lead Judging Commences

chaossr Lead Judge
13 days ago
chaossr Lead Judge 12 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!