Omniscia Kanpeki Finance Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in the protocol implementation of Kanpeki Finance.

As the project at hand implements a novel borrowing and lending 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 misbehaviours within the system which could have had severe ramifications to its overall operation, however, they were conveyed ahead of time to the Kanpeki Finance 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 great extent, containing in-line comments and verbose code wherever applicable.

A total of 26 findings were identified over the course of the manual review of which 11 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
BMR-01MMediumYesIncorrect Repayment of Interest
CMR-01MMinorYesImproper Sanitization of Ratios
CRY-01MMediumYesCentral Point of Failure
COO-01MMinorYesDisjoint Settlement Action
DMR-01MMediumYesInexistent Minimum Interest Validation
FMR-01MMinorYesIncorrect Fee Discount Assumption
ORA-01MMajorYesOutdated Chainlink Implementation
ORA-02MMinorYesPotentially Incorrect Decimal Assumption
OWN-01MMinorYesPull-Over-Push Ownership Pattern
RMR-01MMediumYesIneffectual Cap Increase
SMR-01MMajorYesCircumvention of Expected Amount Penalization