code-423n4 / 2021-09-wildcredit-findings

0 stars 0 forks source link

Emit events when setting the initial values in the constructor #100

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

I think the constructor of InterestRateModel should also emit NewMinRate, NewLowRate, NewHighRate, and NewTargetUtilization events when setting the initial values. Similarly in other contracts, UniswapV3Oracle could emit NewUniPriceConverter, NewTwapPeriod, NewMinObservations, etc but it depends on how you see this situation as, for example, OpenZeppelin follows this practice in their contracts (Ownable emits OwnershipTransferred in the constructor).

Recommended Mitigation Steps

Consider emitting these emits when setting the initial values in the constructor.