Omniscia Mitosis Audit

Cap Static Analysis Findings

Cap Static Analysis Findings

CPA-01S: Inexistent Event Emissions

Description:

The linked functions adjust sensitive contract variables yet do not emit an event for it.

Example:

src/vault/Cap.sol
169function setEpochCap(uint256 epoch_, uint256 cap_) external onlyOwner {
170 _getStorageV1()._cap[epoch_] = cap_;
171}

Recommendation:

We advise an event to be declared and correspondingly emitted for each function to ensure off-chain processes can properly react to this system adjustment.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

The EpochCapSet, ATMSet, ManagerSet, RouterSet, and RouterUnset events were introduced to the codebase and are correspondingly emitted in the Cap::setEpochCap, Cap::setATM, Cap::setManager, Cap::setRouter, and Cap::unsetRouter functions respectively, addressing this exhibit in full.