Omniscia Native Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Native's novel exchange implementation.

As the project at hand implements an EIP-20 exchange, intricate care was put into ensuring that the flow of funds 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 multiple significant vulnerabilities within the system which could have had moderate-to-severe ramifications to its overall operation. Additionally, we identified certain design flaws in relation to the output mechanism of the router that we advise the Native team to revisit.

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 inadequate and we strongly advise the Native team to expand their documentation across the board and to strictly define how their codebase behaves.

A total of 59 findings were identified over the course of the manual review of which 19 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
CSP-01MUnfair Market Dynamics
FMH-01MUnsafe Migration of Pragma Version
LGS-01MIncorrect Restriction of Pragma Version
PPS-01MImproper Payable Attribute of Functions
PPS-02MInexistent Evaluation of Payer
PVN-01MRedundant ABI Coder Specification
PVN-02MPotentially Insecure Hash Evaluation
PLO-01MArbitrary Unique ID
PLO-02MInexplicable Loop Iteration
PLO-03MInexistent Limitation of Fee
PLO-04MInexplicable Payable Function Attribute
PLO-05MUnsafe Casting Operations
PFY-01MInexistent Protection of Pause State
PFY-02MUnutilized Registry Address
PFY-03MInexistent Exposure of Pause Functionality
RRE-01MOverly Strict Evaluation of Output
RRE-02MIncorrect Payable Function Attributes
RRE-03MInexistent Protection Against Multi-Order Invocation
RRE-04MInoperable Output Swap Mechanism