Omniscia Xcaliswap Audit
VotingEscrow Code Style Findings
VotingEscrow Code Style Findings
VEW-01C: Inefficient Data Type
Type | Severity | Location |
---|---|---|
Gas Optimization | ![]() | VotingEscrow.sol:L106-L108 |
Description:
The linked uint8
variables are meant to be used as a re-entrancy flag, however, in doing so they occupy a full 256-bit slot with 8 bits of data.
Example:
106uint8 internal constant _not_entered = 1;107uint8 internal constant _entered = 2;108uint8 internal _entered_state = 1;
Recommendation:
We advise a uint256
variable to be utilized for all referenced declarations as the EVM incurs less gas to operate on 256-bit data types.
Alleviation:
The Xcaliswap team evaluated this exhibit but opted not to apply any changes for it in the current iteration of the protocol.
VEW-02C: Inexistent Error Messages
Type | Severity | Location |
---|---|---|
Code Style | ![]() | VotingEscrow.sol:L110, L310, L416, L418, L422, L639, L644, L649, L654, L659, L665-L667, L697, L710 |
Description:
The linked require
checks have no error messages explicitly defined.
Example:
110require(_entered_state == _not_entered);
Recommendation:
We advise each to be set so to increase the legibility of the codebase and aid in validating the require
checks' conditions.
Alleviation:
The Xcaliswap team evaluated this exhibit but opted not to apply any changes for it in the current iteration of the protocol.
VEW-03C: Non-Unique Name & Symbol
Type | Severity | Location |
---|---|---|
Code Style | ![]() | VotingEscrow.sol:L67-L68 |
Description:
The name
and symbol
referenced clash with the name
and symbol
declarations of the Velodrome Finance implementation.
Example:
67string constant public name = "veNFT";68string constant public symbol = "veNFT";
Recommendation:
We advise a different acronym to be utilized for the NFT to ensure that users are able to immediately discern the NFTs they are interacting with.
Alleviation:
The Xcaliswap team evaluated this exhibit but opted not to apply any changes for it in the current iteration of the protocol.