Skip to content

Commit 7291060

Browse files
authored
Merge pull request #172 from IntersectMBO/doc-session-13-Smart-Contracts-&-Languages
feat: Add Q1 2026 Working Group Session 13 documentation for Smart Co…
2 parents a0e7237 + 39675c9 commit 7291060

File tree

4 files changed

+226
-0
lines changed

4 files changed

+226
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "Session 13: Smart Contracts & Languages Recording"
3+
sidebar_label: Session
4+
sidebar_position: 1
5+
slug: /working-group/q1-2026/sessions/13-smart-contracts-languages/session
6+
---
7+
8+
# Session 13: Recording
9+
10+
## 🎥 Smart Contracts & Languages
11+
12+
<iframe
13+
src="https://www.youtube.com/embed/jG7-3ljcmP0"
14+
title="Session 13: Smart Contracts & Languages"
15+
width="100%"
16+
height="480"
17+
allow="autoplay"
18+
allowfullscreen
19+
style={{border: 0, borderRadius: '12px', boxShadow: '0 16px 40px rgba(1, 40, 170, 0.18)'}}
20+
/>
21+
22+
---
23+
24+
*This document is part of the Q1 2026 Developer Experience Working Group session "Deeper Dive: Smart Contracts & Languages".*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Session 13: Deeper Dive: Smart Contracts & Languages",
3+
"position": 13
4+
}
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
title: "Session 13: Deeper Dive: Smart Contracts & Languages"
3+
sidebar_label: Session Notes
4+
sidebar_position: 2
5+
slug: /working-group/q1-2026/sessions/13-smart-contracts-languages/session-notes
6+
---
7+
8+
# Session Notes: Smart Contracts & Languages
9+
10+
Welcome to Session 13 of the Q1 2026 Developer Experience Working Group. This session focuses on comparing various smart contract languages available in the Cardano ecosystem, providing insights into their features, learning curves, and production readiness.
11+
12+
---
13+
14+
15+
The Cardano ecosystem has evolved significantly since the introduction of Plutus (Haskell). Today, developers can write smart contracts (validators) in languages they already know—from Rust-like syntax to Python and TypeScript.
16+
17+
This session explores the primary languages available for building on Cardano, their underlying paradigms, and when to use each.
18+
19+
---
20+
21+
## The eUTXO Model & Smart Contracts
22+
23+
Before diving into languages, it is crucial to understand that Cardano smart contracts do not "run" applications like Ethereum's account model. Instead, they act as **validators** for the eUTXO (Extended Unspent Transaction Output) model.
24+
25+
A smart contract on Cardano simply answers one question: **"Is this transaction allowed to spend this UTXO or mint this token?"**
26+
The application logic happens off-chain (building the transaction), while the on-chain script only validates the result.
27+
28+
---
29+
30+
## 1. Aiken (Rust-like)
31+
32+
Aiken is currently the most popular and rapidly growing smart contract language in the Cardano ecosystem. It brings a modern developer experience inspired by Rust and Gleam.
33+
34+
* **Syntax Paradigm:** Rust / Gleam (Functional + Immutable)
35+
* **Primary Use Case:** High-performance DeFi, complex protocols, and teams transitioning from web/systems programming.
36+
37+
**Key Features:**
38+
* **Exceptional Developer Experience:** Comes with a built-in toolchain (`aiken build`, `aiken check`, `aiken fmt`) and an incredibly fast compiler.
39+
* **Type Safety:** Strongly typed with fantastic compiler error messages.
40+
* **Performance:** Generates highly optimized Untyped Plutus Core (UPLC), resulting in low execution costs (CPU/Memory).
41+
* **Testing:** First-class property-based testing and unit testing built directly into the language.
42+
43+
**When to choose Aiken:** If you want the most vibrant community support, excellent tooling, and the best performance-to-DX ratio.
44+
45+
---
46+
47+
## 2. OpShin (Python)
48+
49+
OpShin allows developers to write Cardano smart contracts in 100% valid Python. This massively lowers the barrier to entry for the world's largest developer community.
50+
51+
* **Syntax Paradigm:** Python
52+
* **Primary Use Case:** Rapid prototyping, data science integrations, and onboarding Python developers.
53+
54+
**Key Features:**
55+
* **Native Python:** OpShin is strictly valid Python 3. You can run and test your smart contracts using standard Python tooling (like `pytest` or `unittest`).
56+
* **Type Hinting:** Relies heavily on Python's type hinting (`typing` module) to ensure contracts compile safely down to Plutus Core.
57+
* **Accessibility:** Drastically reduces the learning curve for anyone already familiar with Python syntax.
58+
59+
**When to choose OpShin:** If your team originates from a Python/Data Science background, or if you need to rapidly prototype and test ideas using standard Python CI/CD pipelines.
60+
61+
---
62+
63+
## 3. Plu-ts & Helios (TypeScript / JavaScript-like)
64+
65+
For front-end and full-stack web developers, learning a completely new paradigm can be daunting. Languages like Plu-ts and Helios bridge the gap by bringing smart contracts to the TypeScript ecosystem.
66+
67+
### Plu-ts
68+
* **Syntax Paradigm:** TypeScript
69+
* **Overview:** Plu-ts is essentially equivalent to "React for Cardano Smart Contracts." It allows developers to write both off-chain transaction building code and on-chain validation code in the same language.
70+
* **Key Benefit:** Seamless integration with existing dApp frontends.
71+
72+
### Helios
73+
* **Syntax Paradigm:** JavaScript/TypeScript-like (Domain Specific)
74+
* **Overview:** Helios is a lightweight, heavily optimized smart contract language that compiles extremely quickly. It is designed to be embedded directly into JavaScript/TypeScript applications without needing a complex external toolchain.
75+
* **Key Benefit:** Zero-dependency compilation directly in the browser.
76+
77+
**When to choose TS/JS clones:** If you are building a dApp single-handedly and want a unified stack (Full TypeScript) for both frontend and on-chain logic.
78+
79+
---
80+
81+
## 4. PlutusTx & Plutarch (Haskell)
82+
83+
Haskell is the native language of Cardano. While it has a famously steep learning curve, it remains the standard for mathematical provability and high-assurance code.
84+
85+
### PlutusTx
86+
* **Overview:** The original framework by IOG. It compiles Haskell down to Plutus Core. It requires a robust understanding of functional programming concepts.
87+
* **Use Case:** "Gold standard" security for protocols that manage hundreds of millions of dollars.
88+
89+
### Plutarch
90+
* **Overview:** A typed eDSL (Embedded Domain Specific Language) in Haskell meant to replace PlutusTx. It produces significantly more optimized bytecode than PlutusTx.
91+
* **Use Case:** High-TVL DeFi protocols where every lovelace of execution fee matters, and the team already consists of expert Haskell engineers.
92+
93+
**When to choose Haskell:** If you are building foundational infrastructure, require formal verification, or have an existing team of Haskell veterans.
94+
95+
---
96+
97+
## 5. Marlowe (Domain Specific for Finance)
98+
99+
Marlowe is unique; it is not a general-purpose programming language. Instead, it is a Domain Specific Language (DSL) specifically designed for constructing financial contracts.
100+
101+
* **Syntax:** Block-based (like Scratch), TypeScript, or Haskell.
102+
* **Primary Use Case:** Escrows, loans, swaps, and traditional financial instruments.
103+
104+
**Key Features:**
105+
* **Safety by Design:** Marlowe contracts are guaranteed to eventually terminate and can be exhaustively analyzed before they are deployed. It is impossible to write an infinite loop.
106+
* **Visual Builder:** Non-programmers (lawyers, financial analysts) can build contracts using the Marlowe Playground visual editor.
107+
108+
**When to choose Marlowe:** If you are creating standard financial agreements (escrows, token swaps, vesting) and do not need the complexity of a Turing-complete language.
109+
110+
---
111+
112+
## Summary Matrix: Making a Decision
113+
114+
| Language / Tool | Base Syntax | Steepness of Learning Curve | Best For |
115+
|-----------------|-------------|-----------------------------|----------|
116+
| **PlutusTx** | Haskell | Very High | Foundational infrastructure, IOG standards |
117+
| **Plutarch** | Haskell | Extreme | Hyper-optimized DeFi protocols |
118+
| **Aiken** | Rust / Gleam| Medium | Overall Best DX, general dApp development |
119+
| **OpShin** | Python | Low | Python devs, rapid prototyping |
120+
| **Plu-ts** | TypeScript | Low | Full-stack JS devs, unified codebase |
121+
| **Helios** | Custom JS | Low | Integrated web apps, fast compilation |
122+
| **Marlowe** | Visual / TS | Very Low | Financial contracts, escrows, simple logic |
123+
124+
---
125+
126+
# Compiling Smart Contracts to Plutus (UPLC)
127+
128+
This guide covers how to compile smart contracts written in various Cardano languages to **Untyped Plutus Core (UPLC)**, the low-level execution format used by the Cardano blockchain.
129+
130+
## 🎯 Overview
131+
132+
All Cardano smart contract languages compile to the same target: **UPLC** (Untyped Plutus Core). This ensures:
133+
- **Consistent execution** across all languages
134+
- **Interoperability** between contracts written in different languages
135+
- **Unified fee structure** and resource limits
136+
- **Same security guarantees** from the Plutus Virtual Machine
137+
138+
## 📋 Compilation Documentation
139+
140+
For detailed instructions on how to compile smart contracts in each language, please refer to their official documentation:
141+
142+
* **Aiken**: [Aiken Language Guide - Modules](https://aiken-lang.org/language-guide/modules)
143+
* **OpShin**: [OpShin Compilation Documentation](https://opshin.opshin.dev/docs/compilation)
144+
* **Plinth (Plutus Tx)**: [Plutus Tx Explanations](https://plutus.readthedocs.io/en/latest/explanations/plutus-tx.html)
145+
* **Helios**: [Helios Language Guide](https://www.hyperion-bt.org/helios-book/)
146+
* **Plutarch**: [Plutarch Guide](https://github.com/Plutonomicon/plutarch-plutus)
147+
* **Plu-ts**: [Plu-ts Documentation](https://pluts.harmoniclabs.tech/docs/intro)
148+
* **Scalus**: [Scalus Documentation](https://github.com/nau/scalus)
149+
* **Marlowe**: [Marlowe Documentation](https://docs.marlowe.iohk.io/docs/introduction)
150+
151+
All languages output to similar formats, typically `contract.uplc` (raw UPLC text), or `contract.json` (Plutus script JSON format).
152+
153+
## 🧪 Testing Compiled Contracts
154+
155+
You can test compiled contracts using the Cardano CLI to calculate script hashes and build transactions. Refer to the [Cardano Developer Portal](https://developers.cardano.org/) for detailed tutorials on how to interact with smart contracts on-chain.
156+
157+
## � Comparison Table
158+
159+
| Feature | Plinth | Aiken | OpShin | Helios | Plutarch | Plu-ts | Scalus | Marlowe |
160+
|---------|--------|--------|--------|--------|----------|---------|---------|---------|
161+
| **Type Safety** | ★★★★★ | ★★★★☆ | ★★★☆☆ | ★★★☆☆ | ★★★★★ | ★★★★☆ | ★★★★★ | ★★★★★ |
162+
| **Developer Experience** | ★★☆☆☆ | ★★★★★ | ★★★★☆ | ★★★★☆ | ★★☆☆☆ | ★★★★☆ | ★★★☆☆ | ★★★★★ |
163+
| **Performance** | ★★★★☆ | ★★★★☆ | ★★★☆☆ | ★★★☆☆ | ★★★★★ | ★★★☆☆ | ★★★★☆ | ★★★★☆ |
164+
| **Learning Curve** | ★☆☆☆☆ | ★★★☆☆ | ★★★★☆ | ★★★☆☆ | ★☆☆☆☆ | ★★★☆☆ | ★★☆☆☆ | ★★★★★ |
165+
| **Ecosystem Support** | ★★★★★ | ★★★★☆ | ★★★☆☆ | ★★★☆☆ | ★★★☆☆ | ★★☆☆☆ | ★★☆☆☆ | ★★★★☆ |
166+
| **Documentation** | ★★★☆☆ | ★★★★★ | ★★★★☆ | ★★★☆☆ | ★★☆☆☆ | ★★☆☆☆ | ★★☆☆☆ | ★★★★☆ |
167+
| **Production Readiness** | ★★★★★ | ★★★★★ | ★★★★☆ | ★★★★☆ | ★★★★☆ | ★★★☆☆ | ★★☆☆☆ | ★★★★★ |
168+
169+
## �📚 Additional Resources
170+
171+
### General Resources
172+
- [Cardano Developer Portal](https://developers.cardano.org/)
173+
- [Plutus Pioneer Program](https://github.com/input-output-hk/plutus-pioneer-program)
174+
- [Essential Cardano](https://www.essentialcardano.io/)
175+
176+
### Language-Specific Resources
177+
- **Plinth**: [Official IOG Documentation](https://plutus.readthedocs.io/)
178+
- **Aiken**: [Official Aiken Guide](https://aiken-lang.org/)
179+
- **OpShin**: [OpShin Documentation](https://opshin.opshin.dev/)
180+
- **Helios**: [Helios Language Guide](https://www.hyperion-bt.org/helios-book/)
181+
- **Plutarch**: [Plutarch Guide](https://github.com/Plutonomicon/plutarch-plutus)
182+
- **Aiken Compilation**: [aiken-lang.org/language-guide/modules](https://aiken-lang.org/language-guide/modules)
183+
- **OpShin Compilation**: [opshin.opshin.dev/docs/compilation](https://opshin.opshin.dev/docs/)
184+
- **Plutus Compilation**: [plutus.readthedocs.io/en/latest/explanations/plutus-tx.html](https://plutus.readthedocs.io/en/latest/)
185+
- **UPLC Specification**: [plutus.readthedocs.io/en/latest/reference/plutus-core-spec.html](https://plutus.readthedocs.io/en/latest/)
186+
187+
---
188+
189+
*This document is part of the Q1 2026 Developer Experience Working Group session "Deeper Dive: Smart Contracts & Languages".*

website/docs/working-group/sessions/q1-2026/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The Developer Experience (DevEx) Working Group continues to support and empower
2424
| **10** | **Hands-On #3 (Intermediate)** | Wallet integration fundamentals | Workshop |
2525
| **11** | **Open Source & Documentation** | Writing docs, repo improvement, issue management | Contribution guide |
2626
| **12** | **Ecosystem Wrap-Up & Year-End Reflections** | 2025 highlights, 2026 planning, and motivational close | Reflection & planning |
27+
| **13** | **Deeper Dive: Smart Contracts & Languages** | Exploring Plinth, Aiken, OpShin, and more | Deep dive |
2728

2829
## Session Details
2930

@@ -75,6 +76,14 @@ The Developer Experience (DevEx) Working Group continues to support and empower
7576
- Community building and continued engagement
7677
- **Deliverable**: 2026 engagement plan
7778

79+
### Session 13: Deeper Dive: Smart Contracts & Languages
80+
- **Objective**: Compare and contrast Cardano smart contract languages
81+
- **Key Topics**:
82+
- Type Safety and Developer Experience
83+
- Performance and Learning Curve
84+
- Ecosystem Support and Production Readiness
85+
- **Deliverable**: Knowledge of Plinth, Aiken, OpShin, Helios, Plutarch, and others
86+
7887
## Working Group Information
7988
For operational details, roles, repository structure, and participation guidelines, please see the [Working Group Overview](../../readme.md).
8089

0 commit comments

Comments
 (0)