This is a NUO Network Process Quality Audit started on 20 May 2020 and completed on 18 June 2020. This was one of the first audits which explains why it took a month. It was performed using the Process Audit process (version 0.2), then revised to process 0.4 as the score weights were balanced. The process is documented here. The audit was performed by ShinkaRex of Caliburn Consulting. Check out our Telegram.
The final score of the audit is 28%, quite low. The breakdown of the scoring is in Scoring Appendix.
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, 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. 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 2021. Permission is given to copy in whole, retaining this copyright label.
This section looks at the executing code deployed on the Mainnet that gets audited and its corresponding software repository. The document explaining these questions is here. This audit will answer the questions;
Is the deployed code address(s) readily available? (Y/N)
Is the code actively being used? (%)
Are the Contract(s) Verified/Verifiable? (Y/N)
Does the code match a tagged version in the code hosting platform? (%)
Is the software repository healthy? (%)
Answer: Yes
They are available at Address 0x64d14595152B430CF6940Da15C6e39545c7c5B7e as indicated iat https://github.com/NuoNetwork/contracts-v2.. This Audit only covers the contract Reserve.
Answer: Yes
Activity is more than 100 transactions a day, as indicated in the Appendix.
100% More than 10 transactions a day
70% More than 10 transactions a week
40% More than 10 transactions a month
10% Less than 10 transactions a month
0% No activity
Answer: Yes
0x64d14595152B430CF6940Da15C6e39545c7c5B7e is the Etherscan verified contract address.
Answer: 60%
All of the deployed code does match the code in the zeus contracts repository. There is no release for the deployed code and there is extra code in the repository for other contracts (KyberConnector and Migrations) that are not in the deployed code, nor are they explained. There is some leftover code in Escrow.sol in the GitHub for truffle compilation that is not in the deployed code. For this reason, a score of 60% was given
GitHub address : https://github.com/NuoNetwork
Deployed contracts in the following file
Matching Repository: https://github.com/NuoNetwork/contracts-v2/tree/master/zeus-contracts
Ensure there is a clearly labelled repository holding all the contracts, documentation and tests for the deployed code. Ensure an appropriately labeled tag exists corresponding to deployment dates. Release tags are clearly communicated.
On the “contracts-v2” repository there are 3 commits, 1 branch, 1 contributor and no releases. This is not a healthy GitHub. See appendix .
Answer: No
Ensure there is a clearly labelled repository holding all the contracts, documentation and tests for the deployed code. Continue to test and perform other verification activities after deployment, including routine maintenance updating to new releases of testing and deployment tools.
This section looks at the software documentation. The document explaining these questions is here.
Required questions are;
Is there a whitepaper? (Y/N)
Are the basic application requirements documented? (Y/N)
Do the requirements fully (100%) cover the deployed contracts? (%)
Are there sufficiently detailed comments for all functions within the deployed contract code (%)
Is it possible to trace software requirements to the implementation in code (%)
Answer: No
Location: ??
Ensure the white paper is available for download from your website or at least the software repository. Ideally update the whitepaper to meet the capabilities of your present application.
Answer: No
Location: ??
No requirements are visible on the website or the github repository.
Write the document based on the deployed code. For guidance, refer to the SecurEth System Description Document.
Answer: 0%
This score can improve by adding content to the requirements document such that it comprehensively covers the requirements. For guidance, refer to the SecurEth System Description Document . Using tools that aid traceability detection will help.
Answer: 10%
There is virtually no commenting throughout the code. Most comments are the TODO notes and the author’s name. 2 functions in reserve.sol have basic commenting, no others. Code examples are in the Appendix. As per the SLOC, there is 2% commenting to code.
This score can improve by adding comments to the deployed code such that it comprehensively covers the code. For guidance, refer to the SecurEth Software Requirements.
Answer: 0%
No traceability artifacts are evident in the requirements document or the code. It does not appear to be any intention of the developers. For this reason a score of 0% is unavoidable. In their defense, very few blockchain development programs use traceability yet.
This score can improve by adding content to the requirements document such that it comprehensively covers the requirements. For guidance, refer to the SecurEth System Description Document . Using tools that aid traceability detection will help.
This section looks at the software testing available. It is explained in this document. This section answers the following questions;
Full test suite (Covers all the deployed code) (%)
Code coverage (Covers all the deployed lines of code, or explains misses) (%)
Scripts and instructions to run the tests (Y/N)
Packaged with the deployed code (Y/N)
Report of the results (%)
Formal Verification test done (%)
Stress Testing environment (%)
Matching repository : https://github.com/NuoNetwork/contracts-v2/tree/master/zeus-contracts and https://github.com/NuoNetwork/nuo-audited-contracts
Answer: 20%
In the deployed contract repository there is no test directory and thus absolutely no tests. However three months after deployment, similar code underwent tests and there is indication of preparation for an audit. The test levels are quite basic. As per the software lines of code Appendix: Software Lines of Code, there is a 70% test to code ratio. While testing was started for basic unit tests only, it does not appear complete.
This score can improve by adding tests to fully cover the code. Document what is covered by traceability or test results in the software repository.
Answer: 0%
As there are no tests in the deployed repository, coverage is not possible. However three months after deployment, similar code underwent tests. Looking at the scripts to run this code, there is no evident code coverage effort.
This score can improve by adding tests achieving full code coverage. A clear report and scripts in the software repository will guarantee a high score.
Answer: Yes
Location: https://github.com/NuoNetwork/nuo-audited-contracts
Answer: No
The deployed code was saved in the zeus contract repository. The tests and scripts were stored in the subsequent repository for the audit.
Improving this score requires redeployment of the code, with the tests. This score gives credit to those who test their code before deployment and release them together. If a developer adds tests after deployment they can gain full points for all test elements except this one.
Answer: 0%
No test results or reports were saved in either repository.
Add a report with the results. The test scripts should generate the report or elements of it.
Answer: 0%
No evidence of Formal Validation was found. This is still a rare type of test.
Answer: 0%
No evidence of an active test network was found for the existing deployed protocol.
Answer: 10%
Audits should take place before the deployment with corrections if the audit indicates them. It appears Nuo had an audit 3 months after deployment as the repository created for this purpose indicates. The audit report is NOT public. There are evident corrections (as indicated by AccountFactoryV2.sol).
I assume the audit took place after deployment. Nuo does not advertise that it had an audit. The results are not public and no improvements were deployed. Based on this a score of 10% as they are between point 4 and 5, below.
As per the standards below; 10%
Multiple Audits performed before deployment and results public and implemented or not required (100%)
Single audit performed before deployment and results public and implemented or not required (90%)
Audit(s) performed after deployment and no changes required. Audit report is public. (70%)
No audit performed (20%)
Audit Performed after deployment, existence is public, report is not public and no improvements deployed (0%)
The author of this audit is Rex of Caliburn Consulting.
Email : rex@caliburnc.com Twitter : @ShinkaRex
I started with Ethereum just before the DAO and that was a wonderful education. It showed the importance of code quality. The second Parity hack also showed the importance of good process. Here my aviation background offers some value. Aerospace knows how to make reliable code using quality processes.
I was coaxed to go to EthDenver 2017 and there I started SecuEth.org with Bryant and Roman. We created guidelines on good processes for blockchain code development. We got EthFoundation funding to assist in their development.
Process Quality Audits are an extension of the SecurEth guidelines that will further increase the quality processes in Solidity and Vyper development.
Career wise I am a business development for an avionics supplier.
pragma solidity 0.4.24;import "./lib/dappsys/DSThing.sol";import "./lib/dappsys/DSStop.sol";import "./lib/utils/Proxy.sol";import "./Account.sol";import "./Config.sol";import "./Utils.sol";/*** @author Rohit Soni (rohit@nuofox.com)*/// TODO: should disable account?contract AccountFactory is DSStop, Utils {Config public config;mapping (address => bool) public isAccount;mapping (address => address[]) public userToAccounts;address[] public accounts;address public accountMaster;constructor(Config _config,address _accountMaster)public{config = _config;accountMaster = _accountMaster;}event LogAccountCreated(address indexed user, address indexed account, address by);modifier onlyAdmin() {require(config.isAdminValid(msg.sender), "AccountFactory::_ INVALID_ADMIN_ACCOUNT");_;}function setConfig(Config _config) external note auth addressValid(_config) {config = _config;}function setAccountMaster(address _accountMaster) external note auth addressValid(_accountMaster) {accountMaster = _accountMaster;}function newAccount(address _user)publicnoteonlyAdminaddressValid(config)addressValid(accountMaster)whenNotStoppedreturns(Account _account){address proxy = new Proxy(accountMaster);_account = Account(proxy);_account.init(_user, config);accounts.push(_account);userToAccounts[_user].push(_account);isAccount[_account] = true;emit LogAccountCreated(_user, _account, msg.sender);}function batchNewAccount(address[] _users) public note onlyAdmin {for (uint i = 0; i < _users.length; i++) {newAccount(_users[i]);}}function getAllAccounts() public view returns (address[]) {return accounts;}function getAccountsForUser(address _user) public view returns (address[]) {return userToAccounts[_user];}}
Language | Files | Lines | Blanks | Comments | Code | Complexity |
Solidity | 11 | 1949 | 307 | 47 | 1595 | 124 |
Comments to Code 47/ 1949 = 2%
Language | Files | Lines | Blanks | Comments | Code | Complexity |
JavaScript | 8 | 2012 | 532 | 122 | 1358 | 59 |
Tests to Code 1358 / 1959 = 70%