RageTrade/Core

Off-Chain (Private)
Audited on 2022/05/27
No active critical issues

Summary

We have audited the `core` repository (PerpSwap) of RageTrade, which implements an AMM-based perpetual futures market. During the course of this audit we have found issues spanning all severity levels from high to informational, including issues of yet undetermined severity. Notably, two high severity and two medium severity issues have been identified. We recommend addressing all the findings, before deploying the audited contracts. While covering around 80% of lines and 70% of branches, the test suite is missing some files and some critical lines completely and should be improved before deployment. Overall, the code and the test suite appear to be of high quality, however, the project is very complex due to the large number of non-trivial calculations and logic. <br> <br> **Update:** After the re-audit the rage trade team addressed and fixed or mitigated all of the findings. In particular the high severity issues and the two medium severity issues were fixed. All documentation issues and best practices have been fixed and the test suite has been improved. In addition to the findings listed in this report, the rage trade team independently found and fixed 6 issues during the time of this audit, which have been reviewed and acknowledged by the Quantstamp auditors: - RT-1: Price Caching (https://github.com/RageTrade/core/pull/145) - RT-2: Liquidity Change Bug (https://github.com/RageTrade/core/pull/155) - RT-3: Uniswap Force Push Fix (https://github.com/RageTrade/core/pull/137) - RT-4: Fix circular imports (https://github.com/RageTrade/core/pull/156) - RT-5: Event Updates (https://github.com/RageTrade/core/pull/144) - RT-6: Liqudity Change (Close Token Position) (https://github.


Issues (15)

Low
Medium
High
Critical
Total
Not fixed
2---2
Fixed
922-13
Total1122015


Contracts (103)