Canton Architecture for Application Developers

Follow a business action through Canton, identify which components validate it, and understand where atomic settlement begins and ends.

Start with Daml, contracts and ledger state, and parties and permissions. This guide connects those concepts to the network that executes your application.

Roles and Trust Boundaries

Canton separates execution and storage from transaction coordination. Your application requests a business action; participant nodes execute and validate the Daml logic; a synchronizer coordinates their messages and the transaction outcome.

  • A party is an identity used by Daml authorization and visibility rules. An application account and a party are separate identities; your service must establish which party a signed-in user may represent.
  • A participant node hosts parties, runs Daml logic and maintains its view of contract state. Several parties can share a participant, and a party can be hosted on several participants. A participant handles readable data for the parties it hosts, so hosting is a trust decision.
  • A sequencer orders and distributes messages within a synchronizer. Transaction views are encrypted for their recipient participants; the sequencer handles encrypted payloads and routing metadata.
  • A mediator evaluates participant confirmations against the transaction's confirmation policy and issues an approval or rejection. Participants and mediators exchange these messages through the sequencer.

The synchronizer coordinates the result without executing your business rules on readable transaction payloads. Visibility still depends on your model: parties who see an action also see its consequences, and disclosures can reveal contract data. Review the complete action using the transaction disclosure guidance, alongside the protocol architecture.

From Request to Commit

Suppose Bank A agrees to buy 100 shares from Bank B for $10,000. Their Daml model defines the cash, securities and settlement action. Begin with both input contracts assigned to the same suitable synchronizer.

  1. Prepare the action. The application submits a command requesting settlement. The submitting participant executes the Daml code locally and constructs the proposed transaction, including the creates, exercises and other actions it requires. A failed authorization or contract assertion can stop preparation here.
  2. Construct and deliver views. The participant prepares encrypted transaction views for the relevant participants. The sequencer orders the request and distributes its messages to their recipients. The mediator receives the confirmation information it needs to coordinate the decision.
  3. Validate the proposal. Receiving participants validate their views. Checks include agreement with the Daml execution, required authorization, active input contracts and applicable time bounds. A contract already consumed by another transaction fails the active-input check.
  4. Determine the verdict. Confirming participants send responses through the sequencer. The mediator evaluates the confirmation policy, including the required thresholds when a party has several hosting participants. The policy must be satisfied within the decision window; receiving a view does not itself make a participant a required confirmer.
  5. Apply the result. The sequencer distributes the verdict. On approval, participants apply the relevant creates and archives to their ledger views. On rejection, they discard the proposed transaction's changes.

The transaction lifecycle describes these phases in detail. A submitted request is not evidence of a committed business action. Your service must establish the outcome before reporting success or deciding whether to retry; see safe retries.

Atomic Delivery Versus Payment

Delivery versus payment binds the securities transfer to its payment. In the trade above, the settlement choice can produce Bank A's securities and Bank B's cash in one Daml transaction, consuming the original inputs as the model requires. Either both legs commit or neither leg commits.

That property comes from putting both legs inside the same authorized transaction. Two independent submissions, one for cash and another for securities, create two separate outcomes. Your contract design must supply the authority to execute the combined exchange and check the agreed assets, amounts and recipients.

Atomicity covers the changes in that Daml transaction. A separate payment-provider call or database write needs its own integration and recovery design. The ledger model's DvP example shows how one settlement action contains both transfers; external side effects explains the application boundary.

Inputs on Different Synchronizers

A Daml transaction executes on one synchronizer, with all its input contracts assigned there. A common synchronizer must be suitable for those contracts: party hosting, confirmation permissions and package vetting constrain the choice. Vetting records which Daml packages a participant accepts for use. A network connection alone does not establish these conditions.

Consider a borrower and lender agreeing on a collateralized loan across applications. In this example, their Daml model represents both the lender's cash and the borrower's collateral as contracts. One authorized transaction transfers that cash to the borrower, locks the collateral and creates the loan agreement. Creating an agreement alone does not disburse cash. If the cash and collateral inputs start on different synchronizers, prepare them before that settlement.

  1. Select a suitable common synchronizer. Establish that the input contracts can be reassigned there with the required hosting, permissions and vetted packages.
  2. Reassign the inputs. For each contract that must move, unassignment makes it inactive on the source synchronizer. Assignment makes it usable on the target synchronizer. Between those steps, the contract is pending assignment and unavailable for transactions.
  3. Execute the settlement. After all inputs are ready on the common synchronizer, submit the transaction that transfers the cash, locks the collateral and creates the loan agreement. These changes commit together or are rejected together.

Canton's synchronizer router can select a suitable synchronizer and initiate reassignments; applications can also control them explicitly. Automation preserves the same boundary: unassignment and assignment are separate transactions, followed by the atomic business transaction. The reassignment protocol explains routing and requirements, while the cross-synchronizer DvP example follows cash and securities through the same preparation.

If assignment cannot complete, the input remains unavailable until the reassignment problem is resolved. If reassignment completes but settlement is rejected, that rejection does not undo the earlier reassignments. Track preparation and settlement separately, and assign responsibility for recovering pending assignments.

Apply the Model to Your Workflow

For one business action, identify the input contracts, required authority, resulting contracts and parties who see the action and its consequences. Mark which effects belong in one Daml transaction and which occur in application services. Then identify the assigned synchronizers and any preparation needed to bring the inputs together.

Check the loan example with one changed condition: collateral is unassigned, but assignment has not completed. The loan has not settled, the collateral is unavailable, and repeating the settlement request does not restore its source assignment. Your recovery process must resolve preparation before settlement can proceed.

Use enterprise integration planning to allocate these responsibilities, application security to review authority and failure paths, and your first Daml project to model and test a smaller workflow.