Smart Contracts : a new development paradigm


I am unfortunately old enough to have lived a number of paradigm shifts. In particular the shift from procedural to object-oriented programming and from monolithic to distributed to name a few.

I remember-in particular once looking at the architecture of a Corba project (Distributed objects) and realize to my great surprise that this object oriented technology had been used in a very conservative way. It was not at all taking advantage of the object paradigm, but just using this distribution framework as a regular Remote Procedure Call framework. It was not addressing directly the different object instances but rather rebuilding a layer in charge of dispatching calls to the requested objects.

Looking now at Ethereum I feel the same could happen. People may not realize that the Smart contract are changing deeply the way we will architect software: instead of being data driven code will become process driven with a much finer granularity. Alike object oriented programming which broke monoliths in small pieces, smart contracts will do the same for processing data.

Let’s take a concrete example: a bank will represent a portfolio in a database with a table having multiple columns for the various attributes. Processing a specific event on the portfolio like performing the life cycle of the instruments is currently implemented as a SQL Statement selecting the relevant data, followed by some processing transforming the data as needed. This first process will be then followed by others similar in nature. This computation is data driven : we select the data on which we want to apply the process.

Before Object Oriented programming, we were doing something similar at the model level: in the procedural approach all the different cases were merged into the same program which was handling all possible cases through batteries of switches. Object Oriented programming brought a much more granular approach: all specific cases were handled by specific objects making the code much more readable and easy to maintain. If this granularity was much better from a model point of view, the processes, often run in batches, even if running programs written in an object oriented way were still monolithic from a process point of view.

This is the process dimension that the smart contracts are addressing: those independent pieces of code are handling the life cycle of objects in a same granular way as the objects did for the data model years ago. Instead of grouping the processing of all transactions belonging to a portfolio, the smart contracts representing each portfolio line ie each transaction, will be running independently breaking down in pieces the monolithic approach we still have in writing batches.

This will have a major impact on how we implement processes: we will not scan data to find the relevant data which needs to be processed for a particular event, instead we will have autonomous small pieces of code implementing the process logic at the smallest possible granularity making these processes easier to understand and manage as object oriented simplified for ever the way we model software.



Beyond bitcoin

As seen in the previous post, the Bitcoin technology is expanding since a few years beyond bitcoin it self.

More coins to start with …

The first area of expansion has been in the crypto currency field : many other alternative currencies have been created such as Ripple, Litecoin to address specific needs like faster confirmations, lighter mining, … Those are still only currencies and there are hundreds of those mostly derived from bitcoin and litecoin, bitcoin being by far the one capturing the highest value. They differ mainly in terms of :

• Monetary policy
• Proof of Work / consensus mechanism

And then something more …

Then came up the idea of using the bitcoin network for other assets than currencies. For this have been created the meta coins like Colored coins (painting a coin to express that it represents something different of a bitcoin) and Master coins

As said by the bitcoin inventor Satoshi Nakamoto, the bitcoin infrastructure is able of transacting other assets than currencies. Historically, the first one has been the Namecoin to manage dns like domain names.Then this concept has been extended to a large range of contracts such as market transactions. This is what is called blockchain v2

And finally everything in the blockchain !

Starting from there, ideas are blooming to use this infrastructure for a number of other domains touching intellectual property, notary, electronic id and even government topics like votes. This is what is called blockchain v3

Blockchain v2

Blockchain V2.0 is aiming to handle contracts and not only currencies. The development in this area is rather recent starting mostly in 2014

The main idea is to use the blockchain infrastructure to store any kind of contract on any asset transacted directly between two parties. This is bringing a generalization of the concept and hurting directly a number of market actors which are providing trust to the two counterparts of a transaction (Exchanges, Clearers, Custodians, …) As listed the technology can be used in a number of fields like :

• Financial transactions
• Public records
• Private records
• Attestations
• Physical asset keys
• Intangable assets like patents, trademarks

Financial transaction are quite close to currencies, the goal is there to trade an other type of asset. For records and attestations the goal is a little different for example your insurance company, instead of sending you a letter to prove that you are insured will send you as a blockchain transaction a proof that you own a contract. This can be reuse to attest that you own the contract you pretend owning.

DAC are companies that operate in a decentralized manner like SETI@home does for years, distributing tasks automatically to lots of agents. Distributed applications like blockchain are a first step in this direction : different mining companies operate the same application contributing to the blockchain infrastructure and earning transaction fees for doing this work.

Get rid of the man in the middle!

People say sometimes that blockchain is going to kill banks. This is not so sure, in their core business which is managing risk, all these technologies will help banks to increase efficiency. Some businesses (the man in the middle) will disappear and banks will have to adapt to this new landscape but for example risk transformation they perform will remain.

Ripple is offering connectivity between participants for clearing transactions directly. This is avoiding, for smaller banks the cost of correspondent banks to access the market. Fidor is one example of such a customer.

Ripple is currently pushing the concept further developing a smart contract stored in the blockchain. A smart contract is based on a Specific Domain Language which describes the terms of the transaction. This language can then dynamically alter the contract if some events are triggered. For example if a date or a market level is reached.

Ethereum is developing a full Turing machine on the top of Blockchain. This allows to build smart contracts that will be run in a distributed way and as for miners, the companies running the contract scripts will be rewarded. First version of this platform has been released in July

Bitshares on top of a smart contract technology is building a decentralized asset exchange which is going to be live next month. This exchange also provides the collateral mechanisms securing the transactions among participants

Crowdfunding can also be impacted : funders could directly transact with the company they would like to fund. Swarm for example is bringing crowd funding on blockchain.

All these examples clearlly show the trend we are heading for : connect directly counterparts together, getting rid of the man in the middle.