KTH/programmable-society

smart contract languages

monperrus opened this issue · 44 comments

Fe is a statically typed language for the Ethereum Virtual Machine (EVM). It is inspired by Python and Rust which makes it easy to learn -- especially for new developers entering the Ethereum ecosystem.
https://github.com/ethereum/fe

Yul (previously also called JULIA or IULIA) is an intermediate language that can be compiled to bytecode for different backends.
https://docs.soliditylang.org/en/latest/yul.html

And Yul+ https://fuellabs.medium.com/introducing-yul-a-new-low-level-language-for-ethereum-aa64ce89512f

Michelson smart-contract language, used in the Tezos blockchain
https://www.michelson.org/

Act: Smart contract specification language
https://github.com/ethereum/act

Contributor @MrChico may be located in STHLM

Cairo is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly.
https://www.cairo-lang.org/

Marlowe - a domain-specific language, it covers the world of financial contracts (Cardano)

Scilla - A Smart Contract Intermediate Level Language

BitML BitML smart contracts to Bitcoin transactions

DeCon, a declarative programming language for implementing smart contracts

Verifying Declarative Smart Contracts in DeCon
https://faculty.sist.shanghaitech.edu.cn/hxchen/papers/2024-icse-dcv.pdf

Teal: Algorand smart contracts are written in Transaction Execution Approval Language (TEAL). These contracts can be written directly or with Python using the PyTeal library.
https://developer.algorand.org/docs/get-details/dapps/avm/teal/

ink! is an embedded DSL eDSL to write smart contracts in Rust for blockchains built on the Substrate framework. ink! contracts are compiled to WebAssembly.

https://github.com/paritytech/ink

cc/ @Jacarte

Huff is a low level assembly language for the Ethereum Virtual Machine built in blazing-fast pure rust.
https://github.com/huff-language

Daml: A Smart Contract Language for Securely Automating Real-World Multi-Party Business Workflows

CSL language (Contract Specification Language): https://docs.deondigital.com/latest/csl/index.html

The Deon Runtime is a JVM library that implements the core functionality needed to work with CSL contracts and events https://docs.deondigital.com/latest/ledger-integrations/DeonRuntime.html

The Cadence Programming Language is a new high-level programming language intended for smart contract development.
https://developers.flow.com/cadence/language/index

sCrypt is a smart contract language for Bitcoin SV
https://scrypt.io/
https://scryptdoc.readthedocs.io/en/latest/

Glow is a domain-specific language for writing safe DApps (Decentralized Applications).
https://glow-lang.org/

Flint - a type-safe, contract-oriented programming language specifically designed for writing robust smart contracts on Ethereum

Formality - an efficient programming language featuring formal proofs

Lira - a declarative domain-specific language for defining simple yet highly complex financial contracts for EVM

Sway - a Rust-based Smart Contract Language

SmartPy a python-like smart contract language for Tezos, used by fxhash
https://smartpy.io/

Dissecting Smart Contract Languages: A Survey. (arXiv:2310.02799v1 [cs.CR])
http://arxiv.org/pdf/2310.02799

Table 5 contains the 36 surveyed languages
ADICO Babbage Bamboo Bitcoin Script BitML DAML E eWASM Fi Findel FirmoLang Flint Formality Functional-solidity IELE Ivy L4 Liquidity LLL Logikon Lolisa Michelson Obsidian Plutus Pyramid QSCL Rholang RIDE Scilla Serpent Simplicity Simvolio Solidity SolidityX Viper/Vyper Yul

Move is a programming language for writing safe smart contracts originally developed at Facebook

Now used in the Aptos framework, see https://github.com/aptos-labs/aptos-core 36% of Move

List from Legally Enforceable Smart-Contract Languages: A Systematic Literature Review. ACM Comput. Surv. 2022

Solidity Vyper Idris Flint Formality Pyramid Findel Michelson Plutus-Core Rholang Marlowe Pact Sophia Fift Ivy Typecoin Lolisa Bamboo Mutan Script Move Obsidian IELE Fi Scilla BitML Simplicity Liquidity F-Sol FSolidM BALZaC LLL Babbage RIDE DSL4SC SmaCoNat ADICO ErgoScript SPESC Reaction- RuleML Commit-RuleML DAML eSML BCRL QSCL

See Table 10 and Table 13

Plutus is the native smart contract language for Cardano. It is a Turing-complete language written in Haskell, and Plutus smart contracts are effectively Haskell programs

https://docs.cardano.org/smart-contracts/plutus/learn-about-plutus/

See also
Translation Certification for Smart Contracts (Plutus)

Juvix is a language for intent-centric and declarative contracts on the Anoma blockchain

infrastructure in Haskell

Agoric uses a secure subset of JavaScript to enable object capabilities and smart contracts.

Stellar’s native smart contracts platform is called Soroban
https://soroban.stellar.org/docs
The language to write a contract is Rust

Chialisp is a variant of Lisp for smart contracts on the Chia blockchain.
It is a pure and functional language with a focus on security and auditability.
https://chialisp.com/

It has been proposed to port it for Bitcoin, see https://delvingbitcoin.org/t/chia-lisp-for-bitcoiners/636

Aiken for Cardano

Aiken is a high-level language with a minimal set of features for programming the on-chain part, Similarly to Plutus Tx, Aiken is a functional language compiling to Plutus Core

https://cardanofoundation.org/blog/aiken-the-future-of-smart-contracts

SCIF
SCIF: A Language for Compositional Smart Contract Security
https://cecchetti.sites.cs.wisc.edu/papers/scif.pdf
https://github.com/Neroysq/SCIF