Skip to main content

Roloi - XCM Payment Automation

  • Team Name: NeoPower Digital
  • Payment Address: 1dz667uQX199rHyj6tizmL6EJe4AZxjH1RhnyrT1QuQ4pfS (Polkadot - USDT)
  • Level: 3

Project Overview πŸ“„β€‹

Overview​

We are NeoPower, a Web3 software company. We are currently building a payment automation platform called Roloi.

Last year we received a W3F Grant for the migration of our Streaming Smart Contract from Cosmos to Polkadot. We talk about this migration journey in a Medium Article.

Roloi is based on three automation pillars:

  • Token streaming
  • Recurring payments
  • Conditional payments

As a next step for Roloi, we are going to build the recurring payments feature.

Roloi can achieve this by avoiding off-chain mechanisms thanks to OAK Network: the automation parachain.

Project Details​

Goal​

Automate ink! smart contract transactions in a recurring way.

How to achieve it​

We need to notify our Smart Contract deployed on Shiden (Astar) whenever a scheduled transaction should be executed.

XCM enables us to connect parachains. This way, we can schedule transactions on Shiden (Astar) with the assistance of Turing (OAK).

Technical details​

Creating products using XCM implies a complex journey today. Here is an example between Astar and OAK:

W3F Grant - XCM Payment Automation

There are some DX/UX issues while building products with the out-of-the-box approach:

  • The process to enable the connection between chains requires the configuration of Proxy Accounts on both chains.
  • Users have to manually top up their Proxy Accounts in order to allow them to pay for fees to act on their behalf.
  • XCM messages are complex to understand and generate.
  • Managing on-chain recurring transactions is always a complex task.
  • Polkadot.js is great for low-level development, but hard to use for user-oriented products.

Our solution​

Our deliverable will include a Next.js UI and an ink! smart contract to create recurring transfers leveraging XCM features.

The included features on the Next.js UI are:

  • βœ… Wallet connection
  • βœ… 1-click proxy accounts setup
  • βœ… Recurring payment creation
  • βœ… Incoming and outgoing payments section
  • βœ… useink() library

For devs:

  • πŸ’» Our own useful hooks and reusable abstractions in Typescript to encapsulate tasks such as:
    • Creating proxy accounts on both sides
    • Depositing funds into these accounts to cover fees
    • Wrapping the recurring transaction to be executed via Astar Proxy Account
    • Transmitting the recurring task configuration via XCM & HRMP
  • πŸ’» ink! smart contract example used to trigger payments
  • πŸ’» Recurring payment data model

Some hook examples: W3F Grant - XCM Payment Automation - Hook examples

This project will be generic and open source to serve the Polkadot builders community as a public good that teams can use to automate transactions leveraging cross-chain features.

This will make building with XCM fast and simple.

Wireframes​

Wireframe

Ecosystem Fit​

This project is a public good for the Polkadot Builders community. For NeoPower, this will be a great experience since all of this work will give us more traction to grow Roloi.

Our intention is to provide a generic and open-source project that can be the starting point to many real use cases of cross-chain payments using XCM.

The code will be backed with robust and clear documentation. This will allow our platform to be easy-to-use and effortlessly scalable.

We also plan on publishing a Medium Article to share our experience developing with XCM.

At NeoPower, we are always contributing to the Polkadot Spanish community with educational content:

Team πŸ‘₯​

Team members​

We are NeoPower, a Web3 software company. Our core team members:

  • Brian Sasbon (Co-Founder & CEO)
  • Pablo Corrado (Co-Founder & CTO)
  • HernΓ‘n Hermida (CGO)

Contact​

  • Registered Address: Pacheco 2131, CABA, Buenos Aires, Argentina (CP1431)
  • Registered Legal Entity: NeoPower Digital, LLC

Team's experience​

Founders​

We are Brian and Pablo, Software Engineers with a Degree from the National Technological University (UTN) from Buenos Aires, Argentina, and have more than 10 years of experience as developers for many different projects. We have strong experience working as Full-stack Developers and Team Managers for US traditional finance clients like Morgan Stanley, Visa, and JP Morgan.

6 years ago we founded NeoPower, our own software company to work for different clients building freelance teams of designers, developers, and testers.

We are building Roloi, a payment automation platform to enable on-chain payment flow automation in Astar. Our project was supported with a first grant from the Web3 Foundation.

CGO​

HernΓ‘n S. Hermida (aka Milstein) is a DeFi Researcher with more than two years of experience contributing to educational communities in Latam. Currently, he hosts #DeFiSpace, a weekly Twitter Spaces cycle, with more than 50 episodes, interviewing builders from different multi-chain projects, and creates content for β€œLa Multisig”, a web3 educational YouTube Channel with its community.

He’s the growth lead of DeFi Argentina a non-profit project that helps children’s food banks in Argentina by collecting donations in cryptocurrencies.

He’s also been an OAK ambassador since Nov 2022.

HernΓ‘n is part of the Roloi team as CGO to help with the growth, research, and networking strategy, leveraging his knowledge about DeFi and communities.

Team Code Repos​

Development Roadmap πŸ”©β€‹

Overview​

  • Total Estimated Duration: 2.5 months
  • Full-Time Equivalent (FTE): 3
  • Total Costs: $ 52,500

Milestone 1 - UI on Rococo Testnet​

  • Estimated duration: 1.5 months
  • FTE: 3
  • Costs: $ 31,500
NumberDeliverableSpecification
0a.LicenseMIT
0b.DocumentationWe will provide a general tutorial for the user to understand how to use the dApp and technical documentation of the main functionalities.
0c.TestingTo guarantee robustness, the main functionality will be covered by unit tests.
1.UIAs expressed in the Project Details section, we will provide a Typescript Next.js Web App that includes key abstractions to simplify the developers' work when using XCM and connecting parachains. The scope of this UI includes connection to the Rococo Testnets of Astar & OAK and chain native token transfers. Libraries to use: Polkadot.js & useink.
1a.React XCM toolingWe will provide reusable React hooks, generic components, state management and types to facilitate the creation and top-up of Proxy Accounts, and execution of XCM (v3) messages.
1b.Home pageThis page will handle the wallet connection and will show the app dashboard.
1c.Create a Recurring Payment PageOn this page, the user will be able to create recurring transfers using the previously defined XCM flow. The most tricky part of the process will be transparent for the user.

Milestone 2 β€” Smart Contract and Kusama Connection​

  • Estimated Duration: 1 month
  • FTE: 3
  • Costs: $ 21,000
NumberDeliverableSpecification
0a.LicenseMIT
0b.DocumentationWe will iterate the existing documentation to include the new functionalities.
0c.TestingTo guarantee robustness, the main functionality will be covered by unit tests.
0d.ArticleWe will publish a Medium Article about our development experience with XCM.
1.UIWe will add the connection to the Kusama chains of Astar and OAK.
1a.My Payments PageA page to show all the incoming and outgoing payments of the connected user.
2.Smart ContractAn ink! smart contract that stores all the payment flows and monitors the security of the assets. All the token transfers will occur in Shiden. This enables transfers of non-native tokens.
2a.Transaction - Configure new recurring transferWe will provide a message to configure a new recurring transfer between Shiden accounts.
2b.Transaction - Modify the configuration of a recurring transferWe will provide a message to modify an existing recurring transfer between Shiden accounts.
2c.Query - Get user recurring transfersWe will provide a message to get all the incoming and outgoing recurring transfers of the connected user.
2d.Transaction - Execute a transferWe will provide a message to execute a transfer related to an existing recurring configuration. It will be triggered by the OAK scheduler, and the contract should validate the time according to the existing configuration.

Future Plans​

  • Automate cross-chain token transfers.
  • Include conditionals to the transfers.
  • Scale this automation platform according to the ecosystem needs.
  • Integrate this code to Roloi to schedule payment flows.

Additional Information βž•β€‹

We heard about the Grants Program through Twitter, and through personal recommendations from Parity developers we decided to apply.

Links: