Omniscia Evergon Labs Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Evergon Labs' Staking System.

As the project at hand implements a complex staking campaign management, interaction, and creation, intricate care was put into ensuring that the flow of funds & assets within the system conforms to the specifications and restrictions laid forth within the protocol's specification.

We validated that all state transitions of the system occur within sane criteria and that all rudimentary formulas within the system execute as expected. We pinpointed two significant vulnerability classes within the system which could have had severe ramifications to its overall operation; for more information, kindly consult the audit report's summary.

Additionally, the system was investigated for any other commonly present attack vectors such as re-entrancy attacks, mathematical truncations, logical flaws and ERC / EIP standard inconsistencies. The documentation of the project was satisfactory to the extent it need be, however, certain inconsistencies were observed and outlined.

Lastly, the documentation of the project in relation to the actual configuration of staking campaigns was inadequate and, in conjunction the highly granular specificity of the campaign facets that can be combined, we believe that this area of the codebase needs to be enhanced prior to production.

As an example, a pre-stake campaign with a reward provider that is the same as the reward asset handler would misbehave as two mint operations would occur whilst a pre-stake reward distribution configuration with an inexistent restriction on campaign times would result in incorrect reward accounting during restake operations.

A total of 106 findings were identified over the course of the manual review of which 21 findings concerned the behaviour and security of the system. The non-security related findings, such as optimizations, are included in the separate Code Style chapter.

The finding table below enumerates all these security / behavioural findings:

IDSeverityAddressedTitle
CRF-01MDiscrepant Input Sanitization
CRF-02MIncorrect Order of Reward Update
DCE-01MRedundant Emission of Caller
EIG-01MImproper Configuration of Required Packets
ERG-01MImproper Configuration of Required Packets
ERO-01MImproper Configuration of Required Packets
EIS-01MInexistent Prevention of Token Re-Configuration
ERS-01MInexistent Prevention of Token Re-Configuration
ERR-01MInexistent Prevention of Token Re-Configuration
NVL-01MInexistent Satisfaction of Full Interface
RBR-01MIncorrect Inclusive Limit
RBR-02MIncompatible Initialization Implementation
RBR-03MInexistent Gradual Catch-Up Mechanism
RBD-01MIncompatible Initialization Implementation
RBD-02MInexistent Gradual Catch-Up Mechanism
SSN-01MPotential Invalid Restake Re-Entrancy
SSN-02MInexistent Validation of Authorization
SSI-01MPotential Invalid Restake Re-Entrancy
SSI-02MInexistent Validation of Authorization
TIS-01MArbitrary Self-Call Construction
TRS-01MArbitrary Self-Call Construction