Omniscia Bonq Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Bonq's borrowing system.

As the project at hand implements a borrowing protocol, 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 severe ramifications to its overall operation, however, they were conveyed ahead of time to the Bonq team as they may require a pivot of the project's design.

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 mathematical literals and formulas that are located throughout (i.e. in the BONQ-staking file) preferably linked with white-paper definitions.

A total of 42 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
ARB-01MInexplicable Capability of Re-Invocation
ARB-02MInexistent Re-Entrancy Protection
ARB-03MInexistent Validation of Existing AP Token Entry
EXT-01MAuthoritative Definition of Prices
EXT-02MInexplicable Price Measurement Methodology
EXT-03MUnsafe Initialization Methodology
EXT-04MUnsafe Price Feed Implementation
FIX-01MPotential Centralization Concern
MIN-01MImproper Code Structure
PRI-01MInexplicable Price Measurement Methodology
PRI-02MIncorrect Price Measurements
PRI-03MSelective Storage of Price Feed Measurements
PRI-04MIncorrect Order of Snapshot Update
PRI-05MUnsafe Initialization Methodology
PRI-06MUnsafe Price Feed Implementation
STA-01MCentralized Control of Sensitive Variables
STA-02MInexistent Re-Entrancy Protection
TOK-01MPotentially Incorrect Interface Import
TOK-02MInexistent Protection of MCR
TRE-01MInexplicable Capability of Re-Invocation
TRO-01MPotentially Misleading Function