Daml smart contract audit for Arqitech

Arqitech

An independent review of existing Daml HTLC contracts, with prioritized findings and verification of the fixes that followed. The contracts passed their own test suite. A test suite shows what code was built to do, not what else it permits.

  • Canton Network
  • Daml
  • Smart contract audit
  • Cross-chain swaps

About the solution

A Daml library for cross-chain swaps

Arqitech builds infrastructure for institutional digital-asset settlement on the Canton Network. Its team had written a Daml library covering the Canton leg of a cross-chain atomic swap: a hashed timelock contract (HTLC) that locks assets, releases them against a secret, and returns them once a deadline passes.

Details

Date:
July 2026
Timeline:
Approximately two weeks
Team:
One Daml developer from PixelPlex

Challenge

Settlement logic is hard to judge from the inside

A permissive condition on when assets can be claimed or returned reads exactly like a correct one until somebody exercises it.

  • 01

    Independent audit

    Arqitech requested an independent audit, a step that has become standard before deployment for contracts that settle institutional assets.

  • 02

    Outside view

    The team needed an outside view of whether the implementation matched its documented assumptions.

  • 03

    Order of work

    And an order of work for whatever came back.

Project goals and solutions

From findings to verified fixes

Goal 01

Identify risk beyond what the tests cover

The goal was to find what the contracts permit beyond their intended use, and where safety rests on assumptions the code does not enforce.

Our Daml specialist read the contracts and every test by hand. We traced how assets move during settlement and confirmed that the Canton leg hashes the secret the same way Bitcoin does. Daml has no automated scanners like Slither or Mythril, so every conclusion came from reading the code, in a language few engineers know.

Goal 02

Turn findings into an order of work

A flat list of defects leaves the triage with the client. Arqitech needed to know which items hold up a deployment and which can wait.

We rated each finding by how likely it is and how much damage it could do, and set a separate priority for fixing it. That is how one medium finding got high priority: it had to be fixed before any deployment. We grouped the fixes into three phases, from deployment blockers to cleanup.

Goal 03

Stay with the findings until the fixes are verified

An audit pays off once the recommendations reach the code; handing over the document is the halfway point. The goal was a verified change in the repository.

We worked from the prioritized plan, which told the developer what to take first. Arqitech’s developer implemented the changes, and we re-reviewed the result against the findings that prompted them. The plan asked for a conformance test with every fix, so that closing a finding would rest on evidence.

What we reviewed

Sender proposes, receiver accepts, and the registry holds the tokens

  1. Sender01

    Proposal

    Creates the swap proposal. The receiver can see it but has not agreed yet.

    HTLCProposal
  2. Receiver02

    Accept

    Accepts and adds their authority. The HTLC is created with both parties as signatories.

    HTLCProposal_Accept
  3. Sender03

    Funding

    Funds the swap through the standard CIP-56 allocation. The tokens stay in the registry.

    AllocationFactory_Allocate
  • Receiver

    Claim

    Reveals the secret in the same transaction that takes the tokens. The sender sees it and can claim the other chain’s leg.

    HTLC_Claim
  • Sender

    Refund

    Once the timelock passes, cancels the allocation and gets the tokens back.

    HTLC_Refund
  • Both parties

    Collaborative refund

    Both parties agree through a request-and-accept step to return the tokens.

    Request, then accept
Registry

Token registry

The tokens sit here in an allocation, not in the HTLC. A claim tells the registry to execute the transfer; a refund tells it to cancel.

Allocation_ExecuteTransfer, Allocation_Cancel
  • Eye icon

    Rights and visibility

    The review examined the authority required for claim, refund, and collaborative refund. In Daml, the same declarations decide who can act on a contract and who can see it, so each one was checked for both.

  • Stacked registry records icon

    The registry split

    The tokens sit in a registry allocation rather than inside the HTLC, which limits what the contract alone can guarantee. The review traced how each contract action drives the standard allocation interfaces.

Scope and boundaries

  • Check mark in a circle icon

    What the review covered

    Arqitech’s wider platform is a codebase of roughly 200,000 lines, front end and back end included. This engagement covered the Daml contract layer within it: two Daml source files and a test package implementing the Canton leg of the swap, in the CIP-56 version submitted for assessment. Its conclusions apply to that implementation alone.

  • Cross in a circle icon

    What stayed outside

    The production token registry, the counterparty-chain implementation, the off-ledger orchestrator, and deployment topology stayed outside the review. The report flags each point where contract behavior depends on them.

Scoping starts with the code

Findings

NDA

The full report stays confidential to Arqitech

One low-severity finding is described here because it shows what a passing test suite can hide.

  • What we found

    The suite has 63 tests across 2,300+ lines. Nine of them are negative tests for the permission model: they check that claim, refund, and collaborative refund reject a party without the right to act. All nine relied on one helper function, and an operator-precedence mistake in it cancelled the one check that mattered: whose authority was missing.

  • Why it matters

    The permissions themselves were correct, and the review confirmed that by reading the contract. The risk sat in the next change: if a later edit shifted who must authorize an action, the nine tests would not notice, and the regression could ship on a green test run.

  • The fix

    Correct the precedence so each assertion compares the exact set of required authorizers, then re-validate the authorization suite so it counts as evidence again. The plan listed the corrected suite among the items PixelPlex would confirm before sign-off.

L-1Low severity

Authorization tests that could not tell who was missing

In plain terms: the tests meant to prove that only the right party can act checked that an action failed, but not why.

01Negative testA party without the right tries to claim or refund.
02Ledger rejectsThe transaction fails with an authorization error.
As intended
03Helper checksIt compares whose authority was missing with the contract’s rules.
04Pass only if rightThe test passes only when the permissions are correct.
As it worked
03Precedence bugAn operator-precedence mistake cancels that comparison.
04Pass regardlessThe test passes whatever the required authorizers are.

Severity

Every assertion through the helper was affected, but the code as submitted had no path to loss.

Severity
Low
Likelihood
High
Impact
False confidence in the tests

Delivery

The assessment set out what was examined, what was excluded, and what to change first

The blocking findings called for three changes. One went into the contract itself. For the other two, both teams agreed during a call to enforce them in the off-ledger part of the system, which sits outside this review.

On July 23, 2026, Arqitech announced live non-custodial cross-chain swaps on Canton MainNet, carried out with MPCH, sFOX, and PixelPlex. That engagement is separate from this review.

Remediation plan: two blockers in phase 1, four findings in phase 2, five in phase 3

Business value

What Arqitech got from the review

  • Risk visibility

    12 findings,2 of them blockers

    Each is tied to a specific part of the contract, the test suite, or the build, with a place in the remediation plan.

  • Practice scorecard

    13 practice areasscored

    Authorization, validation, disclosure, and cryptography came back sound; the weak points sat at the integration layer.

  • Continued partnership

    Part of theMainNet swaps

    Weeks after the report, Arqitech brought PixelPlex into its live cross-chain swaps on Canton MainNet.

What the client says

Arqitech logo

“PixelPlex understood the DAML and Canton side of the project very quickly, including the specifics of our atomic-swap contracts. The audit was thorough, the findings were clear and practical, and the team was easy to work with throughout the process.”

Julian SchwartzChief Technology Officer, Arqitech, Inc.

Contact us

Have Daml contracts to review?

Get an independent review of your Daml contract logic and a plan for addressing what it turns up.

Message in LinkedIn

FAQ

Questions teams ask before an audit

The Arqitech review took about two weeks with a single reviewer, for a library of two Daml source files and a test package. The estimate follows the scope: we size it from the contract model and the test suite before quoting.

The authorization model, input validation, disclosure, cryptographic behavior, and the token-standard integration, plus the build pipeline and the documentation shipped with the code.

We find, classify, and verify. Remediation can be scoped separately or handled by your own developers, as it was here, and we re-review the result. We ask for a conformance test with every fix.

Yes. This assessment addressed a CIP-56 implementation; V2 work is scoped separately.

Meet us anywhere

USA, UK, Switzerland, UAE, Portugal, Japan.

The outline of Earth continents

USA

+1 646 490 0772

West 28th St. Suite 31

UK

+44 20 4538 8887

Kemp House, 124 City Road

Switzerland

+41 79 731-03-14

Zentrum zum Staldenbach 11, 8808

Portugal

+351 91 402 1121

Av. Duque de Loulé 12, 1050-093

UAE

+971 58 5788150

Dubai Silicon Oasis, DDP, Building A2

Japan

+81 90 7540-7726

Avex Building 2F