Vidma is pleased to present this audit report outlining our assessment of code, smart contracts, and other important audit insights and suggestions for management, developers, and users.
VRJAM is a multiplayer social gaming and live events platform built to empower global brands and premium content creators to create immersive ‘real-time’ consumer experiences inside virtual worlds.
The audited scope included the VestingWallet contract. It is the contract that handles the vesting of native coins and ERC20 tokens for a given beneficiary. The vesting contract configuration is set in the constructor and can’t be changed after. The vesting contract is eligible only for the one beneficiary who is also set in the contract.
Tokens can be transferred to the contract at any time. After the token is transferred to the vesting wallet balance, tokens start to be eligible for the vesting. Any token transferred to this contract will follow the vesting schedule as if they were locked from the beginning based on the start date set in the contract. Tokens are released linearly according to the number of seconds passed from the start date of the vesting.
During the audit process, the Vidma team found several issues with informational and low severity levels. A detailed summary and the current state are displayed in the table below.
After evaluating the findings in this report and the final state after fixes, the Vidma auditors can state that the contracts are fully operational and secure. Under the given circumstances, we set the following risk level:
To set the codebase quality mark, our auditors are evaluating the initial commit given for the scope of the audit and the last commit with the fixes. This approach helps us adequately and sequentially evaluate the quality of the code. Code style, optimization of the contracts, the number of issues, and risk level of the issues are all taken into consideration. The Vidma team has developed a transparent evaluation codebase quality system presented below.
Evaluating the initial commit and the last commit with the fixes, Vidma audit team set the following codebase quality mark.
Score
Based on the overall result of the audit and the state of the final reviewed commit, the Vidma audit team grants the following score:
In addition to manual check and static analysis, the auditing team has conducted a number of integrated autotests to ensure the given codebase has an adequate performance and security level. The test results and coverage can be found in the accompanying section of this audit report.
Please be aware that this audit does not certify the definitive reliability and security level of the contract. This document describes all vulnerabilities, typos, performance issues, and security issues found by the Vidma audit team.
If the code is still under development, we highly recommend running one more audit once the code is finalized.
VRJAM is a metaverse platform that empowers rightsholders to create and share digital content and virtual events with global audiences.
Within the scope of this audit, two independent auditors thoroughly investigated the given codebase and analyzed the overall security and performance of the smart contracts.
The audit was conducted from November 4, 2022 to November 8, 2022. The outcome is disclosed in this document.
The scope of work for the given audit consists of the following contract:
The source code was taken from the following sources:
https://github.com/vrjlive/VRJAM-Vesting
Initial commit submitted for the audit:
Vidma audit team uses the most sophisticated and contemporary methods and well-developed techniques to ensure contracts are free of vulnerabilities and security risks. The overall workflow consists of the following phases:
After the Audit kick-off, our security team conducts research on the contract’s logic and expected behavior of the audited contract.
Vidma auditors do a deep dive into your tech documentation with the aim of discovering all the behavior patterns of your codebase and analyzing the potential audit and testing scenarios.
At this point, the Vidma auditors are ready to kick off the process. We set the auditing strategies and methods and are prepared to conduct the first audit part.
During the manual phase of the audit, the Vidma team manually looks through the code in order to find any security issues, typos, or discrepancies with the logic of the contract. The initial commit as stated in the agreement is taken into consideration.
Static analysis tools are used to find any other vulnerabilities in smart contracts that were missed after a manual check.
An interim report with the list of issues.
Within the testing part, Vidma auditors run integration tests using the Truffle or Hardhat testing framework. The test coverage and the test results are inserted in the accompanying section of this audit report.
Second interim report with the list of new issues found during the testing part of the audit process.
For simplicity in reviewing the findings in this report, Vidma auditors classify the findings in accordance with the severity level of the issues. (from most critical to least critical).
All issues are marked as “Resolved” or “Unresolved”, depending on if they have been fixed by project team or not. The issues with “Not Relevant” status are left on the list of findings but are not eligible for the score points deduction.
The latest commit with the fixes reviewed by the auditors is indicated in the “Scope of Work” section of the report.
The Vidma team always provides a detailed description of the issues and recommendations on how to fix them.
Classification of found issues is graded according to 6 levels of severity described below:
Low ML – 01 | Unresolved
There are some functions that are never called in the contract itself with visibility ‘public’ so they can be marked as ‘external’.
Consider changing visibility from public to external to safe gas usage on calling for functions release() and release(address).
Low ML – 02 | Unresolved
In the function _vestingSchedule() there are 3 storage calls for the _start variable value and 2 for the _duration variable. Consider avoiding useless storage calls to decrease gas usage on the function call and on the deployment.
Consider caching the result of start() and duration() and use a local variable for calculation:
Low TL – 01 | Not relevant
The _vestingSchedule() function can be optimized to return result of ternary operator that will avoid using of if-else branching:
to:
Consider using ternary operators.
Informational MI – 01 | Not relevant
VestingWaleet inherits the Context contract but its functionality is never used.
Consider avoiding import and Inheritness of unused functionality to decrease contract bytecode.
Informational MI – 02 | Unresolved
The layout contract elements in the VestingWallet contract are not logically grouped.
Use the following order:
Consider changing the layout order according to the solidity style guide documentation, that is switching events and state variables order.
Informational MI – 03 | Unresolved
The VestingWallet is partly covered by the NatSpec comments but there is some code without required comments. For example, events and state variables. Also, tag @param for explanation function parameters is missed for each function.
Consider adding full NatSpec documentation.
To verify the security of the contract and the performance, a number of integration tests were carried out using the Hardhat testing framework.
In this section, we provide both tests written by VRJAM and tests written by Vidma auditors.
VRJAM Coverage – 100%
Vidma Coverage – 100%
Industry Standard – 95%
It is important to note that Vidma auditors do not modify, edit or add tests to the existing tests provided in the VRJAM repository. We write totally separate tests with code coverage of a minimum of 95% to meet industry standards.
We are delighted to have a chance to work with the VRJAM team and contribute to your company's success by reviewing and certifying the security of your smart contracts.
The statements made in this document should be interpreted neither as investment or legal advice, nor should its authors be held accountable for decisions made based on this document.