Programming Model Comparison
State Model: Mutable vs. Immutable
Solidity: Mutable State
In Solidity, contracts have mutable storage that you modify directly:Daml: Immutable Contracts
In Daml, contracts are immutable data. State changes create new contracts or archive existing contracts:UTXO vs. Account Model
Ethereum: Account Model
- State is a global mapping of accounts to balances
- Transfers modify account entries
- Easy to query total balance
- Contention on popular accounts
Canton: Extended UTXO Model
- State is a set of contracts (like unspent outputs)
- Transfers archive existing contracts, create new ones
- Balance is sum of owned contracts
- Better parallelism, explicit data flow
Language Comparison
Type System
Solidity Types
Daml Types
Solidity Control Flow
Daml Control Flow
Authorization Model
Solidity: Runtime Authorization
- Authorization checked at runtime
- Easy to forget checks
- Anyone can attempt the call
- Authorization mixed with logic
Daml: Declarative Authorization
- Authorization declared, not coded
- Impossible to forget (compiler enforces)
- Only authorized parties can attempt
- Clear separation of concerns
Multi-Party Coordination
Solidity: Manual Multi-Sig
Daml: Native Multi-Party
Common Patterns Translated
What to Unlearn
Next Steps
Network Architecture
Compare network architecture and topology.
Module 3: Daml
Start writing Daml smart contracts.