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.



Internal use of Blockchain ?

Bank Netzwerk

It has been mentioned already by some banks like UBS that they were considering Blockchain technology also for their internal use. Mizuho also announced following this approach a few days ago.

This may be strange but it has to be known that large banks operate as a vast network of more or less separate legal entities. As the financial products got more and more complex and as banks have been trying to rationalize their setups, they have tried to centralize product and risk management in few centers around the globe. But they have still to book the trades with the customers locally because a customer may not wish to transact overseas. Therefore they massively replicate trades between their internal entities.

Replicating trades is not straightforward : it does not mean only to copy the trade details, it also means to have the same interpretation of the trades and have the same life cycle for the original trade and its copy.
To ensure this, banks have attempted to share systems (frontoffice, backoffice, sometimes accounting) among geographies in order to not replicate business logic. Nevertheless data is replicated which means that it has to be reconciled…and this all along the trade’s life.

Indeed sharing a global ledger internally between the sometimes 100+ entities could bring a lot savings. Having the same trade representation and life cycle among the different entities which are selling products and managing products will simplify greatly the trade management.

Blockchain technology will develop by steps : it cannot replace a full ecosystem built over decades overnight. Therefore it will start in areas where there is less existing systems. For sure, using this technology internally is much easier to decide than trying to convince a whole industry to migrate to a complete new system. Banks proceeding that way will gradually increase their expertise and knowledge and will be ready sonner to propose this kind of service to their customers

Blockchain deploiement

A very promising technology

As mentioned already a few times here, Blockchain is a very promising technology in particular for financial services. In a recent study the consulting firm Oliver Wyman suggests that using Blockchain, banks could save per year by 2020 between 15-20B$ in infrastructure costs.

In the recent finnovasia meeting Stephens from UBS confirmed that blockchain will bring a real disruption

But some limitation factors

This will not be achieved without using the technology at its full scale: the less native is the implementation, the more effort will be needed to ensure consistency with the existing systems. But there are some factors limiting the full adoption: some ecosystems are pretty complex. Securities for example, involves a lot of actors working together (clearer, exchanges, custodians, brokers, …) which means that a full native implementation requires an agreement among all these actors on one standard.
Those ecosystems have been incrementally built over decades if not centuries. As described in a previous post, banks will need to define an integration strategy to gradually expand the blockchain grip.

Not a global deployment but some starting points identified

If a global deployment of such disruptive technology is quite unlikely (also due to the blooming technology offerings), in the finnovasia session about blockchain, as reported by Coindesk some starting points have been identified :

Stephens for UBS said that blockchain will replace several hundred of internal ledgers.
Alex Edana form WIP Solutions CEO said : “Australia will be the first market on the blockchain in three to five years,” he said. “There, you only have [a small number of] banks and a couple exchanges.”

This reinforcing the idea that the smaller, the easier. Small eco systems like Australia with less legacy will adopt blockchain faster.

It also shows that there is a benefit for large organizations to adopt such a technology internally in order to rationalize their internal processes. Remember that large organization do a lot of trades internally in particular between sales and trading center. Those trades are booked in each branch and need to be reconciled all time.

Hype curve ?

Hype curve @Wikipedia

This phenomenon in technology adoption is very well known. Blockchain will make no exception: the hype will grow and as first implementations will be partial, returns will be disappointing and hype will drop massively. Then little by little the small scale projects will demonstrate returns and will grow incrementally.

“Rome was not built in one day”

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.