Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO20022 PoC #1940

Merged
merged 22 commits into from
Sep 12, 2023
Merged
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7bcb015
ISO20022 app
Aug 29, 2023
787f719
minor change
Aug 29, 2023
c665750
Add project name
Aug 29, 2023
b35ecab
Revise application
OpenSmartContract Aug 29, 2023
7ab3fcb
Remove extra template text, revise scope and budget to a more holisti…
OpenSmartContract Aug 29, 2023
23ef9ea
Add future plan items
OpenSmartContract Aug 29, 2023
2f52bf9
Update costs to BTC
OpenSmartContract Aug 29, 2023
2ddb04c
Update applications/ISO20022.md
OpenSmartContract Sep 4, 2023
fc547fd
Update applications/ISO20022.md
OpenSmartContract Sep 4, 2023
0c069b1
Update applications/ISO20022.md
OpenSmartContract Sep 4, 2023
16385bb
Update application per suggestions
OpenSmartContract Sep 4, 2023
e8057cc
Merge branch 'master' of github.com-OSC:OpenSmartContract/W3F-Program
OpenSmartContract Sep 4, 2023
03f842d
Revise to only milestone1 per recommendation
OpenSmartContract Sep 5, 2023
3b6a31e
Update applications/ISO20022.md
OpenSmartContract Sep 6, 2023
f587dd4
Update applications/ISO20022.md
OpenSmartContract Sep 11, 2023
c5520fc
Update applications/ISO20022.md
OpenSmartContract Sep 11, 2023
8e2094e
Update applications/ISO20022.md
OpenSmartContract Sep 11, 2023
a17d45e
Revision based on feedback
OpenSmartContract Sep 12, 2023
174a038
Add Medium article to deliverables
OpenSmartContract Sep 12, 2023
7d461cb
Update applications/ISO20022.md
OpenSmartContract Sep 12, 2023
e0d9d24
Update applications/ISO20022.md
OpenSmartContract Sep 12, 2023
6cea64b
Update applications/ISO20022.md
OpenSmartContract Sep 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions applications/ISO20022.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
# ISO20022 PoC

- **Team Name:** Open Smart Contract
- **Payment Address:** 3GTe5ArJLC8jesr6UFtB9kcoguQmvo8Cuo (BTC)
- **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 3
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved


## Project Overview

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

Project name: ISO20022 PoC

OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
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.
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved

### Overview

- The project is an [ISO20022](https://www.iso20022.org/) based cross-border payment proof of concepts implemented with Substrate off-chain features
- A brief description: Proof of concepts of Dotsama / Substrate based ISO20022 compliant cross border payment example.
- The project intends to use various Substrate pallets and off-chain workers / storage to implement an ISO20022 X-border payment example on a Polkadot / Kusama chain
- 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. Polkadot / Substrate based cross border payments can provide blockchain based payment efficiency, cost savings and interoperability with financial institutions, onramping billions of users to the ecossystem.

### 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 payment metadata
- ISO20022 data types to Polkadot data types / XCM mapping table
- Data securedly stored offchain
- ISO20022 messaging and payment events and stats
- ISO20022 messaging and payment queries
- Benchmark on performance, throughput, gas fees, binary size, payment latency and cost comparisons
- An overview of the technology stack to be used
- Substrate Offchain workers to process compute intensive tasks such as ISO20022 message wrangling
- Substrate offchain storage / indecing to persist string heavy ISO20022 messages
- ISO20022 messages parsing / mapping / processing using OCWs
- Substrate XCM for ISO20020 messaging
- Utility / Codec / RPC / etc.
- X-border payment ink! smart contracts with access control security
- Optional offchain connected cloud storage and HTTP requests
- Documentation of core components, protocols, architecture, etc. to be deployed
- Substrate based blockchain, including testchains to deploy as sandbox
- ink! / Rust based smart contracts implementing X-border payment logic
- Payment history along with ISO20022 messages stored offchian with indexing
- Expensive ISO20020 related computation by offchian workers with onchain accessibility
- ISO20022 messaging supported by XCMP with XCM <> ISO20020 data format translations
- ISO20022 messaging and payment events and stats
- ISO20022 messaging and payment queries
- PoC/MVP or other relevant prior work or research on the topic
- Our research shows that multiple gaps exist to support ISO20022 compliant cross border payment use case
- There's big ata type compatibility gaps between Polkadot and IS20022, such as date and time, currency, float, array, etc.
- There's no out of box support of SO20022 XML processing and mapping such as XSD transformations
- There's no built-in data validation, message routing, payment securties, etc.
- There's no native foreign exchanage / currency conversion capabilities
- There's no payment states reflecting current cross border payment flow states

- 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
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved

### 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 develpopers to levearage on the learning and tools to further develop ISO20022 compitable dApps, to make it possible for transitional financial institutions to interoprate 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

### Contact

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

### Legal Structure

- **Registered Address:** No registred entity
- **Registered Legal Entity:** No registred entity
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved

### 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. Previous 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.

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).
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved

### 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

- **Total Estimated Duration:** ~3-6 months
- **Full-Time Equivalent (FTE):** 1,4 FTE
- **Total Costs:** 80K 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 |
Comment on lines +138 to +139
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the mandatory deliverables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deliverable for this milestone is the use case definition, gap analysis, implementation specification, etc. as listed. Implementation in potential future milestones.

| 1. | Design the use case | Degine an ISO20022 cross border payment use case with persona, end-to-end flow |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be part of the proposal. We typically only cover the implementation itself and would expect grantees to show us sufficient details of what they want to implement. Using an "e2e flow" (e.g. sequence diagram) certainly would be useful for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This milestone is all about design / specification, not implementations. Noted that e2e flow would be part of the deliverables of this milestone.

| 2. | Specify ISO20022 messages | Specify ISO20022 messages for each and every step of the cross border payment flow, including reference data fields besides core XML data |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
| 3. | ISO20022 XML <> Polkadot XCM data mapping | Identify data types gaps, XML<>XCM trnasformation and validations for the use case|
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 3. | ISO20022 XML <> Polkadot XCM data mapping | Identify data types gaps, XML<>XCM trnasformation and validations for the use case|
| 3. | ISO20022 XML <> Polkadot XCM data mapping | Using data type gaps as an input, we will implement XML<>XCM transformations and validations |

for the use case

Do you mean some specific use case related to ISO20022 here? Otherwise I think you can just skip this part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes for the specific cross-border payment use case in this example related to ISO20022.

| 4. | ISO20022 <> Polkadot messaging | Identify XCMP gaps in messaging, relaying, routing feasibilities for the use case |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference to the previous deliverable here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to #4 here vs #3 here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. As far as I understand ISO20022 and XCM are message formats. However, XCMP is the transport mechanism. I believe ISO20022 is agnostic to the underlying transport mechanism, right?

| 5. | Define offchain data storage | Define offchain data structure, storage and indexes for ISO20022 messages and payments in this use case |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
| 6. | Define offchian worker module | Define OCW logic to handle ISO20022 messages mapping, processing, messaging in this use case |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
| 7. | Define Smart contracts | Define ink! smart contracts to implement X-border payments and offchian integrations in this use case |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
| 8. | Define ISO20022 messaging and payment events and stats | Define ISO20020 messaging and payment flow events and states |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
| 9. | Define ISO20022 messaging and payment queries | Define how to query ISO20022 messaging and payments, based off events, stats, transactions and indexes stored offchain |
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved

### Milestone 2

- **Estimated Duration:** ~2-4 months
- **FTE:** 1,4
- **Costs:** 55K USD

| Number | Deliverable | Specification |
| -----: | ----------- | ------------- |
| **0a.** | License | Apache 2.0 |
| **0b.** | Documentation | We will provide both **inline comments** of the code and a Medium **article** that explains the use case and guide users to deploy and interact |
| **0c.** | Testing and Testing Guide | Unit and integration tests for core functions with test scripts |
| **0d.** | Docker | We will provide a docker file that can be used to test all the functionality |
| 0e. | Article | We will publish a Medium **article** about this PoC, and the feasibility of pairing up ISO20022 and Substrate offchian features to support ISO20020 payments, enabling potential financial institutions / fintech onramping to Dotsama ecosystem for blockchain based global ISO20020 compliant payments |
| 1. | Develop offchain data storage | Data structure, storage and indexing of X-border payment histories and ISO20022 messages |
| 2. | Develop offchian worker module | Logic to handle ISO20022 message mapping, processing, messaging |
| 3. | Develop Smart contracts | Set of ink! smart contracts that implements the cross border payment flow and offchian integrations, deploy on Shibuya test chain as sandbox |
| 4. | Support ISO20022 messaging and payment events and stats | Offchain logging, querying, diagnosing ISO20020 messaging and payment flow events and states |
| 5. | Develop ISO20022 messaging and payment queries | Implement querying ISO20022 messaging and payments, based off events, stats, transactions and indexes stored offchain |
| 6. | Develop Substrate module ISO20022 | Optional Substrate runtime module that implements ISO20022 message processing logic for better performance and efficiency if needed |
| 7. | Explore cloud storage and HTTP requests | Optional AWS S3 cloud storage as offchian storage extension for events / archives / scalability, and optional HTTP requests for potential future offchain queries / tranditional financial institution integrations / fiat+crypto payment flow / interoperabilities |
| 8. | Optimization and performance benchmark | Benchmark payment transaction throughput, measure binary foorprints, gas fees, cross border payment latencies in various optimizaiton implementations |
| 9. | Cross border payments comparisons | Compare end-to-end elapse time / costs, including latency / fee breakdowns, with real world fiat based cross border payments from traditional financial institutions if possible. Share comparison stats in a Medium article to be published |

## 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:
OpenSmartContract marked this conversation as resolved.
Show resolved Hide resolved
- 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 offchain 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)

## 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
Loading