Title
Lumenswap is a swap interface for the Stellar network that allows you to swap assets on the network using a friendly, minimal interface.
Video
Goals
Lumenswap aims to create a simple and minimal platform for swapping assets on the Stellar Network. This allows users to learn about the power and fundamental features of Stellar for moving assets.
The benefit of Lumenswap for the Stellar Network
Having more applications that allow users to move their assets will make it easier for users to work with the network. This, in turn, increases the liquidity of the assets on the network. However, these applications can only achieve their goals if they have beautiful user interfaces and create enjoyable experiences like StellarX and Stellarterm.
Structure
Overall structure
Client -> Lumenswap-> Horizen -> Stellar network
Swap
Here, you can convert your assets. Here’s a more detailed, technical explanation:
Once you submit a swap request (e.g., 1 BTC for 10 ETH), we send the request to the network using Horizon API and perform a path payment strict send operation (with you as both the sender and receiver). Depending on your order size and Stellar’s order books, if the order can be handled, you’ll receive a success message and the swap will be performed. If the network cannot handle your order based on that moment’s order books, you’ll receive the following message:
“Your order is too large to be processed by the network. Do you want to register it as an active order on the network?”
If you approve the message, we’ll run a manage buy operation using Horizon. The order will remain open and active and it’ll be executed to the possible extent. The remainder will remain open and can be managed in the ‘Active orders’ section.
Send
There are two types of requests:
1- Basic send
This is a normal asset transfer to an address on the network exactly like you do in your wallet.
After submitting the send request, it will be sent on the network using Horizon API and a payment operation will be executed to transfer the assets to the specified address. Just like that.
2- Send + Swap
This is perfect for when you want to send one type of asset and have the other end receive another type. This is like hitting two birds with one stone: first a swap and then a send.
Suppose you want to send $200, but the receiver specifies ETH as their preferred asset type. To do this, you need to activate a Send+Swap switch.
As usual, a request is sent to the network using Horizon which involves a path payment strict send operation (with your address as the sender and the entered address as the receiver). If the network can handle the order based on its order books at the moment of request, the operation will be executed and you’ll receive a success message. Otherwise, you’ll receive an error message. In this case, you can increase the tolerance to reduce the minimum received value so that the network can handle the request.
Minimum received
This is the minimum amount of an asset you’ll receive after the swap. The network will always give you the best recommendation, but this specifies the minimum amount.
Set slippage tolerance
With set slippage tolerance you can set the minimum you’ll receive. Higher percentages mean you’ll receive less.
Path
This represents the best path to convert the specified assets based on the order books on the network.
Orders page
This part consists of two sections:
1-Active orders
Here, you can view and delete your open or active orders.
2-Completed orders
Here, you can view the completed orders or trades.
Calculator for the estimated price
Lumenswap calculator uses the last registered orders on the network to estimate asset prices on the network (the calculations are performed using pairs of XLM and specific assets).
Suppose you want to get ETH in exchange for USD. Once you input 1 ETH, you’ll automatically get 200 USD. How are these values calculated?
In the example above, we’ll obtain the USD/XLM price based on the last buy order on the network and determine ETH price based on the last ETH/XLM sell order. The calculated number is then displayed on the interface. Note that this is an estimation and not an exact number.
Note: based on our observations of the order books, the best paths mostly consist of XLM pairs.
For example:
SNT -> LLO
Best path:
SNT -> XLM -> LLO
Connect Wallet
To use Lumenswap, you need to connect your account.
Right now, there are these ways to do this:
1-Private key: To use this method, you should directly enter your private key. The key will be stored locally on your browser and deleted as soon as you log out or refresh the page. (Lumenswap is an open-source application and you can review our source code to make sure everything is normal).
2-Ledger: In this method, you must first have a Ledger hardware wallet, This method is very safe because you can be signing or identity verification without ever exposing your secret key.
3-Freighter: In this method, you must first install the Freighter browser extension, This method is very safe because you can be signing or identity verification without ever exposing your secret key.
4-Albedo: In this method, you must first install the Albedo browser extension This method is very safe because you can signing or identity verification without ever exposing your secret key.
Listening assets
Given the free and distributed nature of blockchains, we designed Lumenswap to let anyone swap any assets. Right now, popular assets with sufficient value are available on the platform.
What features are being developed and will be unveiled in the future?
Add the analytics section:
This section gives you detailed analysis of assets, trades, and pair volumes on the network.
Check out our design prototypes below:
A new model of path selection:
We plan to use aggregations paths to improve path selection. Our team is also developing an artificial intelligence robot for path selection.
Improve UI:
We will make changes in the swap box to improve the user experience and increase your access to page elements.