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:
ID | Severity | Addressed | Title |
---|---|---|---|
ARB-01M | Inexplicable Capability of Re-Invocation | ||
ARB-02M | Inexistent Re-Entrancy Protection | ||
ARB-03M | Inexistent Validation of Existing AP Token Entry | ||
EXT-01M | Authoritative Definition of Prices | ||
EXT-02M | Inexplicable Price Measurement Methodology | ||
EXT-03M | Unsafe Initialization Methodology | ||
EXT-04M | Unsafe Price Feed Implementation | ||
FIX-01M | Potential Centralization Concern | ||
MIN-01M | Improper Code Structure | ||
PRI-01M | Inexplicable Price Measurement Methodology | ||
PRI-02M | Incorrect Price Measurements | ||
PRI-03M | Selective Storage of Price Feed Measurements | ||
PRI-04M | Incorrect Order of Snapshot Update | ||
PRI-05M | Unsafe Initialization Methodology | ||
PRI-06M | Unsafe Price Feed Implementation | ||
STA-01M | Centralized Control of Sensitive Variables | ||
STA-02M | Inexistent Re-Entrancy Protection | ||
TOK-01M | Potentially Incorrect Interface Import | ||
TOK-02M | Inexistent Protection of MCR | ||
TRE-01M | Inexplicable Capability of Re-Invocation | ||
TRO-01M | Potentially Misleading Function |