---
title: "Mutation testing comes to DAML"
description: "Mewt, Trail of Bits' open-source mutation-testing engine, now supports DAML, the smart-contract language for Canton Network, adding controller party swap and controller party removal mutations that target authorization bugs."
url: "https://swe.quest/articles/mutation-testing-comes-to-daml-6aa877043950ef44"
canonical: "https://blog.trailofbits.com/2026/07/08/mutation-testing-comes-to-daml/"
source: "Trail of Bits"
published: "2026-07-08"
difficulty: "medium"
kind: "Release"
reading_minutes: 10
tags: ["testing","identity-auth","security","open-source"]
---

# Mutation testing comes to DAML

A post on [Trail of Bits](https://swe.quest/sources/trail-of-bits.md), published 2026-07-08, 10 min read, Release. Original: [https://blog.trailofbits.com/2026/07/08/mutation-testing-comes-to-daml/](https://blog.trailofbits.com/2026/07/08/mutation-testing-comes-to-daml/)

## Summary

Mewt, Trail of Bits' open-source mutation-testing engine, now supports DAML, the smart-contract language for Canton Network, adding controller party swap and controller party removal mutations that target authorization bugs. DAML's built-in coverage only reports whether choices were exercised, so a happy-path test can show 100% coverage while a mutant that drops the buyer from a payment's controller list still passes. Mewt parses DAML via the tree-sitter-haskell grammar with error recovery. On OpenZeppelin's canton-stablecoin it found seven survivors among the highest-priority mutants: four genuine missing tests and three equivalent or unreachable ones. Because each campaign runs the suite once per mutant, nightly or weekly cadence is recommended.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- unit testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))
- smart contract basics
- DAML templates and choices

## Keywords

Mewt, DAML, Canton Network, tree-sitter, mutation testing, canton-stablecoin, OpenZeppelin

## Related posts

- [LLMs Are the Key to Mutation Testing and Better Compliance](https://swe.quest/articles/llms-are-the-key-to-mutation-testing-and-better-compliance-3f8016e770f9b659.md): Meta Engineering · 2025-09-30 · Easy · 9 min read · Testing, LLMs, AI for coding, Privacy
  Meta's Automated Compliance Hardening (ACH) tool uses LLMs to make mutation testing practical at scale.
- [State divergence enables unauthorized access](https://swe.quest/articles/state-divergence-enables-unauthorized-access-436a19d8a315c057.md): Trail of Bits · 2026-08-25 · Medium · 6 min read · Vulnerability research, Identity & auth, Security, Go
  Provenance Blockchain's marker module let any account grant itself ACCESS\_ADMIN, mint and withdraw rights on non-fixed-supply markers.
- [ClickGap: Autonomous QA for ClickHouse](https://swe.quest/articles/clickgap-autonomous-qa-for-clickhouse-c4c38e14d8c1feef.md): ClickHouse · 2026-08-25 · Medium · 18 min read · AI agents, Testing, LLMs, CI/CD, Databases
  ClickGap is an autonomous QA agent that reviews every pull request merged into ClickHouse, writes and runs tests against real builds, bisects regressions, and files issues and test-only PRs without human sign-off.
- [On the Effectiveness of Mutational Grammar Fuzzing](https://swe.quest/articles/on-the-effectiveness-of-mutational-grammar-fuzzing-edf57a83d5fa06c9.md): Google Project Zero · 2026-03-05 · Hard · 9 min read · Vulnerability research, Testing
  Coverage-guided mutational grammar fuzzing has two weaknesses.
- [Revolutionizing software testing: Introducing LLM-powered bug catchers](https://swe.quest/articles/revolutionizing-software-testing-introducing-llm-powered-bug-catchers-b24e74e1ad8cbee7.md): Meta Engineering · 2025-02-05 · Easy · 4 min read · Testing, AI for coding, LLMs, Privacy
  Meta's Automated Compliance Hardening (ACH) combines LLM-based mutant generation with LLM-based test generation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
