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. During the audit process, we reviewed strategy based on Alpaca AUSD protocol to earn profit from depositing funds into the Vault contract. Expect Alpaca AUSD protocol this strategy also relies on Ellipsis Liquidity protocol and Pancakeswap. Audited smart contracts are following security best practices and code style. During the audit process, the Vidma team found several issues, which were successfully fixed by Xend Finance team. 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:
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 scoring 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.
Credit Unions, Cooperatives, and Individuals anywhere in the world can now earn higher interests in stable currencies on their savings.
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 June 1st, 2022 to June 22nd, 2022. The outcome is disclosed in this document.
The scope of work for the given audit consists of the following contracts:
The source code was taken from the following source:
https://github.com/xendfinance/x-vault/tree/alpaca-eps-strategy
Initial commit submitted for the audit:
caaad2c9c4ecca7c95914c45b2ce294622127a70
Last commit reviewed by the auditing team:
67fb80862c67fdc462bd07d7d47256a330c47ff7
As a reference to the contracts logic, business concept, and the expected behavior of the codebase, the Xend Finance team has provided the following documentation:
https://github.com/xendfinance/x-vault/blob/5a9478e966ec1ab5e6df4e076b3afdbc5b964d8b/README.md
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 | Resolved
In BaseStrategy.sol contract there is function delegatedAssets() which is return zero. There is no specific implementation of this function in the AlpacaAusdEpsStrategy.sol contract.
Consider deleting the function or adding specific implementation in the AlpacaAusdEpsStrategy.sol contract to provide actual data.
Low | Resolved
In the AlpacaAusdEpsStrategy.sol contract should be event emit for state variables overriding minAlpacaToSell and collateralFactor in the appropriate functions setMinAlpacaToSell() and setCollateralFactor().
Consider the emitting events in these specific cases to be able to track critical data change.
Informational | Resolved
Some of the functions are covered by the NatSpec annotation. But also there are functions where NatSpec is not provided.
Consider fully covering SCs with NatSpec annotation.
Informational | Resolved
There is a list of constants in the AlpacaAusdEpsStrategy.sol contract. According to the solidity style guide, the constant should be named with all capital letters with underscores separating words UPPER_CASE_WITH_UNDERSCORES.
Consider changing the naming style of the contents according to the style guide recommendation.
Informational | Resolved
Smart contract StrategyAlpacaAUSDEPSFarm doesn't match its filename, AlpacaAusdEpsStrategy.sol. According to the style guide contract, library and interface names should also match their filenames.
Consider keeping the same name for the interface and the filename.
To verify the security of contracts and the performance, a number of integration tests were carried out using the Truffle testing framework.
In this section, we provide both tests written by Xend Finance and tests written by Vidma auditors.
Vidma Coverage – 95.2%
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 Xend Finance 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 Xend Finance 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.