Anazir Info
Anazir takes place in a world filled with runic magic, where elemental Gods wage war against each other through the strength of Heroes and their army of Golems. The player incarnates an elemental hero whose mission is to destroy the opponent’s base by building Towers that generate Summons.
TrustNet Score
The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.
Real-Time Threat Detection
Real-time threat detection, powered by Cyvers.io,
is currently not
activated
for this project.
This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks.
For more information, click here.
Security Assessments
Summary and Final Words
No crucial issues found
The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.
Contract owner cannot mint
It is not possible to mint new tokens.
Contract owner cannot blacklist addresses.
It is not possible to lock user funds by blacklisting addresses.
Contract owner cannot set high fees
The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.
Token transfer can be locked
Owner can lock user funds with owner functions.
Token cannot be burned
There is no burning within the contract without any allowances
Ownership is not renounced
The owner retains significant control, which could potentially be used to modify key contract parameters.
Contract is not upgradeable
The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.
Scope of Work
This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.
The auditing process consists of the following systematic steps:
- Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
- Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
- Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
- Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
- Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
- Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
- Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.
A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.
Final Words
The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.
Ownership Privileges
ANZStakingDynamic.sol
- The owner can schedule the RewardsPerSecond change.
- The owner can execute the reward per change setting.
Note - This Audit report consists of a security analysis of the Anazir smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited the mentioned contract for the Anazir team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.
Files and details
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Findings and Audit result
medium Issues | 4 findings
Resolved
#1 medium Issue
Missing non reentrant check
The claimRewards and stake functions lack reentrancy protection, making them vulnerable to reentrancy attacks. In claimRewards, the function transfers ANZ tokens to the user before updating the state (info.rewardDebt), which violates the checks-effects-interactions pattern. Similarly, in stake, the function transfers tokens from the user before updating the state (pool.totalStaked). An attacker could potentially exploit these functions by creating a malicious contract that reenters the function during the token transfer, allowing them to claim rewards or stake multiple times before the state is updated. The contract should implement OpenZeppelin's ReentrancyGuard modifier to prevent such attacks.
Resolved
#2 medium Issue
The owner can claim staked tokens
The withdraw function has a critical security vulnerability where the contract owner can potentially claim staked tokens. The function lacks proper access control checks and doesn't verify if the caller is the actual staker. Additionally, it doesn't check if the staking period has ended or if the lock period has expired. This could allow the owner to withdraw any user's staked tokens by calling the function with any valid stakeId. The function should implement proper access control, verify the caller's ownership of the stake, and ensure the staking period has ended before allowing withdrawals.
Resolved
#3 medium Issue
Owner Can Lock Rewards Indefinitely
The updateRewardsPerSecond function allows the owner to set any positive value for rewards per second without upper limits or timelock. This creates a risk where the owner could set extremely low reward rates, effectively locking users' rewards for extended periods. The function lacks safeguards like maximum rate changes, timelock periods, or governance approval requirements. This could be exploited to manipulate reward distribution and impact user returns. The function should implement rate change limits and proper governance controls.
Pending
#4 medium Issue
Owner Can Indefinitely Lock User Withdrawals Through Pause Function
The contract implements a pause mechanism that allows the owner to completely lock all withdrawal functionality without any time restrictions or user protections. The pause() function can be called by the owner at any time, which immediately prevents users from withdrawing staked tokens (even after lock periods expire), claiming accumulated rewards, performing emergency withdrawals, and executing any other critical user operations. This creates a centralization risk where user funds can be locked indefinitely at the discretion of a single entity (the owner).
informational Issues | 2 findings
Pending
#1 informational Issue
Floating pragma solidity version
Adding the constant version of solidity is recommended, as this prevents the unintentional deployment of a contract with an outdated compiler that contains unresolved bugs.
Resolved
#2 informational Issue
Unused modifier
The contract contains an unused modifier that checks for contract pause status (require(!paused, "Contract is paused")), but the contract doesn't implement the Pausable functionality from OpenZeppelin. The contract should either properly implement the Pausable contract from OpenZeppelin or remove the unused modifier to maintain code clarity and prevent confusion.