Blogpost

We built a P2P mobile payments system on Stellar – here is how it works

Espeo Crew
A person holds a modern smartphone displaying financial charts and asset data, including metrics for trustlines and asset prices.

The problem to solve

Our solution brings significant benefits for unbanked users, particularly in regions where financial services are ineffective or insufficient. The primary problem our application addresses is replacing banks in the payments ecosystem. We propose a system that facilitates peer-to-peer, frictionless payments and remittances by utilising the inherent features of the blockchain protocol. The key advantages over traditional banks include:

Free account

Our solution enables customers to open a free account with very low usage costs for everyday and cross-border payments.

Fast Transactions

Peer-to-peer payments eliminate intermediaries, allowing for immediate money transfers.

Reduction of Cash Circulation

Costs and risks associated with handling cash are minimised. Users only need a mobile device to access the platform. We replace cash trading with a new model.

No Transaction Fees

By utilising Stellar technology, transaction fees can be reduced to near zero or eliminated entirely.

Safe Transactions

We employ blockchain and cryptographic algorithms to ensure secure transactions. With a private key, only users can manage their wallets and payments.

Electronic Wallet

Users can access a virtual wallet from anywhere in the world, quickly and securely.

Digital Coin Issuance and Transaction Validation on Stellar

Diagram illustrating the flow of digital coin issuance, conversion, and transaction validation using the Stellar blockchain. It shows how users interact with issuers, a central bank, and digital wallets to request and transfer coins, including lumen fee payments. © Espeo Software

There are three parties in our solution:

Central Bank

A virtual space for communication which controls the supply of coins in the ecosystem.

Issuer

A point of sale where users can convert cash into coins.

User

The end user who employs the mobile app, central bank technology, and Stellar blockchain to manage their wallet and execute payments.

Transaction Process

  1. A user with cash (User 1) requests a point of sale (Issuer 1) to swap fiat currency for coins. When Issuer 1 accepts the local transaction, a request is sent to the Central Bank, initiating the transfer of coins to the user’s wallet.
  2. Next, Issuer 1 and User 1 receive a response on the transaction status from the Central Bank. There are two main outcomes:
  3. The blockchain transaction cannot be initiated; in this case, the response is generated from our backend system.
  4. The transaction is initiated and remains in progress until the blockchain sends a confirmation.

Once the Central Bank verifies that the request is successful, it begins the transaction on the Stellar blockchain. The Central Bank then transfers coins from Wallet CB to Wallet 1. It is important to note that the Central Bank can transfer coins from its wallet to any wallet in the ecosystem at any time.

The same process applies for both users and issuers.

When the transaction is completed, both the User and Issuer receive information about the status – either success or error.

Our solution is suitable for every participant in the ecosystem who maintains an active wallet. Coins can be transferred quickly and easily. All transaction details are recorded on the Stellar blockchain and are visible to the Central Bank. Each user can review their transaction status via our Payments Explorer interface.

General Assumptions

  • Users can pay via phone to another person within the system. Every transaction records information such as the buyer’s wallet ID, the seller’s wallet ID, timestamp, location, coin amount, and Lumen fee.
  • All participants can swap their own coins or tokens for Lumens at any time.
  • The platform supports remittances that are available 24/7.
  • The ecosystem includes multiple points of sale, issuers, and users engaging in peer-to-peer transactions.
  • The Stellar blockchain guarantees secure, fast, and safe transactions.
  • Stellar benefits from significant community support, with major brands backing this technology and offering commercial blockchain solutions based on it.

Technical Architecture

Backend

Responsible for executing all transactions that are not part of the blockchain. The main functionalities include:

  • Ordering the exchange of traditional currencies.
  • Facilitating communication between points of sale and the Central Bank.
  • Managing communication between the client and the Central Bank.

Blockchain Layer

An essential component of the system, utilising Stellar technology. This layer is fast and enables high scalability, supporting hundreds of thousands of users. Its main responsibilities are:

  • Transferring assets (coins) from the Central Bank’s wallet to users.
  • Facilitating direct transactions between user wallets.
A system architecture diagram showing user interactions with a microservices backend integrated with the Stellar blockchain, featuring HTTPS requests, firewalls, load balancers, REST APIs, an event bus, and the Stellar Horizon API.
A microservices-based infrastructure enables secure, scalable interaction with the Stellar blockchain, supporting decentralised transactions through a layered API and load balancing system. © Espeo Software

Mobile Application

Our mobile application allows users to transfer electronic money in the form of Stellar tokens directly from wallet to wallet. It is designed for ease of use, and although any other coin can be implemented, Stellar tokens may serve as the primary currency within our payments ecosystem.

Payments Explorer

We have developed a tool that allows users to search for transactions conducted on the Stellar network. This solution enables verification of transaction and remittance histories with ease, offering a straightforward method to monitor blockchain activity. Below is an example of the Payments Explorer’s user interface.

Payments Explorer interface showing account balances, transaction history, and pending claims in a Stellar blockchain dashboard.
The Payments Explorer provides a real-time overview of account balances and transactions, delivering transparency for Stellar blockchain users. Source: Stellar Expert

This post has first been published on April 1, 2019 and has since received stylistic adjustments.

Table of Contents

Secure your spot, stay updated

Expect a stream of valuable reads coming your way!

Let’s get in touch!

Got questions about our services? Our team is here to help.

Contact our Poznań HQ