Omniscia Platypus 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 novel AMM implementation of Platypus Finance.

As the project at hand implements an automated market maker, 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 yellowpaper.

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 several misbehaviours within the system as well as a liquidity miscalculation which could have had severe ramifications to its overall operation, however, they were conveyed ahead of time to the Platypus 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, however, the formula implementations do deviate slightly from the yellowpaper and these adjustments should be clearly detailed within the project's overall documentation README.md file.

A total of 23 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
ASS-01MMinorYesInexistent Sanitization of Maximum Supply
CPP-01MMediumYesInexistent Chainlink Data Staleness Sanitization
CPP-02MMediumYesInexplicable Repeat Invocation Capability
CPP-03MMinorYesInexistent Validation of Oracle Accuracy
COR-01MMediumYesEquilibrium Point Arbitrage
COR-02MMinorYesPotential Nullification of k
ICA-01MMediumYesOutdated Interface Implementation
POO-01MMediumYesImproper State Upgrade Flow
POO-02MMediumYesInexplicable Repeat Invocation Capability
POO-03MMediumYesPotentially Improper Aggregation Evaluation
TIM-01MMinorYesPotentially Unsafe Import File