Omniscia Maverick Protocol Audit
Constants Code Style Findings
Constants Code Style Findings
CST-01C: Potential Revision as Enum
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | Constants.sol:L5-L7 |
Description:
The referenced values are meant to represent a sequentially increasing set of administrative actions consumed by the MaverickV2Pool::adminAction function.
Example:
4// pool actions5uint256 constant ACTION_SET_PROTOCOL_FEE = 1;6uint256 constant ACTION_CLAIM_PROTOCOL_FEES_A = 2;7uint256 constant ACTION_CLAIM_PROTOCOL_FEES_B = 3;Recommendation:
We advise them to be potentially converted to an enum, increasing the legibility of the code while enforcing implicit validation due to enum values not being permitted to exceed their allocated slots.
Alleviation (175f8c39b1):
The relevant constants have been replaced by an enum declaration within the IMaverickV2PoolAdmin, specifically the AdminAction enum.
While we consider this exhibit addressed, we would like to outline that the enum does not adhere to the Solidity naming convention as its members are not following the CamelCase format.
Alleviation (23cf815e61):
The Maverick Protocol team evaluated this exhibit's follow-up recommendation and opted to acknowledge it.
