Sunday, May 24, 2026

From Farms to Blockchains: Understanding Ledgers, Daml and Canton

I often see terms like blockchain, ledger, Daml, smart contracts, and imagine something highly abstract and technical. Now I want to explain using my favorite analogy - farming.

Imagine several farms:

  • Your farm
  • John's farm
  • Peter's farm
  • A dairy cooperative
  • A bank

They all do business with each other: selling cows, leasing land, financing equipment, making agreements.

Everyone needs to keep track of who owns what.
A traditional database is like a barn full of paper records.

Inside you can write things like:

  • John owns 5 cows
  • Peter sold 2 pigs
  • Mark leased a field
The barn stores information well. But the barn itself doesn't enforce rules. It doesn't know:
  • Can John sell the same cow twice?
  • Can Peter see Mark's private agreement?
  • What happens if two people try to sell the same cow at the same time?
  • Who is allowed to change records?
  • What happened first?
A database stores information, but business rules usually need to be enforced separately by applications and processes.

Daml 

This is where Daml enters.

Daml lets you describe the rules of the business:

To sell a cow:
  • the seller must own it
  • both parties must approve
  • after the sale, the previous owner no longer owns it
Daml defines the business rules and workflows that participants must follow.

Ledger

Think of the ledger as a farm manager. A manager who not only checks the rules but also maintains the official state of who owns what.

The manager checks:

  • Are the rules followed?
  • Is the cow really owned by the seller?
  • Has it already been sold?
  • Who can see this transaction?

So the system becomes:

Farmer - submits agreement
Daml - defines rules
Ledger - enforces rules, manager
Database - stores records

Blockchain

Now imagine there is no single manager. Instead, every farm keeps its own notebook.

When a cow is sold:

  1. You write: "I sold a cow to John."
  2. Other farms in the network verify:
    • Was the cow yours?
    • Does it exist?
    • Was it already sold?
  3. If everyone agrees, everyone updates their notebook.

That is essentially a blockchain.

Example: public blockchain (Bitcoin, Ethereum)

Anyone can join, think: "Any farmer in the world can keep a copy of the notebook." Thousands of participants maintain and validate the same system. Everyone sees everything.

Enterprise ledger (Daml + Canton)

Think of a private agricultural cooperative, only trusted members participate:

  • Bank A
  • Bank B
  • Exchange
  • Insurance company

Each participant can run their own machine, but random people on the internet cannot simply join.

And unlike public blockchains, not everyone sees everything. John only sees agreements involving John. Banks only see transactions they are allowed to see. Privacy is built into the model.

So far we have:

  • Blockchain - thousands of farmers sharing copies of the same notebook
  • Ledger - a system enforcing rules and maintaining records
  • Daml - the language defining the rules
  • Database - where the papers are stored

Every blockchain is a ledger.
Not every ledger is a blockchain.

Canton 

Canton Network is a distributed ledger network that shares some characteristics with blockchains, but works differently from Bitcoin or Ethereum. Instead of showing every transaction to everyone, it is built for privacy. Think of it as a "network of networks."

Only the people involved in a transaction can see its details. Other participants cannot. This is called a "need-to-know" model — you only see the information you actually need, not everything happening on the network.

Smart Contracts 

In Daml, business rules are implemented as smart contracts — digital agreements with built-in logic that automatically execute when conditions are met.

Think of it like farming:

Imagine a farmer, a grain buyer, and a transport company making a deal.

The agreement says:

  • the farmer delivers 100 tons of wheat,
  • the transport company confirms delivery,
  • the buyer sends payment.

With paper contracts, people have to check everything manually. With a Daml smart contract, the rules are already written into the system. Once delivery is confirmed, the contract can automatically move to the next permitted step, such as triggering the payment process.

The important difference is that not everyone sees the contract. Only the parties involved can access it.

Putting everything together:

  • Database stores records
  • Daml defines business rules
  • Smart contracts apply these rules automatically
  • Ledger validates and maintains the shared state
  • Blockchain is one way of running a ledger across many independent participants
  • Canton focuses on shared records with privacy and selective visibility between participants.

 

 

 

No comments:

Post a Comment