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