If you notice some outdated information please let us know!
PASS
The final review score is indicated as a percentage. The percentage is calculated as Achieved Points due to MAX Possible Points. For each element the answer can be either Yes/No or a percentage. For a detailed breakdown of the individual weights of each question, please consult this document.
Very simply, the audit looks for the following declarations from the developer's site. With these declarations, it is reasonable to trust the smart contracts.
This report is for informational purposes only and does not constitute investment advice of any kind, nor does it constitute an offer to provide investment advisory or other services. Nothing in this report shall be considered a solicitation or offer to buy or sell any security, token, future, option or other financial instrument or to offer or provide any investment advice or service to any person in any jurisdiction. Nothing contained in this report constitutes investment advice or offers any opinion with respect to the suitability of any security, and the views expressed in this report should not be taken as advice to buy, sell or hold any security. The information in this report should not be relied upon for the purpose of investing. In preparing the information contained in this report, we have not taken into account the investment needs, objectives and financial circumstances of any particular investor. This information has no regard to the specific investment objectives, financial situation and particular needs of any specific recipient of this information and investments discussed may not be suitable for all investors.
Any views expressed in this report by us were prepared based upon the information available to us at the time such views were written. The views expressed within this report are limited to DeFiSafety and the author and do not reflect those of any additional or third party and are strictly based upon DeFiSafety, its authors, interpretations and evaluation of relevant data. Changed or additional information could cause such views to change. All information is subject to possible correction. Information may quickly become unreliable for various reasons, including changes in market conditions or economic circumstances.
This completed report is copyright (c) DeFiSafety 2023. Permission is given to copy in whole, retaining this copyright label.
This section looks at the code deployed on the relevant chain that gets reviewed and its corresponding software repository. The document explaining these questions is here.
1. Are the smart contract addresses easy to find? (%)
RocketPool's addresses can be found here. This was clearly labelled in their docs and easy to find. A screenshot of the addresses can be found in the appendix.
2. How active is the primary contract? (%)
Contract "RocketDepositPool" is used over 10 times per day in the last month at the time of writing, as indicated in the Appendix. This is a very active contract, averaging to well over 10 transactions a week.
3. Does the protocol have a public software repository? (Y/N)
Rocketpool stores their data in Github.
4. Is there a development history visible? (%)
At 2,340 commits and 34 branches, RocketPool's core repository is launching to new heights and earns 100%.
5. Is the team public (not anonymous)?
We were able to identify 5 public contributors to the main repository. This was further confirmed by RocketPool's LinkedIn. Where we found the team is documented in our team appendix at the end of this report.
This section looks at the software documentation. The document explaining these questions is here.
7. Is the protocol's software architecture documented? (Y/N)
RocketPool's software architecture is documented with a brief written explanation of its core contract RocketStorage which stores all other contracts here. Further down the page there is a list of all the contracts within RocketStorage.
8. Does the software documentation fully cover the deployed contracts' source code? (%)
RocketPool's docs provide 100% software documentation, as the architecture covers the functions of RocketStorage and lists all the contracts within RocketStorage and their corresponding functions. Additionally, software architecture is documented with illustrations and graphs in their protocol articles on Medium.
9. Is it possible to trace the documented software to its implementation in the protocol's source code? (%)
There is explicit traceability between software documentation and implemented code as the contract list at the bottom of "Interacting with Rocket Pool" links to the Rocket Pool Repository on GitHub.
10. Has the protocol tested their deployed code? (%)
Code examples are in the Appendix at the end of this report.. As per the SLOC, there is 167% testing to code (TtC). This demonstrates great testing rigour and earns the protocol 100%. This score is guided by the Test to Code ratio (TtC). Generally a good test to code ratio is over 100%. However, the reviewer's best judgement is the final deciding factor.
11. How covered is the protocol's code? (%)
No code coverage report was found, however RocketPool's core repository clearly displays a complete set of tests.
12. Does the protocol provide scripts and instructions to run their tests? (Y/N)
Scripts/Instructions location: Instructions: https://github.com/rocket-pool/rocketpool#test-rocket-pool Scripts: https://github.com/rocket-pool/rocketpool/tree/master/scripts
13. Is there a detailed report of the protocol's test results?(%)
No test report found.
14. Has the protocol undergone Formal Verification? (Y/N)
RocketPool has not undergone formal verification.
15. Were the smart contracts deployed to a testnet? (Y/N)
RocketPool has been deployed to an Ethereum testnet.. The docs provide a detailed view on the Testnet functions and this is adequate evidence of protocol testnet usage.
This section looks at the 3rd party software audits done. It is explained in this document.
16. Is the protocol sufficiently audited? (%)
17. Is the bounty value acceptably high (%)
RocketPool offers an active bug bounty of $250K.
This section covers the documentation of special access controls for a DeFi protocol. The admin access controls are the contracts that allow updating contracts or coefficients in the protocol. Since these contracts can allow the protocol admins to "change the rules", complete disclosure of capabilities is vital for user's transparency. It is explained in this document.
18. Is the protocol's admin control information easy to find?
Admin control information can be found within the Protocol DAO Medium article. There are explanations on which settings the DAO is reponsible for but there are no further descriptions as to how these decisions are taken; voting and proposal mechanisms. For that matter, Rocketpool will earn 70%;
19. Are relevant contracts clearly labelled as upgradeable or immutable? (%)
RocketPool's Contract Design & Upgradeability section notes that most RocketPool contracts are made to be upgradeable. A list of protocol contracts is provided and some contracts are identified as internal and thus non-upgradeable. Because of the protocol's open mentions of contract upgradeability, the protocol earns 100%.
20. Is the type of smart contract ownership clearly indicated? (%)
The type of ownership is not indicated.
21. Are the protocol's smart contract change capabilities described? (%)
Smart Contract change capabilities are mentioned within the Protocol DAO article.
22. Is the protocol's admin control information easy to understand? (%)
The presented information on admin control is easy to understand and in non-software specific language. PS: dao.rocketpool.net link not working.
23. Is there sufficient Pause Control documentation? (%)
No pause control information could be found.
24. Is there sufficient Timelock documentation? (%)
No pause time lock information could be found.
25. Is the Timelock of an adequate length? (Y/N)
No pause time lock information could be found.
This section goes over the documentation that a protocol may or may not supply about their Oracle usage. Oracles are a fundamental part of DeFi as they are responsible for relaying tons of price data information to thousands of protocols using blockchain technology. Not only are they important for price feeds, but they are also an essential component of transaction verification and security. These questions are explained in this document.
26. Is the protocol's Oracle sufficiently documented? (%)
RocketPool's oracle source is Oracle DAO, documented and explained at this location. A brief description in their glossary can be found here. The contracts dependent are not identified and there is no relevant software function documentation provided.
27. Is front running mitigated by this protocol? (Y/N)
RocketPool does not mention front running and does not document any countermeasure against it.
28. Can flashloan attacks be applied to the protocol, and if so, are those flashloan attack risks mitigated? (Y/N)
RocketPool does not mention flash loan attacks and does not document any countermeasure against it.
1// SPDX-License-Identifier: MIT
2
3pragma solidity >=0.6.0 <0.8.0;
4
5/**
6 * @dev Wrappers over Solidity's arithmetic operations with added overflow
7 * checks.
8 *
9 * Arithmetic operations in Solidity wrap on overflow. This can easily result
10 * in bugs, because programmers usually assume that an overflow raises an
11 * error, which is the standard behavior in high level programming languages.
12 * `SafeMath` restores this intuition by reverting the transaction when an
13 * operation overflows.
14 *
15 * Using this library instead of the unchecked operations eliminates an entire
16 * class of bugs, so it's recommended to use it always.
17 */
18library SafeMath {
19 /**
20 * @dev Returns the addition of two unsigned integers, with an overflow flag.
21 *
22 * _Available since v3.4._
23 */
24 function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
25 uint256 c = a + b;
26 if (c < a) return (false, 0);
27 return (true, c);
28 }
29
30 /**
31 * @dev Returns the substraction of two unsigned integers, with an overflow flag.
32 *
33 * _Available since v3.4._
34 */
35 function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
36 if (b > a) return (false, 0);
37 return (true, a - b);
38 }
39
40 /**
41 * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
42 *
43 * _Available since v3.4._
44 */
45 function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
46 // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
47 // benefit is lost if 'b' is also tested.
48 // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
49 if (a == 0) return (true, 0);
50 uint256 c = a * b;
51 if (c / a != b) return (false, 0);
52 return (true, c);
53 }
54
55 /**
56 * @dev Returns the division of two unsigned integers, with a division by zero flag.
57 *
58 * _Available since v3.4._
59 */
60 function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
61 if (b == 0) return (false, 0);
62 return (true, a / b);
63 }
64
65 /**
66 * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
67 *
68 * _Available since v3.4._
69 */
70 function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
71 if (b == 0) return (false, 0);
72 return (true, a % b);
73 }
74
75 /**
76 * @dev Returns the addition of two unsigned integers, reverting on
77 * overflow.
78 *
79 * Counterpart to Solidity's `+` operator.
80 *
81 * Requirements:
82 *
83 * - Addition cannot overflow.
84 */
85 function add(uint256 a, uint256 b) internal pure returns (uint256) {
86 uint256 c = a + b;
87 require(c >= a, "SafeMath: addition overflow");
88 return c;
89 }
90
91 /**
92 * @dev Returns the subtraction of two unsigned integers, reverting on
93 * overflow (when the result is negative).
94 *
95 * Counterpart to Solidity's `-` operator.
96 *
97 * Requirements:
98 *
99 * - Subtraction cannot overflow.
100 */
Tests to Code: 6508 / 3892 = 167 %