Stellar is a decentralized blockchain platform designed to facilitate fast, low-cost cross-border transactions and enable the issuance and management of digital assets. It was created to address some of the limitations and inefficiencies of traditional financial systems, particularly in the area of remittances and cross-border payments. One element within the Stellar ecosystem is “path payments.”
Path payments, also known as “pathfinding” or “path-based payments,” are a feature within the Stellar blockchain platform that allows users to send a payment from one asset to another through a specified sequence of intermediate assets. This feature leverages the decentralized exchange capabilities of the Stellar network to facilitate the seamless conversion of assets during a transaction.
The Advantage of Stellar Path Payments
Path payments enable a user to initiate a transaction using an asset they currently possess, which is then dynamically transformed into the desired asset by the time it reaches the intended recipient. As this conversion is seamlessly integrated into the transaction process, the sender is not required to directly interact with the target asset. They can maintain a balance in their preferred currency and conduct instantaneous transactions with anyone, regardless of location or currency preference.
For example, consider a scenario where an individual in the United States, limited to holding dollars in their account, intends to send funds to a friend residing in Europe, whose account exclusively accommodates euros. In the absence of path payments, the sender would need to establish a trustline for euros, examine multiple market orders on the Stellar Decentralized Exchange (SDEX) to convert dollars into euros, identify the optimal exchange rate, initiate a purchase order, and subsequently transfer the euros to their friend. This process would demand a significant amount of time and energy, involving the payment of fees on three separate occasions.
Path payment operations streamline the procedure by removing the necessity for the sender to establish a trustline. These operations combine the steps of transfer and conversion into a unified action, resulting in a singular fee. This simplification reduces the intricacy and burden associated with managing trustlines and navigating the Stellar Decentralized Exchange (SDEX). As a result, users can effortlessly capitalize on the diverse array of assets available within the Stellar network.
Stellar Payment Operations
There are two main path payment operations in the Stellar network:
PathPaymentStrictReceive. These operations allow users to initiate path payments on the Stellar network, enabling the automatic conversion of one asset into another through a specified path of intermediate assets. These operations help facilitate seamless cross-asset transactions and conversions on the Stellar platform.
- PathPaymentStrictSend (Paying Path Payment Operation): This operation is used when a user wants to send a specific amount of an asset and have it automatically converted into another asset before reaching the recipient. The sender specifies the amount of the source asset they want to send, the desired destination asset and account, and a path of intermediate assets (if necessary) for the conversion. The source asset is debited from the sender’s account, and the equivalent amount of the destination asset is credited to the recipient’s account, after the specified conversion path is executed.
- PathPaymentStrictReceive (Receiving Path Payment Operation): This operation is used when a user wants to receive a specific amount of an asset, and the sender initiates the payment in a different asset that will be converted into the desired asset during the transaction. The sender specifies the amount of the source asset they are sending, the desired destination asset and account, and a path of intermediate assets (if needed) for the conversion. The source asset is debited from the sender’s account, and the equivalent amount of the destination asset is credited to the recipient’s account, after the specified conversion path is executed.
Both path payment operations involve a series of asset swaps on the Stellar Decentralized Exchange (SDEX), automatically converting the source asset into the destination asset through the specified intermediate assets. These operations streamline the process of asset conversion and enable users to take advantage of the decentralized exchange capabilities of the Stellar network without needing to manually execute each step of the conversion.
Finding a Payment Path
In the context of the Stellar path payment system, a “path” refers to a sequence of intermediate assets that are used to facilitate the automatic conversion of one asset into another during a path payment operation. A path is essentially a route through which the source asset is exchanged for the destination asset, utilizing the available liquidity and order books on the Stellar Decentralized Exchange (SDEX).
When a user initiates a path payment operation on the Stellar network, they can specify a series of assets that act as intermediaries in the conversion process. The path payment system then searches for the most efficient and cost-effective path through the specified assets to convert the source asset into the desired destination asset. Each step along the path involves a trade of one asset for another, allowing for seamless and automated conversion.
For example, consider a scenario where a user wants to send USD and have it converted into EUR for the recipient. If there is no direct trading pair between USD and EUR on the SDEX, a path payment operation could involve an intermediate asset, such as XLM or another well-traded asset. The path might look like this:
USD (source asset) -> XLM (intermediate asset) -> EUR (destination asset)
In this case, the path payment system would identify the optimal path for converting USD to XLM and then from XLM to EUR. The system takes into account factors such as available liquidity, order book depths, and exchange rates to execute the conversion in a way that minimizes slippage and costs.
Stellar Payment Path Execution
Once the optimal path is determined by your wallet, a transaction is meticulously structured around it and then submitted to the network. The designated amount for sending is subtracted from the source account, while the corresponding sum is added to the recipient’s account. This process essentially resembles a momentary, interest-free loan. Subsequently, the orders responsible for crafting the chosen path are executed to satisfy the buying and selling prerequisites necessary for the conversion of the transmitted asset. This serves as the mechanism through which the aforementioned “loan” is repaid.
It is important to highlight that this sequence of actions operates in an atomic manner, signifying that each step occurs instantaneously. Should any aspect of the above procedure encounter a setback, the entire transaction faces failure. In such instances, no credits or debits take place, and the orders remain unfilled.
Stellar Path Payments vs. Circle
Stellar is a decentralized blockchain platform designed to facilitate cross-border transactions and enable the issuance and management of digital assets whereas Circle is a financial technology company that offers various blockchain and cryptocurrency-related services and products. Circle is best known for its role in creating and managing the USD Coin (USDC), which is a stablecoin pegged to the US dollar. USDC is designed to provide stability and is often used in cryptocurrency trading and transactions.
Stellar only operates as a decentralized network but has a primary use case of enabling fast and low-cost cross-border payments. Stellar path payments can be especially advantageous when combined with stablecoins
Suppose a user wants to send USD to a recipient who prefers to receive EUR. By using stablecoins pegged to USD and EUR on the Stellar network, the sender can initiate a path payment operation that automatically converts their USD stablecoins into EUR stablecoins, all within a single transaction. This eliminates the need for multiple manual conversions and intermediaries, streamlining the process and reducing costs.
Stellar Path Payments is well-suited for use in remittance platforms and has been designed with this specific purpose in mind. Stellar’s fast and low-cost transaction capabilities, along with its focus on cross-border payments and financial inclusion, make it a viable option for remittance services.
My company offers services related to payment systems architecture, including Stellar Path Payments. Be sure to reach out should you have any questions.
Otherwise, you can book a meeting here.
About Adam Tracy
Adam Tracy is a payments expert and entrepreneur who specializes in payment systems, blockchain technology, digital currencies, and other emerging technologies. He is the founder of Blockrunner, LLC that provides consulting services to clients in the blockchain, payments and cryptocurrency arenas.
Tracy has been involved in the payments industry as an attorney, consultant and entrepreneur since 2005, while he was become an expert in blockchain and cryptocurrency since its advent in 2013. Tracy has worked with a wide range of clients, including startups, established businesses, and investor – both in the United States and worldwide. He has advised clients on a wide range of compliance, legal and operational issues related to payment transfer systems, crypto token generation and architecture, cryptocurrency exchanges, regulatory licensing, smart contracts, and other blockchain applications.
In addition to his consulting work, Tracy has founded several companies in the payments, blockchain and cryptocurrency space, including a digital asset hedge fund, licensed electronic money institution and a blockchain-based tokenization platform. He is also a proponent of decentralized finance (DeFi) and has been involved in various DeFi projects.
Tracy is also a frequent speaker and writer on blockchain and cryptocurrency topics. He has been featured in a wide range of publications, including Forbes, Hollywood Reporters, CNBC, Reuters, CoinDesk, and Bitcoin.com.
Find Adam: https://linktr.ee/adamtracy
Blockrunner, LLC., is a financial services match-making marketplace and consulting company. We are not a bank, FI/NBFI, Payment Service Provider, deposit taking institution, trust, or money services business of any kind. We are not regulated by any financial regulator. Banking, Payment, Processing, and Licensing services are provided by our participating members. This website is for informational purposes only and does not constitute legal advice. If you need legal advice, please consult a licensed attorney in your jurisdiction.