Omniscia Tokemak Network Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Tokemak's capital management protocol.

As the project at hand implements a capital management system, 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 a severe vulnerability within the system in the handling of deposited funds within DefiRound which could have had severe ramifications to its overall operation, however, they were conveyed ahead of time to the Tokemak 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 covered a satisfactory extent of its functionality.

A total of 27 findings were identified over the course of the manual review of which 12 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
DRD-01MMajorYesImproper Token Sanitization
DRD-02MMinorYesPotential for Lock of Ether
DRD-03MInformationalYesPotentially Locked Ether
EPL-01MMediumYesInapplicacy of Checks-Effects-Interactions Pattern
EPL-02MMinorYesIncorrect allowance Arguments
EPL-03MMinorNoPotential for Lock of Ether
POO-01MMinorYesIncorrect allowance Arguments
RED-01MMediumYesInexplicable Functionality
REW-01MMinorNoImproper Cross Chain Replay Attack Protection
REW-02MMinorYesNon-Standard Nonce System
REW-03MMinorYesSignature Malleability
TOK-01MMajorYesImproper Usage of Inheritence