Omniscia DAFI Protocol Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in the dToken Platform of DAFI.

As the project at hand implements a novel synthetic asset system with a rebasing mechanism, 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 and that the oracle systems utilized are properly done so.

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 discrepancies within the system which can lead to unexpected scenarios unfolding which we strongly recommend the DAFI team to deal with. Additionally, we pinpointed a circumvention mechanism for the minting of synthetic assets that can significantly outweigh the benefits of the current system as it allows the balances snapshotted to be invalid.

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 good extent.

All but one finding were addressed over the course of the audit, rendering the codebase to be of a high standard.

A total of 25 findings were identified over the course of the manual review of which 13 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
DAF-01MMinorYesInconsistent Token Support
DAF-02MMinorYesIncorrect Demand Factor History
DAF-03MMinorYesIncorrect If Structure
DAF-04MMinorYesRedundant Usage of Storage
DAI-01MMediumYesFlash-Loan Susceptibility
DAT-01MMinorYesImproper Reward Attribution
OWN-01MMinorNoPull-Over-Push Pattern
PFD-01MMinorYesPotentially Unwanted Capability
PFD-02MMinorYesRedundant Usage of Storage
STN-01MMinorYesInconsistent Restrictions
STN-02MMinorYesIncorrect Approval Mechanism
STN-03MMinorYesRedundant & Inaccurate Evaluations
DTO-01MMinorYesInexistent Input Sanitization