Omniscia BlazeSwap Audit

Manual Review

Manual Review

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

As the project at hand implements a decentralized 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 vulnerabilities within the system of varying severity which could have had minor-to-moderate ramifications to its overall operation, however, they were conveyed ahead of time to the BlazeSwap team to be promptly remediated.

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 a certain extent, however, we strongly recommend it to be expanded at certain complex points such as the FTSO reward integration to ensure that the reward mechanisms perform as their author intended.

A total of 31 findings were identified over the course of the manual review of which 17 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
BSB-01MInexplicable Usage of Unchecked Mathematical Operations
BSB-02MIncorrect K System Fee Assumptions
BSD-01MImproper Plugin Layout Assumption
BSD-02MPotential Flash Loan Manipulation
BSE-01MInsecure Elliptic Curve Recovery Mechanism
BSE-02MCross-Chain Replay Attack
BSE-03MInexistent EIP-20 Approval Event
BSC-01MImproper Snapshot ID Validation
BSA-01MTest Code
BFA-01MIncomplete Implementation
BSF-01MInexistent Conformance of Checks-Effects-Interactions Pattern
BFR-01MInexistent Guarantee of Epoch Distribution
BSL-01MUsage of Init Code Hash
CON-01MInexistent Validation of Sane State Transition
BSP-01MImproper Plugin Layout Assumption
DCH-01MIncorrect Management of Error Message Decoding
SER-01MTrivial Symbol Collision