Create New SmartContract Programming Language with Go — New Project Motivation, Concept

zeroFruit
DE-labtory
Published in
2 min readJan 6, 2019

This post is about why we started to create new programming language for smart contract (with go).

Motivation

There are two well known blockchain these days, bitcoin and ethereum. and bitcoin has bitcoin script and ethereum has solidity for programming its own smart contract. Both have pros and cons:

In the case of bitcoin, it has no state concept and bitcoin script is basically low-level language and has little operation so the capability what it can do is restricted. On the other hand, because of its simplicity of how it works and for bitcoin has no state, we can easily do static analysis — how fast this script will run.

In the case of ethereum, it has state concept and solidity designed as high-level language, the solidity developer can program more intuitively, and ethereum smart contract can do a lot of things. (and yes this is also because ethereum has state) On the other hand, as it is designed as high-level language, developer can put infinite-loop by mistake on their smart contract which won’t finish forever and this can make bad effect on network. plus as ethereum has states it is difficulty to do static analysis.

koa concept

And we’re inspired by “Simplicity: A New Language for Blockchains” written by Russell O’Connor in 2017 and ivy-bitcoin project. Both are aim to high-level crypto-currency language. And “Simplicity” is focuses on functional language without states, loops which enables static analysis to calculate upper bound for computational resources needed easily.

So this is where “koa” lives. “koa” is high-level crypto-currency language. And no states, static analysis possible easily, more operations than bitcoin scripts.

Architecture

koa components

koa project is making new programming language so we need compiler and for compiling source code to byte code we need lexing and parsing. Finally byte code is executed on VM. And our team members are first to making compiler so we’ve read lots of book, blog posts and studied popular open source project’s source code like go-ethereum.

So this is it. This is our koa project concept: making new high-level smart contract programming language which enables static analysis easily. In the next post, we are going to deep dive into each component. You can view the WIP open source project from here.

--

--