# Polkadot ISO 20022 Integration

**URL:** <https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483>\
**Category:** Ecosystem\
**Created:** [June 4, 2024, 3:36pm UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483 "2024-06-04T15:36:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pifragile](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/pifragile/32/5459_2.png) [@pifragile](https://forum.polkadot.network/u/pifragile)\
**Post date:** [June 4, 2024, 3:36pm UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483/1 "2024-06-04T15:36:39Z")

</div>

# Polkadot ISO 20022 Integration

In this post, we would like to present a proposal to integrate Polkadot with the ISO20022 financial messaging standard. We have already applied with the W3F Grants Program and the commitee suggested that this project would be a great fit for Decentralized Futures, so we are presenting it to the community here.

You can find the application for the W3F grant [here](https://github.com/w3f/Grants-Program/pull/2221).

## Project Overview

### Overview

ISO20022 is the future standard of financial transactions of all kinds including payments, foreign exchange and securities trading. Many blockchain ecosystems like [Ripple](https://ripple.com/), [Cardano](https://cardano.org/) and [Stellar](https://stellar.org/) claim to be ISO20022 compliant. In order to make Polkadot ISO20022 compatible as well, it is necessary to start designing how such an integration would look like in pratice, as it is not trivial to bridge the gap between a decentralized blockchain infrastructure and a messaging protocol designed to be used between trusted entities such as banks. Some [prior theoretical research](https://github.com/w3f/Grants-Program/blob/5c5aed8c22a812237deae5ceb19433688c87b8b4/applications/ISO20022.md) has been conducted and in this project we want to go a step further and build a practical Proof-Of-Concept for ISO20022 payments in Substrate. ISO20022 covers a vast amount of different messages for different financial transactions. In this project, we want to focus on customer-to-customer interbank payments evolving around the ISO20022 message [pain.001.001.11](https://developer.gs.com/docs/services/transaction-banking/pain001FedACHsample/)(CustomerCreditTransferInitiationV11).

### Market Research

We conducted a survey with 5 major swiss banks on the topic of the integration of an ISO20022 compatible blockchain and we found that there was a general interest mostly in ISO20022 compatible cryptocurrency transactions and cross-border payments. A majority of the banks stated a positive sentiment toward blockchain technology and indicated that they would be willing to invest or collaborate in a project revolving around an ISO20022 compatible blockchain.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/polkadot2/original/2X/9/927abf3173dccb70095cfabf23da222fba0e6eea.png)  
_Fig. 1: Screenshot of survey results_

### Project Details

The goal of this project will be to implement a fully functional minimal viable product (MVP) that lets banks settle payments on the Polkadot blockchain using the ISO20022 standard. We will focus on customer-to-customer interbank payments and payment reversals, ie. Customer C1 with a bank account at bank B1 sending an amount of DOT to customer C2 with an account at bank B2 using ISO20022 messages.

#### MVP Components

This MVP will consist of the following components:

##### 1. Substrate Pallet

The first component is a pallet that will be resopnsible for storing hashed ISO20022 messages and handeling interbank payment settlements as well as a payment reversal mechanism.

1. **Account management for banks:** Banks create an account and transfer some DOT to it.
2. **Transaction management:** Banks can submit a hashed (and salted) ISO20022 message along with the receiving bank account and DOT amount to the pallet in order to transfer a certain amount of DOT to the receiving bank.
3. **Payment reversal mechanism:** Banks will be able to revert payments in order to be compliant with ISO20022 messages such as pain.007.001.11 (CustomerPaymentReversalV11) or pacs.007.001.12 (FIToFIPaymentReversalV12).

##### 2. Java Client for Banks

In order for banks to use Polkadot as a payment settlement system, they will need to run a client which offers the following funcionality:

1. API to receive customer payment instructions
2. ISO20022 message parser/creator
3. Send extrinsics to pallet for transfer
4. Send extrinsic to pallet for reversal
5. Send/Read ISO messages to bus
6. Verify relevant ISO messages on chain
7. Client account management system
  - Create for each client an account number
  - Store for each client a list of hashes form the chain
  - Functionality to derive client balance from onchain hashes

8. Hashmap-like storage of all ISO messages and salts

##### 3. Interbank Message Bus

As the blockchain only stores hashes of the ISO 20022 messages in order to preserve privacy, we need some a communication system to exchange ISO20022 messages between banks.

#### Payment Flow

The below diagram describes the steps necessary to complete an ISO20022 payment using the Substrate pallet as the settlement system. Customer1 with a bank account at Bank1 is sending DOT to Customer2 with an account at bank Bank2. In this example we use two ISO20022 messages (for an example please see the appendix):

1. pain.001.001.11 (CustomerCreditTransferInitiationV11) for the customer to initiate the payment.
2. pacs.008.001.11 (FIToFICustomerCreditTransferV11) for the interbank transfer.

 ![Payment Flow](https://europe1.discourse-cdn.com/flex005/uploads/polkadot2/original/2X/5/503c075b212a491498eb4da4bddfc75f11d304f8.jpeg "Payment Flow")

#### Design Choices

1. We do not process ISO20022 messages onchain in order to preserve privacy.
2. We do not use offchain-workers for message processing also for privacy reasons.
3. We do not create customer accounts on chain, because they could easily be linked to a real person, again breaking privacy.
4. We do not use one centralized message processing institution, as we want to give each bank full access to their on-chain funds, at least guaranteeing decentralization on the interbank level.

## Team

### Team members

- Piero Guicciardi (Project Lead & Developer)
- Yannick Steitz (Marketing & Outreach)
- Christian Langenbacher (Advisor Implementation)

### Team’s experience

#### Piero

Piero has a Master’s degree in Computer Science from ETH Zürich and has been a core protocol developer for [Encointer](https://github.com/encointer) for the last two years, has recently become a member of the Polkadot Technical Fellowship and was granted a [W3F Grant](https://github.com/w3f/Grants-Program/pull/2123).

Below you can find a list of contributions by Piero:

##### W3F Grant Democratic Governance

- Application: [Democratic Governance by pifragile · Pull Request #2123 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/pull/2123)
- Submission: [Democratic Governance 1 Milestone 1 by pifragile · Pull Request #1101 · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/pull/1101)

##### Encointer core protocol:

- Design and implement faucet
  - [faucet tutorial by brenzi · Pull Request #14 · encointer/book · GitHub](https://github.com/encointer/book/pull/14)
  - [Faucet by pifragile · Pull Request #333 · encointer/encointer-node · GitHub](https://github.com/encointer/encointer-node/pull/333)
  - [Multiple faucets with whitelist and KSM deposit by pifragile · Pull Request #319 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/319)
  - [faucet benchmarks by pifragile · Pull Request #326 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/326)
  - [add faucet and reputation-commitments pallets by brenzi · Pull Request #193 · encointer/encointer-parachain · GitHub](https://github.com/encointer/encointer-parachain/pull/193)

- Design and implement democracy module
  - [Democracy - The Encointer Book](https://book.encointer.org/protocol-democracy.html)
  - [Democracy MVP by pifragile · Pull Request #273 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/273)

- Redesign participant attestations
  - [https://github.com/encointer/pallets/pull/231](https://github.com/encointer/pallets/pull/231)
  - [simplify submission of attestations. no need for signed claimOfAttendance · Issue #215 · encointer/pallets · GitHub](https://github.com/encointer/pallets/issues/215)

- Endorsement after registration
  - [https://github.com/encointer/pallets/pull/202](https://github.com/encointer/pallets/pull/202)

- Early reward payout
  - [early rewards by pifragile · Pull Request #233 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/233)

- Allow for upgrading registrations and unregistering
  - [Upgrade registrations and unregister by pifragile · Pull Request #254 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/254)

- Allow reputables to endorse
  - [Reputables can endorse by pifragile · Pull Request #268 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/268)

- Geohash location validation algorithm
  - [refactor `new_community` to reduce complexity to O(1) using geohash buckets by pifragile · Pull Request #55 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/55)

- Constant time random permutation for meetup assignment
  - [https://github.com/encointer/pallets/pull/68](https://github.com/encointer/pallets/pull/68)

##### Misc:

- Implement custom RPCs
  - [Aggregated account data by pifragile · Pull Request #196 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/196)

- Implement storage migrations for Weight V2
  - [https://github.com/encointer/pallets/pull/308](https://github.com/encointer/pallets/pull/308)

- Various polkadot/substrate dependency bumps
  - [Polkadot v0.9.37 by pifragile · Pull Request #299 · encointer/pallets · GitHub](https://github.com/encointer/pallets/pull/299)
  - [Polkadot v0.9.37 by pifragile · Pull Request #171 · encointer/encointer-parachain · GitHub](https://github.com/encointer/encointer-parachain/pull/171)

- Fee payment in Encointer community currency
  - [https://github.com/encointer/encointer-node/pull/194/files](https://github.com/encointer/encointer-node/pull/194/files)
  - [https://github.com/encointer/encointer-node/pull/226](https://github.com/encointer/encointer-node/pull/226)
  - [https://github.com/encointer/pallets/pull/190](https://github.com/encointer/pallets/pull/190)

- Integrate try runtime
  - [Add try-runtime with storage migrations of the encointer-pallets by pifragile · Pull Request #177 · encointer/encointer-parachain · GitHub](https://github.com/encointer/encointer-parachain/pull/177/files)
  - [Implement Try runtime by pifragile · Pull Request #312 · encointer/encointer-node · GitHub](https://github.com/encointer/encointer-node/pull/312/files)

##### Non rust contributions:

- Build an indexer using qubquery
  - [GitHub - encointer/subquery](https://github.com/encointer/subquery) (Main author)

- Build an accounting tool for encointer businesses
  - [GitHub - encointer/accounting-frontend: frontend for historical events on Encointer Network. statstics and monthly statements](https://github.com/encointer/accounting-frontend) (Main author)
  - [GitHub - SolidbitGmbH/encointer-accounting-backend](https://github.com/SolidbitGmbH/encointer-accounting-backend) (Main author)

- Build an integration for Encointer personhood in KILT
  - [GitHub - encointer/kilt-personhood](https://github.com/encointer/kilt-personhood) (Main author)

- Contributions to encointer js
  - [https://github.com/encointer/encointer-js/pull/78](https://github.com/encointer/encointer-js/pull/78)

#### Yannick Steitz

“The convergence of people, technology, and creativity represents a lasting synergy - this intersection is my sweet spot."

- Over six years of professional experience in cultural projects, design agencies, and digital start-ups.
- Most recently worked as Co-Founder/CEO and Project Manager at Ozelot Studios GmbH and VARY AG.
- In-depth understanding and hands-on experience in the fields of New Media, Mixed Reality, and Web3.

#### Christian Langenbacher

The project advisor Christian Langenbacher is the tech lead of [Encointer](https://github.com/encointer) and [Integritee](https://github.com/integritee-network).

### Team Code Repos

- [pifragile (Piero) · GitHub](https://github.com/pifragile)
- [SolidbitGmbH · GitHub](https://github.com/SolidbitGmbH)

Please also provide the GitHub accounts of all team members. If they contain no activity, references to projects hosted elsewhere or live are also fine.

- [pifragile (Piero) · GitHub](https://github.com/pifragile)
- [clangenb · GitHub](https://github.com/clangenb)

### Team LinkedIn Profiles

- [https://www.linkedin.com/in/piero-guicciardi-66b939152/](https://www.linkedin.com/in/piero-guicciardi-66b939152/)
- [https://www.linkedin.com/in/yannick-steitz-9b33a71a1/](https://www.linkedin.com/in/yannick-steitz-9b33a71a1/)
- [https://www.linkedin.com/in/christian-langenbacher-baa629182/](https://www.linkedin.com/in/christian-langenbacher-baa629182/)

## References

- [ISO 20022 Message Catalogue](https://www.iso20022.org/iso-20022-message-definitions?business-domain=1)
- [Nice website describing payment flows](https://www.iso20022payments.com/)
- [Book ISO20022 For Dummies](https://www.swift.com/campaign/iso-20022/iso-20022-dummies)
- [ISO20022 example messages](https://developer.gs.com/docs/services/transaction-banking/pain001sample/)

### Related Work in the Ecosystem

ISO20022 Research:

- [Grants-Program/applications/ISO20022.md at 5c5aed8c22a812237deae5ceb19433688c87b8b4 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/blob/5c5aed8c22a812237deae5ceb19433688c87b8b4/applications/ISO20022.md)
- [Grant-Milestone-Delivery/deliveries/ISO20022-milestone1.md at c2cfee2894ecbec1c015fae279c4a2e39dbcc96e · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/blob/c2cfee2894ecbec1c015fae279c4a2e39dbcc96e/deliveries/ISO20022-milestone1.md)

ISO8583 Research:

- [Grants-Program/applications/Integrating-ISO8583.md at 5c5aed8c22a812237deae5ceb19433688c87b8b4 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/blob/5c5aed8c22a812237deae5ceb19433688c87b8b4/applications/Integrating-ISO8583.md)
- [Grant-Milestone-Delivery/deliveries/ISO8583-milestone-1.md at c2cfee2894ecbec1c015fae279c4a2e39dbcc96e · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/blob/c2cfee2894ecbec1c015fae279c4a2e39dbcc96e/deliveries/ISO8583-milestone-1.md)

ISO8583 Implementation:

- [Re-open ISO-8583 RFP grant by dastansam · Pull Request #2184 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/pull/2184)
- [Add ISO-8553 PoC implementation by dastansam · Pull Request #1809 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/pull/1809)
- [Grants-Program/applications/ISO-8583-implementation.md at 5c5aed8c22a812237deae5ceb19433688c87b8b4 · w3f/Grants-Program · GitHub](https://github.com/w3f/Grants-Program/blob/5c5aed8c22a812237deae5ceb19433688c87b8b4/applications/ISO-8583-implementation.md)
- [Grant-Milestone-Delivery/deliveries/iso\_8583\_PoC\_milestone\_1.md at c2cfee2894ecbec1c015fae279c4a2e39dbcc96e · w3f/Grant-Milestone-Delivery · GitHub](https://github.com/w3f/Grant-Milestone-Delivery/blob/c2cfee2894ecbec1c015fae279c4a2e39dbcc96e/deliveries/iso_8583_PoC_milestone_1.md)

---

<div class="post-metadata">

**Author:** ![six](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/six/32/1639_2.png) [@six](https://forum.polkadot.network/u/six)\
**Post date:** [June 7, 2024, 11:26am UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483/2 "2024-06-07T11:26:45Z")

</div>

Greetings,

Having ISO20022 would surely support not just Polkadot itself, but some of the ecosystem teams such as G6 Networks that targets banks among its clients.

Looking at your tech specs, it seems decent. I only wonder how this project would work legally? What legal entity would the ISO auditors audit? Do you have a solution for this?

This sounds like a good start on the process to enter financial institutions. Good luck with your project!

---

<div class="post-metadata">

**Author:** ![Exquisitus](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/exquisitus/32/4263_2.png) [@Exquisitus](https://forum.polkadot.network/u/Exquisitus)\
**Post date:** [June 7, 2024, 2:06pm UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483/3 "2024-06-07T14:06:39Z")

</div>

Well, how interesting. ISO 20022 is actually the standard protocol (I used to work with it at N26) for clearing and settling SEPA transactions between banks and central clearing houses, like Bundesbank in Germany. Essentially, ISO 20022 involves processing large, complex XML files in hourly batches, transferred through Ebics (a precursor of FTP) which is how all European bank transfer transactions have been handled for decades, always under human supervision. That’s why bank settlements don’t occur on weekends.

Aside from that, a project like this is important and feasible, but the regulatory aspect poses a significant challenge. It’s very tough for a banking authority to allow a bank to detach from a clearing house and use on-chain logic to process ISO 20022 transactions in a peer-to-peer manner. I remember a few years ago, R3 attempted to create a consortium of banks to adopt blockchain technology for peer-to-peer settlements, but they failed. Fintech and banking are strictly regulated to the point of suffocation, especially after the Wirecard disaster.

---

<div class="post-metadata">

**Author:** ![pifragile](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/pifragile/32/5459_2.png) [@pifragile](https://forum.polkadot.network/u/pifragile)\
**Post date:** [June 8, 2024, 1:32pm UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483/4 "2024-06-08T13:32:52Z")

</div>

Hey,

Thanks a lot for your supportive comment and for your question, which is an important one. We currently focus on getting partner banks on board an building an MVP and that in this stage legal questions do not yet play too big of a role as we are still far away from a productive system. However, we are aware of the legal implications that will follow in later stages of this project and we are in the process of building a legal (advisory) team to help us answer those questions.

---

<div class="post-metadata">

**Author:** ![pifragile](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/pifragile/32/5459_2.png) [@pifragile](https://forum.polkadot.network/u/pifragile)\
**Post date:** [June 8, 2024, 1:36pm UTC](https://forum.polkadot.network/t/polkadot-iso-20022-integration/8483/5 "2024-06-08T13:36:45Z")

</div>

Hey, thank you very for your comment and sharing your thoughts and insights, this helps a lot!
