Skip to main content

Marlowe

Get started with Marlowe

Marlowe is a domain-specific language (DSL) that enables users to create blockchain applications that are specifically designed for financial contracts.

If you want to learn Marlowe from the ground up, start with Marlowe Tutorial, or jump right into the Marlowe Playground:

Marlowe Playground

On the Cardano Forum, you can dicuss Marlowe or if you prefer Telegram, there is a special Marlowe Telegram Group.

The Marlowe platform

When compared to a Turing-complete language, the Marlowe DSL provides significantly greater security, certainty, guarantees of termination, and behavior correctness.

The design guarantees the following:

  • Contracts are finite. No recursion or loops.
  • Contracts will terminate. Timeout on all actions.
  • Contracts have a defined lifetime.
  • No assets retained on close.
  • Conservation of value.

Marlowe Playground

The Marlowe Playground is a plug-and-play smart contract builder and simulator that is simple to use, visual, and modular. Build, simulate, and analyze Marlowe contracts in this 4-minute tour of the Marlowe Playground.

Resources for Developing and Deploying Marlowe Contracts

How do I run my Marlowe contract on the Cardano blockchain?

  1. Design your contract using Marlowe Playground.
  2. Press the Send to Simulator button and then press Download as JSON to download your contract in JSON format.
  3. If you want to run your contract at the command line using marlowe-cli, install marlowe-cli and follow the instructions Running Contracts with Marlowe CLI. A video lecture playlist Marlowe CLI provides an overview of the marlowe-cli tool.
  4. If you want to run your contract in a Jupyter notebook, then use git to clone github.com/input-output-hk/marlowe-cardano, run nix develop --command jupyter-lab from the marlowe-cli/ folder, open the notebook Marlowe CLI Lecture 4, and follow the instructions. A video lecture Running a Marlowe Contract with Marlowe CLI demonstrates running a contract from within a Jupyter notebook.
  5. If you want to run your contract from the command-line using the Marlowe Runtime backend, then follow the tutorial for Marlowe Runtime. A video Marlowe Runtime Tutorial demonstrates its use.
  6. If you want to run your contract using Marlowe Lambda, follow the example for using Marlowe Lambda from the command line or study the example web application for Marlowe Lambda. Videos Marlowe Lambda at the Command Line and Marlowe Lambda in the Browser demonstrate the use of Marlowe Lambda.

Why can't I run my Marlowe contract on mainnet?

  • Marlowe's audit is not complete, so it is not advisable to run Marlowe contracts on mainnet.
  • However, a pull request enable Marlowe on mainnet modifies Marlowe tools for running on mainnet.

GitHub repositories

Developer Discussions

Specifications

Testing and debugging

Tools

  • Marlowe CLI: a command-line interface for running Marlowe contracts on the Cardano blockchain.
  • Marlowe Runtime: an application back-end for running Marlowe contracts on the Cardano blockchain.
  • Marlowe Lambda: an AWS Lambda client for Marlowe Runtime.

Examples

Videos

Presentations

Further Tutorials