“Behind the scenes” of Ourion and ioCash

ioCash
iobuilders
Published in
6 min readMar 28, 2019

This article describes the “behind the scenes” of Ourion beta app with the aim of explaining all the processes that take place under it, including the communication with ioCash.

ioCash is a platform that enables the use of fully regulated money on blockchain. This way, our clients can make use of the advantages of this technology and its capabilities but always making sure that all its operations are fully compliant with regulation.

Ourion can be seen as a client of ioCash, so if you are thinking of integrating tokenized regulated money into your business, this article can serve you as a first approach to see how your solution can look like.

The figure below shows the high level architecture of the integration of Ourion with ioCash API and Smart Contracts

High level architecture of integration of Ourion as a client of ioCash
  • Ourion app: User interface that communicates with Ourion API for centralized transactions and listens and sends decentralized transactions to the DLT.
  • Ourion API: Connects the commands generated by the app to the corresponding endpoints of ioCash. It contains the database with the information of the registered users. It also listens to events generated in the DLT.
  • DLT: Smart contracts of ioCash and new ones generated by Ourion that are deployed in Telsius (test-net of Alastria) that is based on Quorum and uses IBFT consensus protocol. The smart contracts have been built using an enhanced version of the ERC-20 token standard called EM-token that we will make open-source soon. The DLT contains the “universal truth” and the app and APIs listen to its events to retrieve information from it.
  • ioCash API: It has the endpoints to which Ourion API connects and it contains the database where all information about users is saved. It connects to the E-Money Core to transmit the transactions so that they are reflected on the banking system. It also makes decentralized transactions and listens to the DLT.
  • E-Money Core: Electronic Money Entity (EME) that ioCash uses. it creates the IBANs in a bank for our users and reflects the movements in the banking world. It only connects in a centralized (API) way to ioCash.

The first thing that a user can do with the app is to create an account. While doing so, the following actions take place:

First step of creating an account in Ourion app: Creation of Ethereum address
  1. Creation or import of Ethereum address: First of all, the user has to either create or import an existing Ethereum address. The private key associated is stored in the device and the user will be able to recover it in other device only with the backup phrase or with the private key itself. However, since ioCash is a provider of a regulated bank account, we have the responsibility to recover your funds after verifying your identity in case you lose your private key
  2. Creation of Pin: This Pin serves to unlock the app, and it will also be used to confirm the transactions.
  3. Signature of terms and conditions: Before creating a user in our system, he/she will have to sign the privacy policy and use terms of conditions. To make it more blockchain wise, these documents are stored in a decentralized storage (ipfs) and its signature is registered on the blockchain.
  4. Creation of user in the system: With the personal information introduced by the user and the DLT address created/imported, we create a new user in our system in all 3 levels Ourion/ioCash/EME. From Ourion we do this by calling ioCash endpoint “createuser”, this call is transmitted to our E-Money Core that creates a new IBAN that ioCash and Ourion will save in their databases.
  5. Mobile phone verification: In order to complete the creation of the account, the user has to verify his/her identity. In this case, the phone number. For that, the EME provides us with the service of an OTP that is sent via sms to the user. The requests of identity verification are done via the blockchain directly from the app (decentralized operation). ioCash listens to the events and transmits the commands to the E-Money Core that sends the sms to the user.

At this point you might be asking yourself: Is it possible to create an account with a valid IBAN with just a phone number? The answer is yes. The downside is that the user will have operation restrictions of 250 € per operation limit and 1000 € quarterly limit (more than enough for a demo use case). For expanding these limits, users have to identify themselves with more data (such as id, level of income…) and go up on kYC.

Once the user has created the account, he/she will be able to navigate through the different screens of the app and access its functionalities.

The figure below shows the home screen where the balance of the account is shown. This balance is retrieved from the blockchain by calling the so known ERC20 token standard function “balanceOf”. In addition, this screen shows the feed with the movements done till the moment. These movements are saved at ioCash level, and we request them via API in a centralized way. We do it this way because bank transfers information, have sensitive data as IBAN numbers that should not be saved publicly on the blockchain. Cash-ins and cash-outs are seen on the BlockExplorer as mints and burns of tokens.

Home screen of Ourion Beta app

Users can make centralized and decentralized operations while using Ourion.

  • Centralized operations: SEPA cash-in and cash-out/bank transfer: They are done via API by calling the correct endpoint of ioCash. These calls are transmitted to the EME and when succeeded they are reflected on the blockchain with a mint or burnt respectively. When the transactions are mined on the blockchain, ioCash API updates the balances of the involved accounts and the movement is marked as finalized. The app now can show the updated balance and movement detail. We are working so that in the near future all operations are started decentralized at the Em-token level.
  • Decentralized operations: Ourion transfers: The app calls directly the method of the smart contract that transfers the money from one Ethereum address to another, with a prior check of the limits of operation -that are also stored natively on the blockchain-. ioCash API listens to the event produced by the transfer and updates the balances in the banking world by calling the E-Money Core.

Using Ourion example

Next paragraphs and images show an example of a possible flow that can take place on Ourion:

First, in order to fund the wallet, the user can make a SEPA cash-in from its bank account. The user just has to make the transfer as he/she would do with any other traditional bank transfer.

SEPA cash in done from traditional bank account

This bank transfer of 150 € shown in previous image will eventually reach the wallet. With it, the user can do other operations such as Ourion transfers. Next animation shows this whole flow, since the Sepa cash-in is received until the Ourion transfer to another Ethereum address is completed successfully. It also shows how the balance is automatically updated on blockchain by visualizing it at other Ethereum wallet manager such as Metamask.

Sepa cash-in and transfer visualization in app and Metamask

The details of movements in the home screen show the id of the blockchain transaction. By clicking on one of them, the BlockExplorer of Alastria is opened with the details of that transaction registered on blockchain. As said before, all operations have their reflection on blockchain, and the user can check that the transaction is immutably registered.

Transactions can be checked on the Block Explorer

For the more blockchain friendly: since your account is attached to an Ethereum address, you can open such a wallet from another Ethereum wallet manager such as Metamask and start operating with it, always that you open it on the proper network and use the same private key.

--

--

ioCash
iobuilders

Real money on blockchain. Your money, your rules