Why Fintech Companies Use Haskell
Tags: haskell, scala, elixir, blockchain
Published: 2021-01-07 08:13:54

---
title: Why Fintech Companies Use Haskell
published: true
date: 2021-01-07 00:00:00 UTC
tags: haskell, scala, elixir, blockchain
canonical_url: https://serokell.io/blog/functional-programming-in-fintech
cover_image: https://serokell.io/files/x1/opengraph.x11f3vgh.thumbnail_(27).jpg
---

[Fintech](https://serokell.io/fintech-development) is one of the biggest and fastest-growing IT markets today.

It is an emerging industry that uses technology to compete with traditional financial methods in the delivery of financial services. Mobile banking, investing services, and cryptocurrency are all solutions that make financial services more accessible to the general public.

One significant trend that we have witnessed in fintech is the use of functional programming languages. In this blog post, we will delve deeper into the state of fintech right now, and how exactly functional programming can improve modern fintech products. In the end, we will list some companies that use FP in their trading, banking, or fintech infrastructures.

## Benefits of functional programming languages

![FP benefits](https://serokell.io/files/c0/c0ffgpjh.1_(34)_(1).jpg)

Banks, trading firms, and fintech projects use functional programming languages like Haskell because of the properties which imperative programming does not provide. Most of the big companies mention three main reasons:

1. Strong typing helps prevent errors in the code that could lead to problems somewhere down the path. For example, Barclays lists strong typing as one of the reasons for choosing Haskell for their derivative algorithms.
2. The code is more readable and maintainable, and as a result, it is easier to find bugs and reduce the risk of exploits.
3. Functional programming handles concurrency better, so these languages excel at complex tasks that involve parallel actions.

Let’s look at the most popular areas in fintech right now and how functional programming can help in their specific use cases.

## State of fintech

![State of fintech](https://serokell.io/files/xu/xus2we6i.2_(25)_(1).jpg)

Term “fintech” includes a massive amount of companies that work on a range of technologies and projects with different approaches.

Today, thousands of startups are working on unique technologies, some of which include KYC/ID with AI and telemetry, payment and lending protocols, and others. The field is a puzzle that consists of a huge amount of details.

Furthermore, all these small puzzle pieces are trying to be interoperable with each other in real-time. To achieve that speed of service, technologies that provide faster and more concurrent services need to be employed. Some of the functional programming technologies (for example, ones that support actor-like models) are well-suited for making this diverse ecosystem more effective.

To give an overarching view, here are some of the global trends that we see in the fintech market and FP technologies that can help them in their rise.

### AI, Big Data, IoT

The technologies mentioned above are the most demanded. They are used for the development and implementation of chatbots, virtual consultants and virtual advisories, voice recognition, process automation, predictive analysis (including credit scoring and fraud monitoring). The goal of using those technologies is personalization, transaction security, an increase in time management efficiency, and client behavior analysis.

FP can bring success to these fields. Scala is already widely used in big data for its superior concurrency and [Apache Spark](https://spark.apache.org/), while [Nerves](https://www.nerves-project.org/), an Elixir framework, [looks very promising](https://www.cognizantsoftvision.com/blog/year-of-elixir/) for IoT.

### Transaction processing and infrastructure

The number of card transactions grows by a CAGR of 13.6% annually, according to the [Global Payments 2019 report](https://image-src.bcg.com/Images/BCG-Global-Payments-2019-Tapping-into-Pockets-of-Growth-September-2019-rev_tcm9-231986.pdf). One reason for that is the integration of biometric analysis and contactless payments.

Functional programming languages allow for the building of stable infrastructures that are more reliable, fault-tolerant, and have fewer errors. In particular, Elixir is great for situations where you need to handle a lot of small interactions from a multitude of users.

### Credit and insurance technologies

Today, credits and insurance are issued not only by traditional banks but by smaller private companies and startups. There are tons of projects that provide P2P lending, and technologies in this field are developing very fast.

If you are a startup in the field of credit or insurance, you need to move fast. A well-built FP team will be able to iterate quickly and scale your product better, since the paradigm allows for better productivity and faster large-scale changes.

Read [our interview](https://serokell.io/blog/haskell-in-industry-riskbook) with a startup in the field of reinsurance, Riskbook, to learn more about the benefits of Haskell for rapidly changing fields.

### Blockchain and cryptoсurrencies

Businesses use blockchain technology as a fast and safe way of dealing, monitoring funds, making quick international payments, storing and sharing reports. A lot of banks unite under Ripple or HyperLedger partnership to exchange information between them. Blockchain can be used to store biometric data as well.

Functional programming (especially Haskell) is great for handling blockchains due to immutability, type safety, and the ability to manage distributed computation well. Haskell also enables one to build excellent domain-specific languages, such as [smart contract languages](https://serokell.io/blog/lorentz-implementing-smart-contract-edsl-in-haskell).

## Companies that use functional programming

### Fintech

#### Klarna

![Klarna](https://serokell.io/files/h3/h3lsmphu.3_(23)_(1).jpg)

The European payments startup [Klarna](https://www.klarna.com/) uses a wide variety of functional programming languages like Scala, Erlang, Clojure, and Haskell. The core of their services is in Erlang.

#### Digital Asset

Digital Asset is a fintech company that helps companies design and run the next generation of business applications, mainly with the help of [DAML](https://daml.com/), a smart contract language written in Scala. They have a multitude of languages on their GitHub, including Haskell and Scala.

You can read our interview with them [on our blog](https://serokell.io/blog/daml-interview).

#### Adjoint

![Adjoint](https://serokell.io/files/oh/ohjdw2pk.5_(13)_(1).jpg)

[Adjoint](https://www.adjoint.io/) digitises cash and settlement processes for multinational corporates. Right now, their main product is Adjoint Treasury, a real-time payments and settlement platform for corporate treasuries.

### Banking & trading

#### Barclays

[Barclays](https://www.barclays.co.uk/) has an embedded domain-specific functional language (FPF) written in Haskell to specify exotic equity derivatives. We have covered it in more detail in our [Haskell stories of success](https://serokell.io/blog/top-software-written-in-haskell).

#### Standard Chartered Bank

![Standard Chartered](https://serokell.io/files/6t/6tcpb57b.7_(10)_(1).jpg)

[Standard Chartered](https://www.sc.com/) uses their own strict dialect of Haskell called Mu, and has an insanely large codebase, featuring around half a million lines of Haskell code and 4.5 million lines of Mu code.

#### Tinkoff Bank

[Tinkoff](https://www.tinkoff.ru/eng/) uses Haskell for the backend of Tinkoff Travel Agency and Scala for the backend of Tinkoff Bank.

#### Jane Street

![Jane Street](https://serokell.io/files/gg/gguva6al.9_(4)_(1).jpg)

Jane Street uses OCaml for almost all the backend, from low-latency trading and market risk systems to tools for managing and monitoring infrastructure, workflow tools, and data analytics.

To learn more about the reasons for this choice, you can watch a detailed talk from their tech side: [Why OCaml](https://www.youtube.com/watch?v=v1CmGbOGb2I&feature=emb_title).

#### Morgan Stanley

Morgan Stanley uses Scala and is home to massive large-scale Scala projects. For more information on Scala at Morgan Stanley, you can check [this short video](https://vimeo.com/147697498).

### And many more

In addition, many other financial companies have used or use Haskell or other functional programming languages:

- JP Morgan
- BNB Paribas
- Merrill Lynch Bank of America
- Deutsche Bank
- ABN AMRO
- Credit Suisse Global
- Allston Trading

With a lot of heavyweight banks and startups doing functional programming, it seems to be a trend that won’t go away. Furthermore, fintech is becoming more complex and distributed every minute, with banks realizing that in the face of the COVID crisis, they are not digital enough. Functional programming, it seems, has the tools to solve the problems associated with that. Whether you are a fintech startup or a bank, perhaps it is time to start thinking about making a switch to a more future-proof technology.