Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/guides/stellar-path-payments.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Stellar Path Payments for Stealth Payments"
description: "Use Stellar path payments to send stealth payments across any asset pair with automatic conversion and slippage protection."
---

Stellar path payments are a powerful primitive for cross-asset transfers. When combined with Wraith's stealth payment infrastructure, they enable private sends where the sender holds one asset and the recipient receives another—automatically, atomically, and without manual swaps.

This guide covers how path payments work, when to use them, and how to construct stealth path payments using the Wraith SDK.

---

## What Are Path Payments?

A path payment is a single Stellar operation that sends one asset and delivers a different asset to the recipient. Stellar automatically finds a conversion path through the DEX (decentralized exchange) or liquidity pools.

There are two variants:

| Variant | Sender Specifies | Guarantees | Use Case |
|---------|------------------|------------|----------|
| **Strict-Receive** | Maximum to send | Exact amount recipient gets | You want recipient to receive exactly 100 USDC |
| **Strict-Send** | Exact amount to send | Minimum recipient gets | You want to send exactly 500 XLM, recipient gets whatever that buys |

### Strict-Receive Path Payment

The sender sets:
- **Send max**: Upper bound on what they're willing to spend
- **Destination asset**: What the recipient receives
- **Destination amount**: Exact amount the recipient gets

Stellar finds paths and executes if the cost is ≤ send max.

### Strict-Send Path Payment

The sender sets:
- **Send amount**: Exact amount to deduct from their balance
- **Destination asset**: What the recipient receives
- **Minimum destination amount**: Floor on what the recipient gets

Stellar finds paths and executes if the delivered amount is ≥ minimum.

---

## Path Finding via Horizon

Before building a transaction, you need to discover viable paths. Horizon exposes two endpoints:

### Strict-Receive Paths