Stratiom.io

What is Stratiom.io?

Stratiom is a peer-to-peer, web-based wallet and payment system.

The project aims to implement an easy to use, transparent payment system, through which users can send funds to one another without the use of anchors. Stratiom never stores user data on the server, and only stores a small amount of localstorage data unrelated to account info (exclusively to track tutorial completion).

Components

Debt Assets

Each user has one debt asset which is tied to USD. Although it would be ideal to have multiple fiat currencies, this simply wouldn't be feasible as a user would have to trust multiple debt assets per user. Instead, since fiat currencies are relatively stable, the system can convert to other currencies on client-side, though these debt assets would ultimately remain linked to USD.

Debt assets are exactly that, a signifier of debt, or an IOU.

Trustlines

Trustlines are, naturally, the core of the system. For user A to receive user B's asset, a trustline must be created from A to B.

Passive Offers

After a trustline is created, a user will be prompted to support payment mediation. If user A trusts user B enough to support payment mediation, he or she may decide to mediate payments. This is accomplished by user A creating a passive offer buying user B's asset, and selling his or her own asset.

Debt Settlement

Debts are settled in one of two ways.

The user creates an offer buying his asset back for XLM (effectively linking the user's debt to XLM, allowing holders of his or her debt to exchange it on the network with XLM as a bridge currency).

The alternative is that the users settle the debt in real life for fiat. Once the debt has been settled in fiat, the receiver would clear the debt.

How does it work?

Stratiom achieve these goals through a network of trustlines and passive offers. The typical transaction / account creation flow is as follows.

Bob has just made an account, and has a few friends already using the service, who have already added Bob as a trustline.

  1. Bob logs in for the first time. He adds a few friends and family to his trustlines, and is now able to receive each of their debt assets.
  2. Bob decides to support payment mediation for some of his close friends by creating a passive offer for each of them, buying their asset and selling his.

Direct Transaction

  1. Now Bob would like to send $25 to his niece, Alice, for her birthday. Since Alice already has Bob as a trustline, Alice sends $25 of his debt asset directly to Alice.

Path Payment

  1. Now Bob would like to send $25 to his niece, Alice, for her birthday. Alice doesn't have Bob as a trustline though, meaning Bob cannot send his asset directly to Alice. Bob has, however, already created a trustline for his sister, who also has a trustline for both Bob and Alice. Assuming Bob and his sister are supporting payment mediation for one another, Stratiom will then find a payment path to Alice. The path payment would complete instantly, sending $25 of Bob's debt to his sister, and $25 of his sister's debt to Alice!

No Path

  1. Unfortunately, if there is no path from Bob to Alice, then the transaction cannot be completed and Alice would have to set Bob as a trustline before the two could proceed.

Fiat Settlement

  1. Whether Bob owes Alice directly or owes his sister, the two may settle in real life for fiat. Once the debt has been settled, the receiver of the debt (in this case Alice or Bob's sister) will clear $25 of Bob's debt

XLM Settlement

  1. Bob may not be able to settle the debt for fiat, in which case he could link XLM to his asset. Bob would create an order buying his asset for XLM, in which case the holder of his debt could instantly exchange it for XLM.

Tech Stack

Stratiom is a single-page web-app built with React. I'm currently doing server rendering with express, though I do plan to remove server usage altogether in the near future. Since nothing is stored on the server, Stratiom is not using redis or a DB.

Open source?

Yes! We have just released our open source client.

Github Repo

Is it live?

Yes it is! You can check it out right now, though note that it is still under development. As such, any and all feedbacks/bug reports are greatly appreciated.

Mainnet: stratiom.io
Testnet: testnet.stratiom.io

Contact: mitchell@stratiom.io

Work is going well, speeding up now that I've got a full system design.

I do have a problem though, and I'd really love it if someone could help me out.

Now, horizon supports the findpath operation, though it doesn't tell me the last vertex in a friend graph. This means I'll have to traverse the friend graph to find a final connecting vertex on a path between sender and receiver. The only implementation I can think of is DFS, but I'm sure there is something better for this case. If so, I'd love to hear it and the reasoning behind it. Thanks!

I'm very happy with todays progress. Implemented trustline creation, asset order creation, and trustline management.

I don't understand the issue. You specify the destination asset in the call to find path?

    jed

    Yea, thats the source of my concern. I mean as far as I understand, the path payment would work as follows.

    Let's say A wants to send to D, but D doesn't have a trustline for A. There is a payment path though. Now let's say the payment path looks as follows.

    A - > B - > C - > D

    A's asset would not be able to reach D, instead C's asset would have to reach D.

    Anyway, since the path is initially unknown, I'd have to manually find user C to specify user C's asset as the destination asset in the path payment.

    I can just load the destination accounts balances and run find payment path on those trustlines. Still wondering if there's a better way though.

    Another Edit: After working with the system, this case seems to be fine. The only case where this would be a problem is if the user had a very large number of stratiom trustlines. Anyway, I'm sure it can be optimized and that will be a goal pre-launch.

    Good day again. Completely exhausted though, but almost done with an early alpha version!

    I've closed the source for the time being as I'd like to comment / polish things up a bit. Anyway, payments are working with the following features.

    1. Initially checks for a direct trustline between sender and receiver
    2. If no trustline is found, the receiver's Stratiom asset trustlines will be loaded and exhausted for potential paths
    3. If a path is found, the source defaults to the first, shortest path, and broadcasts the transaction

    Right now I need to do the largest component (the payment overview panel where debts can be settled/etc). From there, I'll clean up the source and begin working on broad improvements to this open source version.

    Once I've got a solid open source client I'll be moving to the closed source system w/ accounts and push notifications!

      Just an update; I've been hard at work and have made considerable progress.

      I've now implemented debt settlement/payment management, optional orders (one to one rates are currently mandatory), and a transaction history.

      Overview page is completed, and I'm happier with the UI, though I'll still be making quite a few changes. Ledger implementation, offer management, inflation modal, and xlm linkage are my next priorities. After that I'll be polishing and adding a tutorial.

      A few pics of the progress:

      • DELETED -

      Edit: More recent pictures have been attached to the latest post.

      Mitchzof So you effectively loading receiver's balance with A's asset and searching path from receiver to sender?
      "Find path" does not work on trustlines alone?

        sergionero

        No, find path does not work on trustlines alone. Destination asset is a required parameter. Without knowing the destination asset, I can only loop through the destination's Stratiom asset trustlines and check paths for each.

        Upps... as far as I understood Stellar's tech it allows to "find path to change USD on one account to EUR on other account" making conversion on the fly (according to stellar.org).
        So in your case it should just convert assets of A,B,C,D (if they set corresponding bids) and make transparent transfer of value.
        Seems it is not the case out of the box... ?

        Alpha Release

        I'm excited to say that the Alpha version is now up and running for testing! Just a note, the site is currently hooked up to the testnet, so feel free to play around with it and give some feedback!

        Check it out at stratiom.io

        What's Next

        Although the site is up and running, there will still be plenty of work and updates ahead.

        1. First and foremost I'll be doing a lot of bug testing. Although I've got some pretty extensive error handling, there is still plenty that can go wrong, I'm certain. So a lot of this time will be spent finding and fixing bugs.
        2. Ease of use. One of my main goals now is to improve ease of use on the client. This goes along with UI/design improvements, along with improvements to the tutorial. The system is fairly complex, so I'm trying to make it as flexible as it can be, while still being user friendly.
        3. Ledger support - this is my direct goal, so I'll be jumping straight into that.
        4. Auth Required vs No Auth - I've been strongly considering this and have leaned to no auth simply for the following reasons. It makes the site easier to use. Without auth required, users can create trustlines and get started. At the same time, for the extra hoops auth required adds, it doesn't improve the system or user security all that much. The only benefit from auth required is allowing auth revocable, and letting users revoke asset ownership when trust changes. That said, I could see cases for sender to abuse auth revocable, making it a bit of a double edged sword.

        This should all be done and the full site should be launched within the next 5-7 days, after which I hope to eliminate server rendering and release the open source client.

        Long Term

        I feel now is a good time to thoroughly address the long term of this project.

        I'll list a few things that I'd like to focus on for future builds.

        1. Mobile clients. While I saw to it that the website worked very well on mobile, I'd still like to launch mobile versions.
        2. Develop a commercial closed source implementation of the p2p system. This would be centered around user accounts, which would enable faster operations (less reliance on horizon), push notifications, customization, and a greater ease of use. For example, I could link some fiat debt settlement methods such as PayPal, etc. The consumer version would be a multi month project though. If anyone is interested, I'd be happy to share further details.
        3. I did my best on the UI and am still improving it, but I am ultimately no web designer. I'd love to get a really high quality design for the site.
        4. Expansion and promotion: naturally I'm building this app to be used! So I'll most definitely be dedicating some time promoting the website, and helping new users learn the system.

        Wow, just to close, I'm surprised by how far this project has come. I have been living and breathing this project. Ultimately, I hope the work payed off, and I hope the community finds it a valuable tool.

        Please though, it's still just the first build, so if you have any suggestions or feedback at all, feel free to share.

        Hey, wanted to test this out. It looks cool. But when I try to log in, I get a prompt to activate my account with at least 5 XLM (even tho the test account I'm using has ~ 8 XLM). Any ideas?

          syntaxval

          You can email me at mitchell@stratiom.io

          I just realized I'd forgotten to change DNS records for email after going live. Everything is working now though. Also, as an update, I've just edited the main post with a better overview/description of the system.

          Made a few ui and payment flow updates. I'm feeling much better about the design and ease of use now!

          I can safely say that the project is very near completion. I'll be busy the next couple days, so there's a chance I won't be able to implement ledger support before the 15th.

          To those of you who emailed me, I'll email you back shortly, I've just been busy the past couple days.

          I also released the open-source client. Link in the main post.

          5 days later

          Alright, Stratiom.io has reached it's very final stages of development for this SBC. The site is live and after some serious stress testing of the path payments, I can say that everything is running smoothly! I've made some major design changes since the last post, and have added another component to view XLM settlement history. Anyway, I'll likely be making some minor UI additions in the following couple days.

          Unfortunately, I put off Ledger support to focus on improving the UI and adding a couple of components. I will still be adding Ledger support, though this will be in a future build.

          Below are some images of the site in action!

          Login

          Overview

          Pay

          Trust Manager

          Trustlines

          Passive Offers

          Payment History

          XLM Settlements

          25 days later

          I know I haven't posted here since submissions, but I've been mulling over two routes to take for the future with the project, and I wanted some community feedback.

          There are loads of great wallets out there, but I was considering expanding stratiom to have traditional wallet features along with the p2p payments.

          On the other hand, since so many exist, I was also considering continuing with my initial idea of making a closed source payment system with some additional features.

          Ultimately I feel that the wallet may get more general use, while the closed source payment system would serve to better further the long term goals of Stellar, even though it may see considerably less initial use than a wallet. This brings me to why I wanted community feedback, I'd like to know what people think would better benefit the stellar ecosystem, and whether a longer term project like the payment system would be a better route than a traditional wallet.

            Mitchzof I've been following this project since you began. Here are my questions:

            • why did you begin building this? (whats your goal)
            • how would you summarise what you have built compared to a normal wallet? (is pathfinding the only advantage?)
            • what experience do you have with financial services?

              willd Hey, I appreciate the response!

              1. I got inspiration for the project from the SBC projects list, though I ultimately felt this was a great opportunity to build something with real potential to expand the Stellar ecosystem and enable people to make and manage payments. I found the idea behind the P2P payment system to be pretty fascinating as it ultimately allows people to act as the middleman / bank when it comes to small transactions and was hoping to see this used even by people unfamiliar with Stellar.
              2. I'd summarize what I've built as quite a bit different from a normal wallet. It interacts with Stellar much in the same way that normal wallets do, though it's functionality on the user's end is completely different. What it does is allow users to make specific types of fiat payments and manage debts via a Stellar account, whereas standard wallets enable users to manage assets held on their stellar account.
              3. I'd say I have a moderate level of experience with financial services. I'm pretty familiar with how most work, though I'm by no means an expert.

              Writing these responses, I feel that building a wallet with P2P functionality adds nothing tangible to the ecosystem as there are so many great wallet options. At the same time, users with a stellar account can easily build from my source and will always be able to make these P2P transactions, while also being able to use a traditional wallet. That said, I care most about a long term project with potential for a more significant impact, which makes me lean towards doing the payment system as it would be something new.

              4 months later

              You working on any other Stellar projects now?