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

11.17.2025 - 11.25.2025

DAML Contracts

Temple

Halborn logotext
← Back to Audits

DAML Contracts - Temple


Prepared by:

Halborn Logo

HALBORN

Last Updated 12/15/2025

Date of Engagement: November 17th, 2025 - November 25th, 2025

Summary

100% of all REPORTED Findings have been addressed

All findings

8

Critical

0

High

1

Medium

2

Low

2

Informational

3


Table of Contents

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

1. Introduction


Temple engaged our security engineering team to conduct a comprehensive review of their DAML-based order-matching and asset-management system. The objective of this engagement was to evaluate correctness, consistency, and robustness across the codebase, with particular emphasis on the logic that governs order lifecycle, matching, token allocation, and multi-step orchestration workflows. The assessment focused exclusively on the DAML modules and templates provided by Temple and closely examined the architectural assumptions, execution paths, and state transitions that underpin the system.

2. Engagement Overview


The audit was performed over a 7-day period by a senior engineer with deep experience in DAML/Canton, smart contract architecture, and adversarial testing of logic-heavy state machines. The review targeted the modules most central to execution reliability:

    • Order.daml

    • Orchestrator.daml

    • Workflow.daml

    • Supporting modules: Split, Merge, Allocations, Transfer, Context, Common, and Utils

The goal was to identify deviations between intended behavior and actual enforcement, uncover nondeterministic behaviors, ensure consistency across multi-step flows, and assess resilience against malformed inputs or state inconsistencies.

3. Assessment Summary


The review focused on validating:

    • Execution correctness and predictable lifecycle management

    • Enforcement of constraints around deadlines, ordering, and expiration

    • Determinism in maker/taker role assignment

    • Safety of deep call stacks within allocation, transfer, and split/merge logic

    • Soundness of context propagation and validation

    • Reliability of list-based and factory-dependent operations

    • Consistency of state representation in workflows involving remainder management

This included evaluating how the system handles re-locking of holdings, expiration logic, multi-order matching, order prioritization, and the complex interplay between factories and allocations that drive the orchestration layer.

4. SCOPE

REPOSITORY
(a) Repository: temple-daml-contracts
(b) Assessed Commit ID: 6b715a9
(c) Items in scope:
  • temple-order-impl/daml/Temple/Order/Order.daml
  • temple-order-impl/daml/Temple/Order/Orchestrator.daml
  • temple-order-impl/daml/Temple/Order/Process/Workflow.daml
  • temple-order-impl/daml/Temple/Order/Process/Definitions/Allocations.daml
  • temple-order-impl/daml/Temple/Order/Process/Definitions/Split.daml
  • temple-order-interface/daml/Temple/Order/Interface/Context.daml
  • temple-order-impl/daml/Temple/Order/Process/Definitions/Transfer.daml
  • temple-order-impl/daml/Temple/Order/Process/Class.daml
  • temple-order-impl/daml/Temple/Order/Process/Definitions/Merge.daml
  • temple-order-interface/daml/Temple/Order/Interface/Cancellable.daml
  • temple-order-impl/daml/Temple/Order/Common.daml
  • temple-order-impl/daml/Temple/Order/Process/Utils.daml
  • temple-order-impl/daml/Temple/Order/Validation.daml
  • temple-order-impl/daml/Temple/Order/Order.daml
  • temple-order-impl/daml/Temple/Order/Orchestrator.daml
  • temple-order-impl/daml/Temple/Order/Process/Workflow.daml
↓ Expand ↓
Remediation Commit ID:
  • bdc97a4
Out-of-Scope: New features/implementations after the remediation commit IDs.

5. Findings Overview

Security analysisRisk levelRemediation
Inconsistent state management when locking all holdings including remainderHighSolved - 12/11/2025
Missing expiration validation during order matchingMediumSolved - 12/11/2025
Insufficient validation of context data enabling potential denial of serviceMediumRisk Accepted - 12/12/2025
Unsafe list access assumptions on transfer operation resultsLowSolved - 12/11/2025
Order matching does not enforce FIFO orderingLowRisk Accepted - 12/11/2025
Inconsistent deadline handling for re-locked order allocationsInformationalSolved
Non-deterministic maker-taker assignment for concurrent ordersInformationalSolved - 12/12/2025
Misleading choice name suggesting validation-only operationInformationalSolved - 12/11/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. Engagement overview
  • 3. Assessment summary
  • 4. Scope
  • 5. Findings overview

// Download the full report

DAML Contracts

* Use Google Chrome for best results

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