Solutions

Company

Resources

Blog

Contact

Login

    • Assurance

      Smart Contract Assessment

      Securing code integrity, protecting digital assets

      Blockchain Layer 1 Assessment

      Assessing protocols, securing blockchain foundations

      Code Security Audit

      Uncovering flaws, strengthening software integrity

      Web Application Penetration Testing

      Exposing weaknesses, fortifying digital defenses

      Cloud Infrastructure Penetration Testing

      Securing configurations, protecting critical environments

      Red Team Exercise

      Simulating real-world attacks, strengthening defenses

      AI Red Teaming

      Testing AI systems against real threats

      AI Security Assessment

      Securing AI models, data, and pipelines

    • Advisory

      AI Advisory

      Guiding secure, strategic AI adoption forward

      Risk Assessment

      From unknown threats to actionable insights

      Blockchain Architecture Assessment

      Optimizing architecture for tomorrow’s networks

      Compliance Readiness

      Stay ready as regulations evolve

      Custody and Key Management Assessment

      Securing the heart of digital custody

      Technical Due Diligence

      See the risks before you invest

      Technical Training

      Empower your teams to secure what matters

    • Who We Are

      The best security engineers in the world

      Careers

      Work with the elite

      Who Trusts Us

      The trusted security advisor for blockchain and financial services industries

      Brand

      Access official logos, fonts, and guidelines

      Service Commitments

      Committed to Protecting Your Data

    • Audits

      In-depth evaluations of smart contracts and blockchain infrastructures

      BVSS

      Blockchain Vulnerability Scoring System

      Disclosures

      All the latest vulnerabilities discovered by Halborn

      Case Studies

      How Halborn’s solutions have empowered clients to overcome security issues

      Reports

      Comprehensive reports and data

  • Blog

  • Contact

  • Login

THIS WEBSITE USES COOKIES

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. You consent to our cookies if you continue to use our website. Learn More.

STAY CURRENT WITH HALBORN

Subscribe to the monthly Halborn Digest for our top blogs and videos, major company announcements, new whitepapers, webinar and event invites, and one exclusive interview.

ADVISORY SERVICES

AI AdvisoryRisk AssessmentBlockchain Architecture AssessmentCompliance ReadinessCustody and Key Management AssessmentTechnical Due DiligenceTechnical Training

ASSURANCE SERVICES

AI Security AssessmentAI Red TeamingSmart Contract AssessmentBlockchain Layer 1 AssessmentCode Security AuditWeb Application Penetration TestingCloud Infrastructure Penetration TestingRed Team Exercise

COMPANY

Who We AreWho Trusts UsService CommitmentsCareersBrandBlogContact

RESOURCES

AuditsDisclosuresReportsBVSSCase Studies
Halborn Logo
Privacy PolicyTerms of UseVulnerability Disclosure Policy

© Halborn 2025. All rights reserved.

Background

// Security Assessment

04.21.2025 - 05.02.2025

Quex V1 Contracts

Quex

Halborn logotext
← Back to Audits

Quex V1 Contracts - Quex


Prepared by:

Halborn Logo

HALBORN

Last Updated 06/10/2025

Date of Engagement: April 21st, 2025 - May 2nd, 2025

Summary

100% of all REPORTED Findings have been addressed

All findings

16

Critical

1

High

1

Medium

7

Low

5

Informational

2


Table of Contents

  • 1. Introduction
  • 2. Assessment summary
  • 3. Scope
  • 4. Findings overview

1. Introduction

Quex engaged Halborn to conduct a security assessment of their smart contracts from April 21st, 2025, to May 2nd, 2025. The assessment scope was limited to the smart contracts provided to the Halborn team. Commit hashes and additional details are available in the Scope section of this report.

2. Assessment Summary

The Halborn team dedicated 10 days to this engagement, assigning one full-time security engineer to evaluate the smart contracts' security.

The assigned security engineer is an expert in blockchain and smart contract security, with advanced skills in penetration testing, smart contract exploitation, and extensive knowledge of multiple blockchain protocols.

The objectives of this assessment were to:

    • Verify that the smart contract functions operate as intended.

    • Identify potential security vulnerabilities within the smart contracts.


In summary, Halborn identified several improvements to reduce the likelihood and impact of potential risks, which were mostly addressed by the Quex team. The main ones were:

    • Enforce certificate chain validation to maintain integrity and prevent bypasses.

    • Limit batch sizes to prevent unbounded loops and mitigate denial-of-service risks in PlatformCA revocation.

    • Deprecate or isolate outdated hardware to avoid compromise of the oracle network.

    • Disable debug modes in production environments to prevent memory extraction.

    • Prevent duplicate PCK registrations in TrustDomainFacet.

    • Invalidate stale Trust Domain (TD) quotes to mitigate replay attacks.

    • Implement alerts and safeguards to catch silent fund lock failures.

    • Ensure explicit cancellation mechanisms to avoid permanent fund locks.

    • Patch TEE_TCB_SVN counter leaks to enable effective revocation.

    • Harden signature verification against malleability risks.

    • Restrict contract call flows to prevent arbitrary executions.

    • Clear revoked PCKs to eliminate storage bloat.

    • Add comprehensive validation to critical functions.

    • Protect against data overwrite from hash collisions.

    • Validate upgrade events to prevent misleading off-chain monitoring.

    • Review admin logic to prevent unintended privilege escalation.

3. SCOPE

REPOSITORY
(a) Repository: quex-v1-contracts
(b) Assessed Commit ID: dbc2f15
(c) Items in scope:
  • contracts/diamond/DiamondWritable.sol
  • contracts/diamond/DiamondWritableInternal.sol
  • contracts/diamond/QuexDiamond.sol
  • contracts/facets/actions/QuexActionFacet.sol
  • contracts/facets/actions/QuexActionStorage.sol
  • contracts/facets/flow/FlowFacet.sol
  • contracts/facets/flow/FlowStorage.sol
  • contracts/facets/monetary/QuexMonetaryFacet.sol
  • contracts/facets/monetary/QuexMonetaryStorage.sol
  • contracts/facets/oracles/common/monetary_constant_price/ConstantPriceMonetaryFacet.sol
  • contracts/facets/oracles/common/monetary_constant_price/ConstantPriceMonetaryStorage.sol
  • contracts/facets/oracles/common/quex_address/QuexAddressFacet.sol
  • contracts/facets/oracles/common/quex_address/QuexAddressStorage.sol
  • contracts/facets/oracles/common/td_policy_facet/TrustDomainPolicyFacet.sol
  • contracts/facets/oracles/common/td_policy_facet/TrustDomainPolicyStorage.sol
  • contracts/facets/oracles/common/treasury/TreasuryFacet.sol
  • contracts/facets/oracles/common/treasury/TreasuryStorage.sol
  • contracts/facets/oracles/requests/RequestActionFacet.sol
  • contracts/facets/oracles/requests/RequestOracleStorage.sol
  • contracts/facets/p256_verifier/P256VerifierFacet.sol
  • contracts/facets/trust_domain/QuoteVerifier.sol
  • contracts/facets/trust_domain/TrustDomainFacet.sol
  • contracts/facets/trust_domain/TrustDomainFacetInitializer.sol
  • contracts/facets/trust_domain/TrustDomainStorage.sol
  • contracts/ProxyFactory.sol
  • contracts/QuexRoles.sol
  • contracts/diamond/DiamondWritable.sol
  • contracts/diamond/DiamondWritableInternal.sol
  • contracts/diamond/QuexDiamond.sol
↓ Expand ↓
Out-of-Scope: contracts/facets/p256_verifier/P256VerifierFacet.sol, third party dependencies and economic attacks.
Remediation Commit ID:
  • f59d8f6
  • f1bfa28
  • aeaed10
  • c8ee4ce
  • accfcc8
  • 31849f7
  • cb9e7f0
  • cdf63e6
  • 41922ac
Out-of-Scope: New features/implementations after the remediation commit IDs.

4. Findings Overview

Security analysisRisk levelRemediation
Trust Domain Validation Bypasses Certificate Chain Integrity ChecksCriticalSolved - 05/14/2025
Unbounded Loop Creates Permanent DoS Risk in Platform CA RevocationHighSolved - 05/14/2025
Outdated Hardware Can Compromise Entire Oracle NetworkMediumSolved - 05/28/2025
Debug Mode Enables TD Memory ExtractionMediumSolved - 05/28/2025
Duplicate PCK Registration in TrustDomainFacetMediumSolved - 05/14/2025
Replay Attacks Through Stale TD QuotesMediumRisk Accepted - 06/04/2025
Silent Failures Could Lock User Funds ForeverMediumRisk Accepted - 06/04/2025
Permanent Fund Lock Without Request CancellationMediumSolved - 05/16/2025
TEE_TCB_SVN Reference Counter Leak Prevents Permanent RevocationMediumSolved - 06/04/2025
Signature verification vulnerable to malleabilityLowSolved - 05/15/2025
Arbitrary contract call vulnerability through unrestricted flow creationLowRisk Accepted - 06/04/2025
Storage Bloat From Unremoved Revoked PCKsLowSolved - 05/14/2025
Critical Functions Lack Comprehensive ValidationsLowSolved - 05/15/2025
Data Overwrite Risk from Hash CollisionsLowRisk Accepted - 06/04/2025
False Upgrade Events Can Mislead Off-Chain MonitoringInformationalAcknowledged - 06/04/2025
QuexDiamond Can Get Unintended Admin RightsInformationalSolved - 05/15/2025

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.

Table of Contents

  • 1. Introduction
  • 2. Assessment summary
  • 3. Scope
  • 4. Findings overview

// Download the full report

Quex V1 Contracts

* Use Google Chrome for best results

** Check "Background Graphics" in the print settings if needed