ZFX Info
ZFX Protocol represents a revolutionary advancement in blockchain technology, introducing a Layer 3 solution that transcends the limitations of existing networks. Our innovative approach enables unprecedented scalability without compromising on decentralization or security.
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.
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.
Contract cannot be locked
Owner cannot lock any user funds.
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
- The owner can update the buy and sell fees to not more than 8%.
- The owner can update the fee wallet address.
- The owner can exempt wallets from fees.
- The owner can exempt wallets from the max transaction and max wallet amount.
- The owner can update the max transaction and max wallet amount to not less than 0.1% of the total supply.
- The owner can update the swap threshold value between 0.001% to 0.5% of the total supply.
- The owner can update the automated market maker pair address.
- The owner can toggle the liquidity pool settings.
- The owner can update the slippage value to not more than 5%.
- The owner can toggle the liquidity protection setting in the contract.
- The owner can add a liquidity pair to the contract.
- The owner can toggle the fee settings in the contract.
- The owner can withdraw BNB from the contract.
- The owner can withdraw stuck tokens from the contract.
Note - This Audit report consists of a security analysis of the ZFX smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited one token contract for the ZFX 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
critical Issues | 1 findings
Resolved
#1 critical Issue
Flawed Swap Calculation Will Permanently Freeze Trading
The contract contains a critical flaw within the _swapTokensForBnb function that will lead to a permanent freeze of all trading activity. The function incorrectly calculates the minAmountOut parameter, which is meant to protect against slippage, by basing it on the amount of input ZFX tokens instead of the expected output of BNB (WETH). This results in an impossible condition for the PancakeSwap router, as it is instructed to provide a quantity of WETH that is orders of magnitude greater than the value of the ZFX tokens being swapped. Consequently, every attempt to execute the automated token swap will fail. Since this swap is triggered within a user's transfer, once the contract's token balance reaches the swapTokensAtAmount threshold, all subsequent user transactions that meet this condition will be reverted, effectively and permanently halting all trading.
medium Issues | 3 findings
Resolved
#1 medium Issue
Missing 'require' check. (Potential honeypot)
The owner can set any arbitrary address to the feeWallet address, excluding zero address as this can lead to a potential honeypot if the owner has set the address to a contract address that cannot receive ETH. It is recommended that the address cannot be set to a contract address that cannot receive ETH to avoid these circumstances.
Resolved
#2 medium Issue
The owner can lock the token transfer.
The contract owner possesses the centralized authority to halt all token transfers at any time by calling the setPaused(true) function. This function is restricted to the owner via the onlyOwner modifier and activates a paused state variable. The core transfer function, _update, incorporates a whenNotPaused modifier that reverts any transaction if the contract is paused. This gives the owner the ability to unilaterally freeze all token activity, including trading and peer-to-peer transfers. Such a mechanism introduces significant centralization risk, as a malicious or compromised owner could indefinitely trap the assets of all token holders.
Resolved
#3 medium Issue
Incorrect Logic in Liquidity Protection Can Block Legitimate Transactions
The contract's universalLiquidityProtection mechanism, intended to prevent unauthorized liquidity pool creation, contains flawed logic that can unintentionally block legitimate user transactions. The _isPotentialLiquidityPair function identifies a potential DEX pair by checking if the destination address is a smart contract holding more than 0.01% of the total token supply. This heuristic is overly aggressive and fails to distinguish between a new liquidity pool and other legitimate, high-balance smart contracts like centralized exchange wallets, staking platforms, or large investment fund wallets. As a result, if a user attempts to transfer tokens to any such contract that exceeds this arbitrary threshold, their transaction will be reverted.
low Issues | 1 findings
Resolved
#1 low Issue
Redundant code
The contract includes a function, updateMaxSlippage, which allows the owner to set a slippage tolerance for automated token swaps. However, due to recent changes made to the _swapTokensForBnb function—where the minAmountOut parameter was hardcoded to 0 to prevent trading from freezing—the maxSlippage state variable is no longer used in any calculation. The core logic that would have provided slippage protection has been completely bypassed. Consequently, the updateMaxSlippage function is now redundant code. While it can still be called by the owner, it only modifies a value that has no impact on the contract's operations, creating a misleading impression that configurable slippage protection exists when, in fact, there is none.
informational Issues | 2 findings
Resolved
#1 informational Issue
Floating pragma solidity version.
ding 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
Function that are not used (Dead code).
Remove unused code.