Quarashi Vesting v.2 security audit, conducted by the Callisto Network Security Department during September 2021.
Quarashi Vesting v.2 Security Audit Report
Are Your Funds Safe?
Audit Request
Quarashi Vesting smart contract security audit report performed by Callisto Security Audit Department.
Website: https://vesting.quarashi.network/
Source code
https://bscscan.com/address/0xe6394181e5fdfff83bebe76ef5898c22fa62c85d#code
Disclosure policy
Platform
BSC.
1. In scope
2. Findings
In total, 0 issue were reported including:
- 0 high severity issues.
- 0 medium severity issue.
- 0 low severity issue.
In total, 1 note were reported, including:
- 1 note.
- 0 owner privilege.
No critical security issues were found.
2.1 The event claimedTokenForUser
use inaccurate value
Severity: note.
Description:
- In the function
transferTokens()
ofVesting
contract when tokens transferred emit the eventclaimedTokenForUser
withprocessForInvestor[_investor][index].part
(line 869) as amount. But in case of last part transfer this amount may be little bit bigger, because it transfer all the rest amountuserSign.lockForUser
(line 854).
Recommendation
Use additional variable amount
like this:
function transferTokens(address _investor, uint256 index) internal {
Inv memory userSign = processForInvestor[_investor][index];
uint256 amount;
if (userSign.lockForUser / userSign.part == 1) {
processForInvestor[_investor][index].lockForUser = 0;
amount = userSign.lockForUser;
} else {
processForInvestor[_investor][index].lockForUser =
userSign.lockForUser -
userSign.part;
amount = userSign.part;
}
require(
erc20.transfer(_investor, amount),
"Vesting: tokens didn`t transfered"
);
emit claimedTokenForUser(
_investor,
amount,
block.timestamp,
index
);
}
3. Security practices
- Open-source contact.
- The contract should pass a bug bounty after the completion of the security audit.
- Public testing.
- Multisig owner account.
- Stnadard ERC20-related issues. – NOT IMPLEMENTED. It is known that every contract can potentially receive unintended ERC20-token deposit without the ability to reject it even if the contract is not intended to receive or hold tokens. As the result it is recommended to implement a function that will allow to extract any arbitrary number of tokens from the contract.
4. Conclusion
The audited smart contract can be deployed. No security issues were found during the audit.
It is recommended to adhere to the security practices described in pt. 4 of this report to ensure the contract’s operability and prevent any issues that are not directly related to the code of this smart contract.
Appendix
Smart Contract Audits by Callisto Network.
Miscellaneous
Our Most Popular Audit Reports.
Trust the Blockchain, Audit the Smart Contracts.
Follow Callisto’s Security Department on Twitter to get our latest news and updates!