Introduction
We express our gratitude to the Knoxnet team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
KnoxNet is a fee-on-transfer token architecture built on a single ERC-20 contract, featuring built-in trading controls, tax handling, blacklist capabilities, and automated fee conversion through Uniswap V2.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for Knoxnet |
| Audited By | Olesia Bilenka |
| Approved By | Seher Saylik |
| Website | https://www.knoxnet.io/→ |
| Changelog | 13/04/2026 - Preliminary Report |
| 15/04/2026 - Final Report | |
| Platform | Ethereum |
| Language | Solidity |
| Tags | Fungible Token |
| Methodology | https://docs.hacken.io/methodologies/smart-contracts→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Knoxnet
- Audited By
- Olesia Bilenka
- Approved By
- Seher Saylik
- Website
- https://www.knoxnet.io/→
- Changelog
- 13/04/2026 - Preliminary Report
- 15/04/2026 - Final Report
- Platform
- Ethereum
- Language
- Solidity
- Tags
- Fungible Token
Review Scope | |
|---|---|
| Repository | https://github.com/Knoxnetofficial/knoxnet-contracts→ |
| Commit | 748a360 |
| Remediation Commit | 42b580b |
Review Scope
- Commit
- 748a360
- Remediation Commit
- 42b580b
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
{Finding_Table?columns=title,severity,status&setting.filter.type=Vulnerability}
Documentation quality
The project does not provide a specification describing the intended behavior of trading controls, fee processing, blacklist logic, launch flow, or administrative configuration boundaries.
A technical design description is not provided. In particular, there is no separate documentation explaining how tax collection, auto-swap, liquidity support, privileged roles, and transfer restrictions are expected to interact under different configurations.
Code quality
The code inlines commonly known utility and base-contract logic instead of reusing external well-established dependencies through imports. This increases file size and reduces modularity and review clarity.
Several template-style patterns are present, particularly around standard ERC-20, ownership, and router-integration logic, combined directly with custom business logic in a single file. This makes it harder to distinguish standard behavior from protocol-specific behavior during review and maintenance.
The development environment is configured.
Test coverage
Code coverage of the project is 52.10% (branch coverage).
The test suite covers deployment, two-step ownership transfer, ERC-20 core behavior, trading activation, buy and sell transaction limits, wallet-limit enforcement, blacklist add flow, tax application, tax configuration updates, manual clog clearing, airdrop behavior, ETH recovery, liquidity-pool management, and auto-swap configuration setters.
The main remaining coverage gap is the automatic
_autoSwapBackexecution path during live sell transactions, including swap execution, liquidity addition, per-block auto-swap counting, and relatedtry/catchfailure branches.Additional uncovered paths include blacklist removal, recipient and caller blacklist reverts, the
inSwapinternal transfer bypass, several view/helper functions, and direct execution of the_tryAddLiquidityETHhelper.
System Overview
KnoxNet is a fee-on-transfer token protocol built around a single main ERC-20 token contract with integrated trading controls, tax collection, blacklist management, and automated fee conversion through Uniswap V2.
It consists of the following components:
KnoxNet — the main ERC-20 token contract that mints the full initial supply to the deployer at deployment and manages all token logic internally, including transfer taxation, transaction and wallet limits, blacklist restrictions, launch controls, and fee processing.
It has the following attributes:
Name: KnoxNet Symbol: KNX Decimals: 18 Total supply: 1b tokens
The protocol is designed for Ethereum-compatible deployment and is tightly coupled to a Uniswap V2-style trading flow. The contract creates its own liquidity pair against WETH during deployment and distinguishes between buy, sell, and regular transfer activity based on whether a liquidity pool is involved.
The token applies configurable fees on buy and sell transactions, with optional taxation on wallet-to-wallet transfers. Collected fee tokens are accumulated inside the contract and can later be converted into ETH. Depending on configuration, the converted value may be routed to a marketing receiver and, if liquidity fees are enabled, partially paired back into liquidity.
The system includes multiple administrative controls. The owner can adjust tax settings, transaction and wallet limits, fee receivers, liquidity-pool classification, and auto-swap behavior. A separate trusted-operator role can perform selected sensitive actions such as opening trading, updating the blacklist, and recovering ETH from the contract.
The protocol does not include staking, vesting, governance, upgradeability, or minting beyond the initial supply. Its design centers on token trading controls and post-trade fee handling rather than on broader DeFi utility.KnoxNet is a fee-on-transfer token protocol built around a single main ERC-20 token contract with integrated trading controls, tax collection, blacklist management, and automated fee conversion through Uniswap V2.
Privileged roles
The owner of the KnoxNet contract role can arbitrarily change taxation parameters, transaction and wallet restrictions, fee receivers, transfer-tax behavior, liquidity-pool classification, and auto-swap settings. The owner can therefore materially change core token behavior and trading conditions at will.
The owner can also assign or remove trusted operators. Through this capability, the owner indirectly controls which external addresses are allowed to perform selected sensitive operational actions on the protocol.
A trusted operator of the KnoxNet contract has elevated operational authority over a subset of critical functions. This role can enable trading, update the blacklist, and recover ETH from the contract to an arbitrary address. As a result, trusted operators are able to influence market access and extract ETH held by the contract.
The owner and trusted operators are exempt from some of the restrictions imposed on regular users, either directly or through configurable exemption mappings. This creates a privileged administrative layer with materially different execution rights from ordinary token holders.
Potential Risks
The KnoxNet contract performs automated token-to-ETH conversions through the Uniswap V2 router without oracle-based price validation or minimum output enforcement, exposing every auto-swap and manual clog-clear operation to sandwich attacks, MEV extraction, and execution at manipulated spot prices.
The KnoxNet contract grants the owner unrestricted ability to modify tax rates, transaction limits, wallet limits, tax receivers, auto-swap parameters, exemption flags, blacklist entries, and liquidity pool designations at any time without timelocks or multi-signature requirements, concentrating full economic control in a single address.
The KnoxNet contract allows the owner to designate arbitrary external addresses as liquidity pools via addLiquidityPool, which changes how the tax engine classifies transfers to and from those addresses, potentially altering tax behavior for any wallet without the affected user's awareness.
The KnoxNet contract relies on a single trusted operator role that, once granted, retains permanent blacklist and ETH withdrawal capabilities even after ownership renunciation, with no on-chain mechanism to revoke the role if the private key is compromised.
The KnoxNet contract does not impose minimum thresholds on transaction limits or wallet caps, allowing the owner to set values low enough to effectively freeze all non-exempt trading activity without disabling the contract.
The KnoxNet contract accumulates tax tokens internally and converts them to ETH during user sell transactions, meaning a temporary failure or manipulation of the Uniswap V2 pair could cause user sells to revert or execute with degraded economic outcomes.
The KnoxNet contract sends ETH to the marketing receiver via a low-level call with silent failure handling during auto-swap, meaning if the receiver becomes unable to accept ETH, proceeds silently accumulate in the contract with no automated retry or alerting mechanism.
The KnoxNet contract pairs accumulated liquidity tokens with ETH and adds them to the Uniswap V2 pool with zero slippage protection, allowing arbitrageurs to extract value from the liquidity addition if pool reserves are temporarily skewed.
The KnoxNet contract does not emit events for the majority of its administrative state changes, making it difficult for off-chain monitoring systems, governance dashboards, or community watchdogs to detect and react to potentially harmful configuration updates in real time.
The KnoxNet contract uses the airdrop function with _basicTransfer, which bypasses blacklist checks, wallet limits, transaction limits, and tax logic, meaning the owner can distribute tokens to any address regardless of its restriction status.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2026-1596 | Unvalidated taxDenominator Breaks Tax Cap Invariants and Causes Hardcoded Limits to Misapply in Both Directions | fixed | High | |
| F-2026-1596 | Excessive Initial Sell Tax Can Severely Restrict Exits and Is Inconsistent With the Contract's Tax Limit Invariants | fixed | High | |
| F-2026-1596 | Incomplete Blacklist Enforcement in transferFrom Allows Blacklisted Callers to Bypass Transfer Restrictions | fixed | High | |
| F-2026-1603 | Auto-Swap Reverts During Sell Execution Can Deny User Exits | fixed | Medium | |
| F-2026-1598 | Incomplete Transfer Classification Causes Inconsistent Limit and Tax Behavior for Wallet-to-Wallet Transfers | mitigated | Medium | |
| F-2026-1598 | Fee Distribution in _autoSwapBack Uses Configured Tax Rates as Proxy for Actual Fee Composition, Causing Systematic Misallocation Between Marketing and Liquidity | fixed | Medium | |
| F-2026-1597 | transferOwnership Does Not Update Privileged Exemptions and Router Allowances After Ownership Transfer | fixed | Medium | |
| F-2026-1597 | Blacklist Enforcement Bypassed When Recipient Is Transaction-Limit Exempt | fixed | Medium | |
| F-2026-1597 | Missing Transfer Event for Taxed Amount Breaks ERC20 Compliance and Causes Balance Tracking Mismatches | fixed | Medium | |
| F-2026-1600 | isTxLimitExempt Simultaneously Disables Both Transaction and Wallet Limits | fixed | Low |
Appendix 1. Definitions
Severities
When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.
Reference on how risk scoring is done is available through the repository in our Github organization:
Severity | Description |
|---|---|
Critical | Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation. |
High | High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation. |
Medium | Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category. |
Low | Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution. |
Severity
- Critical
Description
- Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.
Severity
- High
Description
- High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.
Severity
- Medium
Description
- Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.
Severity
- Low
Description
- Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution.
Potential Risks
The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.
Appendix 2. Scope
The scope of the project includes the following smart contracts from the provided repository:
Scope Details | |
|---|---|
| Repository | https://github.com/Knoxnetofficial/knoxnet-contracts→ |
| Commit | 748a36089e47f4b2d1bf0c6156663c7b1247be23 |
| Remediation Commit | 42b580b3d263748f4af5f3bcadd3e56d32554b1e |
| Whitepaper | - |
| Requirements | - |
| Technical Requirements | - |
Scope Details
- Commit
- 748a36089e47f4b2d1bf0c6156663c7b1247be23
- Remediation Commit
- 42b580b3d263748f4af5f3bcadd3e56d32554b1e
- Whitepaper
- -
- Requirements
- -
- Technical Requirements
- -
Assets in Scope
Appendix 3. Additional Valuables
Additional Recommendations
The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.
To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:
Detecting changes to ownership or critical permissions.
Monitoring large or unexpected transactions and minting events.
Pausing operations when irregularities are identified.
These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.
Frameworks and Methodologies
This security assessment was conducted in alignment with recognised penetration testing standards, methodologies and guidelines, including the NIST SP 800-115 – Technical Guide to Information Security Testing and Assessment →, and the Penetration Testing Execution Standard (PTES) →, These assets provide a structured foundation for planning, executing, and documenting technical evaluations such as vulnerability assessments, exploitation activities, and security code reviews. Hacken’s internal penetration testing methodology extends these principles to Web2 and Web3 environments to ensure consistency, repeatability, and verifiable outcomes.