Omniscia Kwenta Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Kwenta's migration processes and V2 adaptations.

As the project at hand implements a special-purpose migration system, 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 vulnerabilities within the system which could have had moderate-to-severe ramifications to its overall operation; we urge the Kwenta team to promptly evaluate their validity.

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 an exemplary extent, containing extensive in-line documentation as well as separate documents that explain how the system is meant to behave.

A total of 13 findings were identified over the course of the manual review of which 5 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
EMR-01MInexistent Sanitization of Array Length
EMR-02MImproper Deployment Methodology
EMR-03MInexistent Application of Checks-Effects-Interactions
EMR-04MOverly Restrictive Pre-Condition
REV-01MTruncation of Transferred Amounts