Summary
100% of all REPORTED Findings have been addressed
- 0Acknowledged
- 0Risk Accepted
- 20Solved
- 20All Findings
- Critical0
- High0
- Medium2
- 2Solved
- Low5
- 5Solved
- Informational13
- 13Solved
Introduction#
The security assessment was commissioned by ZKCross, a cross-chain interoperability protocol focused on DeFi infrastructure, to assess the security and robustness of the Solidity-based EVM Swapper smart contract. The assessment was performed by Halborn’s experienced security team, focusing on the code released at commit 0264b30. The review covered all functionality in Swapper.sol between August 21st, 2025, and August 22nd, 2025. The primary objective of this engagement’s core purpose was to identify vulnerabilities, ensure protocol reliability and strengthen overall security.
Assessment Summary#
The team at Halborn assigned a full-time security engineer to verify the security of the smart contracts. The security engineer is a blockchain and smart-contract security expert with advanced penetration testing, smart-contract hacking, and deep knowledge of multiple blockchain protocols.
The purpose of this assessment is to:
Ensure that smart contract functions operate as intended
Identify potential security issues with the smart contract
In summary, Halborn identified some improvements to reduce the likelihood and impact of risks, which were properly addressed by the ZKCross team. The main recommendations were the following:
Reinstate the check to ensure that the caller of the swap function is the one whose funds are being used.Use call() pattern with success check instead of transfer() when transferring funds.Add slippage control to the swap function.Measure the token balance before and after transfer, then approve the allowanceHolder for the actual amount received instead of the nominal amount.
Test Approach and Methodology#
A layered and exhaustive approach was adopted. Initial research mapped contract design objectives and expected operating scenarios. Manual code reviews targeted privilege boundaries, fund flows, and feature completeness, with particular scrutiny of administrative and edge-case logic. Automated static analysis and dynamic on-chain test suites were executed to cover functional correctness, failure conditions, and integration with external token contracts.
The methodology balanced deep manual analysis with rigorous automated tools. Multiple stages were conducted: reconnaissance, manual threat modeling, static analysis, custom test building, and scenario-driven on-chain transaction simulations. This combination ensured broad and deep coverage, surfacing both logical flaws and implementation oversights across all critical paths.
Risk Methodology#
4.1 EXPLOITABILITY
Attack Origin (AO):
Attack Cost (AC):
Attack Complexity (AX):
Metrics:
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) | 1 |
| Specific (AO:S) | 0.2 | |
| Attack Cost (AC) | Low (AC:L) | 1 |
| Medium (AC:M) | 0.67 | |
| High (AC:H) | 0.33 | |
| Attack Complexity (AX) | Low (AX:L) | 1 |
| Medium (AX:M) | 0.67 | |
| High (AX:H) | 0.33 |
4.2 IMPACT
Confidentiality (C):
Integrity (I):
Availability (A):
Deposit (D):
Yield (Y):
Metrics:
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) | 0 |
| Low (C:L) | 0.25 | |
| Medium (C:M) | 0.5 | |
| High (C:H) | 0.75 | |
| Critical (C:C) | 1 | |
| Integrity (I) | None (I:N) | 0 |
| Low (I:L) | 0.25 | |
| Medium (I:M) | 0.5 | |
| High (I:H) | 0.75 | |
| Critical (I:C) | 1 | |
| Availability (A) | None (A:N) | 0 |
| Low (A:L) | 0.25 | |
| Medium (A:M) | 0.5 | |
| High (A:H) | 0.75 | |
| Critical (A:C) | 1 | |
| Deposit (D) | None (D:N) | 0 |
| Low (D:L) | 0.25 | |
| Medium (D:M) | 0.5 | |
| High (D:H) | 0.75 | |
| Critical (D:C) | 1 | |
| Yield (Y) | None (Y:N) | 0 |
| Low (Y:L) | 0.25 | |
| Medium (Y:M) | 0.5 | |
| High (Y:H) | 0.75 | |
| Critical (Y:C) | 1 |
4.3 SEVERITY COEFFICIENT
Reversibility (R):
Scope (S):
Metrics:
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) | 1 |
| Partial (R:P) | 0.5 | |
| Full (R:F) | 0.25 | |
| Scope () | Changed (S:C) | 1.25 |
| Unchanged (S:U) | 1 |
| Critical | High | Medium | Low | Informational |
| 9 - 10 | 7 - 8.9 | 4.5 - 6.9 | 2 - 4.4 | 0 - 1.9 |
Scope#
Assessment Summary & Findings Overview#
# | Title | Severity | Score | Status |
|---|---|---|---|---|
| Third-party Can Trigger swap on Behalf of a User | Medium | 5.9 | Solved09/09/2025 | |
| Funds Can Be Stuck for Smart Contract Recipients | Medium | 5.0 | Solved09/09/2025 | |
| No Slippage Control In swap | Low | 3.4 | Solved09/09/2025 | |
| Fee-on-Transfer/Deflationary Token Incompatibility | Low | 2.5 | Solved09/09/2025 | |
| Missing Two-Step Ownership Transfer Pattern | Low | 2.5 | Solved09/09/2025 | |
| User Funds Stuck Without Recourse When Cross-Chain Transfer Fails | Low | 2.5 | Solved09/12/2025 | |
| Missing Storage Gap | Low | 2.0 | Solved09/09/2025 | |
| Typographical Errors and Inconsistencies | Informational | 1.3 | Solved09/09/2025 | |
| Missing explicit allowanceHolder zero-address check in lock/release | Informational | 1.0 | Solved09/09/2025 | |
| Swap Functionality Can Be Permanently Disabled | Informational | 1.0 | Solved09/09/2025 | |
| Risk of Irrecoverable Fund Loss in withdrawTokens | Informational | 1.0 | Solved09/09/2025 | |
| Missing Events for Critical Admin Actions | Informational | 0.8 | Solved09/09/2025 | |
| Raw ERC20 Transfer In lock | Informational | 0.7 | Solved09/09/2025 | |
| Stale ERC20 Approvals Can Enable Unintended Token Pulls | Informational | 0.7 | Solved09/09/2025 | |
| Processed Lock Hash Keyed By String | Informational | 0.0 | Solved09/09/2025 | |
| Dead Code | Informational | 0.0 | Solved09/12/2025 | |
| Unlocked Pragma | Informational | 0.0 | Solved09/09/2025 | |
| Usage of Revert Strings Instead of Custom Error | Informational | 0.0 | Solved09/09/2025 | |
| Redundant Validations After `_decode` Increase Gas and Code Complexity | Informational | 0.0 | Solved09/09/2025 | |
| Test Suite Failures | Informational | 0.0 | Solved09/12/2025 |
Findings & Tech Details#
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Description
Recommendation
Disclaimer#
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
