Omniscia Xcaliswap Audit

Manual Review

Manual Review

A thorough line-by-line review was conducted on the codebase to identify potential malfunctions and vulnerabilities in Xcaliswap's AMM implementation.

As the project at hand implements a decentralized and incentivized AMM implementation, 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 types of vulnerabilities within the system which could have had moderate-to-severe ramifications to its overall operation, however, they were conveyed ahead of time to the Xcaliswap 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 the extent it need be, although we did observe misleading documentation that was highlighted as typographic mistakes in the audit report.

As a final point, we would like to note that the Minter implementation states that it implements the ve(3,3) minting standard initially created by Andre Cronje, however, it deviates significantly from it and thus fails to "codify" it as the Xcaliswap team has significant control over how emissions are performed in the protocol.

A total of 45 findings were identified over the course of the manual review of which 10 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
BEB-01MPotential Denial-of-Service Attack of Rewards
GEG-01MPotential Denial-of-Service Attack of Rewards
MRE-01MImproper Active Period Calculation
MRE-02MIncorrect Limit Reset
MPA-01MImproper Validation of Weights
SPR-01MPotentially Misleading Fee Amounts
SPR-02MInsecure Elliptic Curve Recovery Mechanism
TNE-01MComplete Centralization of Supply
VRE-01MBypass of listing_fee
VEW-01MInexistent Validation of ERC721 Conformity