Marlowe is a small language, with a handful of constructs that, for each contract, describe behavior involving a fixed, finite set of roles.
- A running contract can make a payment to a role or to a public key.
- In a complementary way, a contract can wait for an action by one of the roles, such as a deposit of currency, or a choice from a set of options. Crucially, a contract cannot wait indefinitely: if no action has been initiated by a given time (the timeout ), then the contract will continue with another behavior, such as refunding any funds in the contract.
- Depending on the current state of a contract, it may make a choice between two future courses of action, which are themselves contracts.
- When no more actions are required, the contract will close, and any remaining currency in the contract will be refunded.
When a contract is run, the roles it involves are fulfilled by participants , which are identities on the blockchain. This model allows a role to be transferred during contract execution, so that roles in a running contract can be traded . Each role is represented by a token on the chain, and transferring this transfers the ability to perform the role’s actions. Taking this further, we can represent a single role with multiple tokens, thus allowing the role to be shared: this could be termed being ‘securitized’.
Read more about the Marlowe system, the playground, oracles, Actus smart contracts in this article:
Dive into Marlowe research papers here: