Vulnerability: Events Which May Trigger False Alarms
Severity: low

Description:
1- `PauseManager` allows `PAUSE_MANAGER_ROLE` to pause/unpause a type as:\\n```\\nfunction pauseByType(bytes32 \\_pauseType) external onlyRole(PAUSE\\_MANAGER\\_ROLE) {\\n pauseTypeStatuses[\\_pauseType] = true;\\n emit Paused(\\_msgSender(), \\_pauseType);\\n}\\n```\\n\\n```\\nfunction unPauseByType(bytes32 \\_pauseType) external onlyRole(PAUSE\\_MANAGER\\_ROLE) {\\n pauseTypeStatuses[\\_pauseType] = false;\\n emit UnPaused(\\_msgSender(), \\_pauseType);\\n}\\n```\\n\\nHowever, the functions don't check whether the given `_pauseType` has already been paused/unpaused or not and emits an event every time called. This may trigger false alarms for off-chain monitoring tools and may cause unnecessary panic.\\n2 - `RateLimitter` allows resetting the limit and used amount as:\\n```\\nfunction resetRateLimitAmount(uint256 \\_amount) external onlyRole(RATE\\_LIMIT\\_SETTER\\_ROLE) {\\n bool amountUsedLoweredToLimit;\\n\\n if (\\_amount < currentPeriodAmountInWei) {\\n currentPeriodAmountInWei = \\_amount;\\n amountUsedLoweredToLimit = true;\\n }\\n\\n limitInWei = \\_amount;\\n\\n emit LimitAmountChange(\\_msgSender(), \\_amount, amountUsedLoweredToLimit);\\n}\\n```\\n\\n```\\nfunction resetAmountUsedInPeriod() external onlyRole(RATE\\_LIMIT\\_SETTER\\_ROLE) {\\n currentPeriodAmountInWei = 0;\\n\\n emit AmountUsedInPeriodReset(\\_msgSender());\\n}\\n```\\n\\nHowever, it doesn't account for the scenarios where the function can be called after the current period ends and before a new period gets started. As the `currentPeriodAmountInWei` will still be holding the used amount of the last period, if the `RATE_LIMIT_SETTER_ROLE` tries to reset the limit with the lower value than the used amount, the function will emit the same event `LimitAmountChange` with the flag `amountUsedLoweredToLimit`.\\nAdding to it, the function will make `currentPeriodAmountInWei` = `limitInWei`, which means no more amount can be added as the used amount until the used amount is manually reset to 0, which points out to the fact that the used amount should be automatically reset, once the current period ends. Although it is handled automatically in function `_addUsedAmount`, however, if the new period has not yet started, it is supposed to be done in a 2-step approach i.e., first, reset the used amount and then the limit. It can be simplified by checking for the current period in the `resetRateLimitAmount` function itself.\\nThe same goes for the scenario where the used amount is reset after the current period ends. It will emit the same event as `AmountUsedInPeriodReset`\\nThese can create unnecessary confusion, as the events emitted don't consider the abovementioned scenarios.

Impact:

Recommended mitigation:
Consider adding checks to make sure already paused/unpaused types don't emit respective events.\\nConsider emitting different events, or adding a flag in the events, that makes it easy to differentiate whether the limit and used amount are reset in the current period or after it has ended.\\nReset `currentPeriodAmountInWei` in function `resetRateLimitAmount` itself if the current period has ended.