Veilon Info

A zk-native cross-chain wallet and protocol for private, untraceable transfers, swaps, and bridging powered by stealth addresses & encrypted transaction layers.

Veilon Logo

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.

20.00
Poor Excellent

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

Select the audit
"Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Solidity
Onboard date 2026/02/25
Revision date 2026/02/25

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 renounced

The contract does not include owner functions that allow post-deployment modifications.

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:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. 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.


No Audit Comments.

Files and details

Findings and Audit result

critical Issues | 3 findings

Resolved

#1 critical Issue
Trust Model Violation / Secret Exposure to Relayer
src/services/proof-generator.ts + src/routes/privacy.ts
Lprivacy.ts:125-193
L199-323
L329-450; proof-generator.ts:166-220
L225-328
L333-445
Description

The backend relayer receives commitment secrets (secret, nullifier, randomness) in plaintext via HTTP POST from the mobile app. The relayer sees all private values needed to reconstruct commitments, generate nullifier hashes, and forge proofs. This completely negates the privacy guarantees of ZK proofs: the relayer can link deposits to withdrawals, reconstruct user balances, and impersonate users. In a genuine privacy protocol, proof generation MUST happen client-side so that secret values never leave the user's device. The relayer architecture makes the entire ZK layer security theater — it proves nothing to a party that already knows all the secrets.

Resolved

#2 critical Issue
Mock Proof Bypass in Production Path
src/services/proof-generator.ts
L92-120
L126-161
L452-482
Description

When compiled circuit files (.wasm, .zkey) are not present, the proof generator falls back to generating random mock proofs that are cryptographically meaningless. There is NO runtime flag, environment check, or guard to prevent this in production. The mock proofs have random pi_a, pi_b, pi_c values that will never pass on-chain Groth16 verification. Furthermore, the verifyProof() method (line 585-587) returns true when the verification key file is missing, silently bypassing verification. If the production backend is deployed without circuit files (which appears to be the current state based on the README), all proof generation is fake.

Resolved

#3 critical Issue
No Merkle Tree — Fundamentally Broken Privacy Model
src/services/merkle-tree.ts + src/routes/privacy.ts
Lmerkle-tree.ts:1-175; privacy.ts:174
L260-303
L380-426
L456-482
Description

There is NO Merkle tree implementation in the backend. The backend has zero Merkle tree code — no tree construction, no path computation, no root tracking. The ZK circuit inputs do not include Merkle path or root. Without a Merkle tree: (1) There is no anonymous set — every commitment is individually identifiable. (2) Unshield/transfer operations directly reference the input commitment in calldata, making all transaction flows fully traceable on-chain. (3) The entire privacy model is broken because an observer can trivially link shield → unshield → transfer chains.

high Issues | 3 findings

Resolved

#1 high Issue
No Authentication / No Rate Limiting
src/server.ts + src/routes/privacy.ts
Lserver.ts:20-51
L62-98
L110; privacy.ts:all endpoints
Description

All backend API endpoints are completely unauthenticated and have no rate limiting. Anyone who discovers the relayer URL can: (1) generate unlimited proofs, consuming server CPU, (2) submit malformed requests to probe for vulnerabilities, (3) perform denial-of-service by flooding proof generation (which is computationally expensive). The CORS policy is permissive (allows all origins). The production URL (https://veilonbackend-production.up.railway.app) is exposed in the mobile source code.

Resolved

#2 high Issue
Secrets Returned in API Responses
src/routes/privacy.ts
L176-180
L306-310
L428-436
Description

The shield endpoint returns secret, nullifier, and randomness in the HTTP response body. The unshield and transfer endpoints return changeSecret, changeNullifier, and changeRandomness. These values are the private witness for ZK proofs. Transmitting them over the network (even over HTTPS) creates multiple attack vectors: network logging, proxy inspection, CDN caching, server access logs, and client-side caching.

Resolved

#3 high Issue
Sensitive Data in Server Logs
src/services/proof-generator.ts + src/routes/privacy.ts
Lprivacy.ts:182
L311
L438; proof-generator.ts:all; merkle-tree.ts:28
L47
Description

The backend logs truncated (but still partially revealing) secret values, nullifiers, and randomness to console.log. The routes log all incoming request parameters including amounts, recipients, and chain IDs. In production, these logs may be persisted to log aggregation services (CloudWatch, Datadog, etc.), creating a permanent record of all private transaction details.

medium Issues | 1 findings

Resolved

#1 medium Issue
Floating Point Arithmetic for Financial Calculations
src/routes/privacy.ts
LN/A
Description

Change amount calculation uses parseFloat subtraction: (parseFloat(inputAmount) - parseFloat(outputAmount)).toString(). Floating point arithmetic can produce precision errors (e.g., 0.1 + 0.2 !== 0.3). These imprecise values are then passed to ethers.parseEther() which expects exact decimal strings. This could cause amount mismatches that fail on-chain validation (outputAmount + changeAmount != inputAmount).

low Issues | 4 findings

Pending

#1 low Issue
Error Messages Expose Internal Details
src/routes/privacy.ts
L114
L183-191
L313-321
L440-448
L477-480
L501-505
Description

The global error handler returns err.message to the client, which may contain stack traces, file paths, or internal error details that aid attackers in reconnaissance.

Pending

#2 low Issue
Insufficient Input Validation
src/routes/privacy.ts
L151
L251
L131-158
L205-258
Description

Input validation is minimal: (1) amount validation uses parseFloat which accepts strings like '1e18', 'Infinity', 'NaN'. (2) recipient address is not validated — no checksum, no format check, no zero-address check. (3) No maximum amount check. (4) No schema validation library used.

Pending

#3 low Issue
TypeScript Strict Mode Disabled
tsconfig.json
L8
L17-27
Description

The TypeScript configuration has strict: false, noImplicitAny: false, and noImplicitReturns: false. This allows type-unsafe code, implicit any types, and missing return statements — all of which can introduce subtle runtime bugs in a security-critical application.

Pending

#4 low Issue
Cross-Chain Replay Attack — No Chain Binding in Proofs
multiple
Lproof-generator.ts:188-194
L286-293
L394-406
Description

ZK proofs do not include block.chainid, contract address, or any chain-specific identifier in the public inputs. A proof generated for one chain could theoretically be submitted on another chain where the same contracts are deployed with the same commitment.

informational Issues | 5 findings

Pending

#1 informational Issue
No Test Coverage
N/A
LN/A
Description

The backend codebase contains zero test files. There are no unit tests for proof generation, no integration tests for the proof → contract flow, and no tests for input validation or error handling.

Pending

#2 informational Issue
No Monitoring, Alerting, or Observability
N/A
LN/A
Description

There is no application monitoring, error reporting (Sentry, etc.), performance tracking, or health alerting. Console.log is the only logging mechanism. For a financial application handling real value, this is insufficient.

Pending

#3 informational Issue
Unpinned Dependencies
package.json
L11-32
Description

All dependencies use caret (^) versioning, allowing minor/patch updates that could introduce breaking changes or vulnerabilities. For a security-critical application, versions should be pinned.

Pending

#4 informational Issue
Health Endpoint Leaks Configuration Details
src/routes/privacy.ts
L488-507
Description

The privacy health endpoint returns internal state including leafCount, nullifierCount, and the current Merkle root. While these are not secrets, they reveal system load and usage patterns.

Pending

#5 informational Issue
Public Signal Ordering Not Enforced
src/services/proof-generator.ts
L188-194
L286-293
L394-406
Description

The ordering of public signals is critical for proof verification but is only documented in code comments and not enforced programmatically. No shared schema or constant mapping exists for public signal indices.