Skip to content

Commit

Permalink
ISO20022 PoC (#1940)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Müller <[email protected]>
Co-authored-by: S E R A Y A <[email protected]>
Co-authored-by: Keegan | W3F <[email protected]>
Co-authored-by: OpenSmartContract <>
  • Loading branch information
4 people authored Sep 12, 2023
1 parent 82e8fe3 commit 376e6e4
Showing 1 changed file with 171 additions and 0 deletions.
171 changes: 171 additions & 0 deletions applications/ISO20022.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# ISO20022 PoC

- **Team Name:** Open Smart Contract
- **Payment Address:** 3GTe5ArJLC8jesr6UFtB9kcoguQmvo8Cuo (BTC)
- **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 2


## Project Overview

Response to [RFP 20022](https://github.com/w3f/Grants-Program/blob/master/docs/RFPs/Open/ISO_20022.md)

Cross-border payment example as proof of concepts, leveraging the unique [Off-Chain Features of Substrate](https://docs.substrate.io/v3/concepts/off-chain-features/) that show the advantages of using [ISO20022](https://www.iso20022.org/) together with Substrate.

### Overview
The project is an [ISO20022](https://www.iso20022.org/) based cross-border payment proof of concepts implemented with Substrate off-chain computation and indexed data storage.

ISO (International Organization for Standardization) 20022 is becoming the de facto global data standard for payments and electronic data interchange already adopted by many countries. However the ISO20022 are all about centralized fiat based payment rails among privileged global financial institutions.

Blockchain based decentralized payment solutions can provide efficiency, low latency and cost savings potentially benefiting billions of users worldwide. There are ledger based currency exchange and remittance network such as the real-time gross settlement system from Ripple Labs Inc. yet it is permissioned, centralized and not capable of cross chains.

Polkadot, with its multi-chain architecture, security and cross chain interoperability, is uniquely positioned to support ISO20022 compliant global payments. This project is a Proof of Concepts to understand what it takes for Dotsama ecosystem to support a cross-border payment use case, leveraging on XCM, OCW and Substrate pallets, challenges and recommendations.


### Project Details

- Mockups/designs of any UI components
- Use Contracts-UI (or Polkadot.js) UI interface to interact with deployed smart contracts

- Data models / API specifications of the core functionality
- ISO20022 XML data models that captures essential ISO20022 cross-border payment metadata
- ISO20022 data types to XCM mappings with custom data types if gaps
- Data securely stored off chain, indexed for queries
- ISO20022 messaging and payment events and stats
- Persisted off chain data storeage fo performance benchmarks, throughput, gas fees, binary size, payment latency and costs

- An overview of the technology stack to be used
- Substrate off chain workers to process compute intensive tasks such as ISO20022 message wrangling
- Substrate off chain storage / indecing to persist string heavy ISO20022 messages
- ISO20022 messages parsing / mapping / processing using OCWs
- Substrate XCM frame pallet with transport methods for ISO20020 messaging
- Custom OCWs to support cross-border payment use case with message, events, stats and payment flow query capabilities
- Optional off chain connected cloud storage and HTTP requests
- Documentation of core components, protocols, architecture, etc. to be deployed
- Published article documenting detailed analysis of what it takes to support ISO20022 compliant cross-border payments on Dotsama blockchains
- Custom pallet(s) implementing cross-border payment logic
- Off chain worker logic processing compute and storage intensive payment processings
- Mapping from cross-border ISO20022 messages to XCM and XCMP messaging
- ISO20022 messages, payment history, events and stats, stored off chian with indexes for queries
- Gaps identified and solution recommendations
- Substrate based Dotsama blockchain as testnet to deploy sandbox
- PoC/MVP or other relevant prior work or research on the topic
- Our research shows that many challenges exist to support ISO20022 compliant cross border payment use case
- A traditional ISO20022 cross border payment means multiple transactions in various ISO20022 message types, with multiple hops among financial entities inter-connected via custom agreements / fee structures / sfovereign regulations, with no standards
- ISO20022 and XCM are at different granularies with a single cross-border payment mapping to a set of XCM messages with flow logic
- ISO20022 payment transactions have different fees / charges based on many factors
- Traditional cross-border payments on fiat rails do not have blockchain "gas fee" concept
- Data type incompatibilities between IS20022 and XCM, such as date and time, currency, float, array, etc.
- No out of box support of XML data processing and mapping such as XSD transformations
- No native foreign exchange / currency conversion support
- XCVM with instruction set for XCMP messaging is a totally different paradigm as compared to traditional message passing
- No existing gas light solution to handle compute intensive and indexable data storage for off chain payment processing
- What your project is _not_ or will _not_ provide or implement
- This is not a complete cross border payment system given the scope of proof of concepts
- Likely this is the first ISO20022 project on Dotsama, there could be unexpected gaps discovered
- This project is not a full blown IS20022 implementation on Dotsama / Substrate but explore to expose gaps for future endeavors
- This project is not about payment identity / KYC / AML solutions
- This milestone is all about understanding what it takes to support ISO20022 compliant cross-border payments on Dotsama, not implementations which could come later with more clarity coming out of this project

### Ecosystem Fit

- Where and how does your project fit into the ecosystem?
- According to the RDP: "The goal of this RFP is to find teams that implement tools that make it easy and possible for the traditional finance industry to leverage Substrate and ink! smart contracts to interact with ISO 20022 in various ways"
- Who is your target audience (parachain/dapp/wallet/UI developers, designers, your own user base, some dapp's userbase, yourself)?
- Targeting ecosystem developers to leverage on the learning and tools to further develop ISO20022 compatible dApps, to make it possible for transitional financial institutions to interoperate with Polkadot / Kusama / Substrate blockchains based payment apps.
- What need(s) does your project meet?
- Explore possibilities and gaps of Polkadot / Substrate support of ISO20022 standard for future improvements
- Are there any other projects similar to yours in the Substrate / Polkadot / Kusama ecosystem?
- If so, how is your project different?
- If not, are there similar projects in related ecosystems? There are known blockchains already claim to support ISO20020 such as Ripple XRP, XLM, Algorand, etc.

## Team

### Team members

- Name of team leader: Daniel Deng
- Consultants with ISO20022 and cross-border domain expertise

### Contact

- **Contact Name:** Daniel Deng
- **Contact Email:** [email protected]

### Legal Structure

- **Registered Address:** No registred entity
- **Registered Legal Entity:** No registred entity

### Team's experience

Daniel is the Chief Product Officer at HeroDAO where he has led blockchain based smart contract products and development on Polkodot / Kusama blockchains. Previously at Meta he managed crypto (Libra / Diem) and fiat payments and web3 initiatives. Prior to that, he was Senior Director of Product Management at Visa managing Visa's global payment product portfolios and platforms.

The project to add consultants from fintech / banks / financial institutions with relevant domain expertise in ISO20022 and cross-border payments.

Here's a recent [Medium article](https://medium.com/@opensmartcontract/learn-ink-by-example-order-food-on-blockchain-a4024b2dee4a) on ink! smart contract with Rust macros implementing dApp on Dotsama chain, with [Smart Contract Deployment and Interaction Guide using Contracts-UI and Polkadot.js](https://github.com/InkSmartContract/BlockchainFoodOrder/blob/main/BlockchainFoodOrder%20Smart%20Contract%20Deployment%20and%20Interactions%20Guide.pdf).

### Team Code Repos
- [Order Food on the Blockchain](https://github.com/InkSmartContract/BlockchainFoodOrder)

Please also provide the GitHub accounts of all team members.
- [GitHub1](https://github.com/OpenSmartContract)
- [Github2](https://github.com/FPLeader)

### Team LinkedIn Profiles (if available)
- [Profile](https://www.linkedin.com/in/dengdaniel)

## Development Status

- [Blockchain Food Order dApp](https://github.com/InkSmartContract/BlockchainFoodOrder/blob/main/Learn%20ink!%20by%20Example%20%E2%80%94%20Order%20Food%20on%20the%20Blockchain.pdf)
- [Smart Contract Deployment and Interaction Guide using Contracts-UI and Polkadot.js](https://github.com/InkSmartContract/BlockchainFoodOrder/blob/main/BlockchainFoodOrder%20Smart%20Contract%20Deployment%20and%20Interactions%20Guide.pdf)

## Development Roadmap

### Overview

- **Estimated duration:** ~1-2 months
- **FTE:** 1,2
- **Costs:** 25K USD

### Milestone 1

- **Estimated duration:** ~1-2 months
- **FTE:** 1,2
- **Costs:** 25K USD

| Number | Deliverable | Specification |
| -----: | ----------- | ------------- |
| **0a.** | License | Apache 2.0 |
| **0b.** | Documentation | Design documents with details on what it takes for Polkadot/Substrate to support ISO20022 messages, gaps and solution recommendations |
| 1. | Design the use case | Design an ISO20022 cross border payment use case with persona, end-to-end flow |
| 2. | Identify ISO20022 message types and examples for X-border payment | Specify all ISO20022 message types with examples for cross border payment, including reference data fields |
| 3. | Map ISO20022 <> XCM messages | Map ISO20022 cross-border payment message types to a set of XCM messages with processing logic, including identifying data type incompatibilities between IS20022 and XCM, replacement data types and necessary XML transformations |
| 4. | Map ISO20022 <> XCMP | Map ISO20022 cross-border payment messageing to XCMP for cross parachains transport|
| 5. | Specify off chain data storage | Specify off chain data structure, storage and indexes for ISO20022 messages, payments, events, stats|
| 6. | Specify off chian worker logic | Specify OCW logic for ISO20022 message processing, payment flow, error handling|
| 7. | Specify Substrate pallets | Specify custom pallet(s) to implement X-border payments and OCW integrations|
| 8. | Recommend blockchain gas fees handling in ISO20022 framework | Recommend solution how to fulfill blockchain gas fees in ISO20022 framework |
| 8. | Recommend how to implement ISO20022 cross-border charges & fees | Recommend solution how to implement ISO20022 cross-border payment inter-bank / X-border payment charges and fees |
| 9. | Specify query of ISO20022 messages and transactions | Specify query interface to retrieve selected ISO20022 messages and transactions|
| 10. | Publication to share with the broader community and get additional feedback | Medium article covering: 1) feasibility and comparative advantages of Substrate based ISO20022 compliant cross-border payments on Dotsama chain; 2) benefits of such a solution in contrast to traditional centralized cross-border payments; 3) recommendation of future works towards a scalable, performant and cost effective solution supporting ISO20022 on Polkadot/Kusama chains and beyond. |

## Future Plans

- Publish learning and share with the community, similar to this [ Medium article](https://medium.com/@opensmartcontract/learn-ink-by-example-order-food-on-blockchain-a4024b2dee4a) and/or [Contracts-UI and Polkadot.js Smart Contract Deployment and Interaction Guide](https://github.com/InkSmartContract/BlockchainFoodOrder/blob/main/BlockchainFoodOrder%20Smart%20Contract%20Deployment%20and%20Interactions%20Guide.pdf)
- Long term we intend to expand this ISO20022 PoC to:
- develop reusable tools / features to bring ISO20022 compliant payments to the Dotsama ecosystem
- Bring Polkadot / Kusama chains up to speed with Ripple XRP / XLM / Algorand / etc. on ISO20022 support
- Onramp transitional financial institutions worldwide to blockchain enabled cross border payments
- Leverage Dotsama's unique off chain computing, storage and connections (cloud, HTTP) capabilities to scale web3 dApps
- Support ISO20022 MX messages via Polkadot XCMP, and possible integration with IBC (Inter-Blockchain Communications)
- Future milestones implementing the use case with workload estimation with insights from this initial milestone

## Referral Program (optional)

You can find more information about the program [here](../README.md#moneybag-referral-program).
- **Referrer:** N/A
- **Payment Address:** N/A

## Additional Information

**How did you hear about the Grants Program?** Web3 Foundation Website and previous work interactions

0 comments on commit 376e6e4

Please sign in to comment.