Skip to content
Learn the Ledger poster: Send One Asset. Deliver Another. Kev and two koala friends watch a payment move from a Send terminal through an XRPL hub to a Receive terminal, with the line Cross-currency payments can convert assets as they move across XRPL.

Lesson 6

Send one asset. Deliver another.

Cross-currency payments can convert assets as they move across XRPL. The conversion completes in full or does not execute.

Say Kev holds XRP, but the taco stall prices his lunch at 5 units of a US dollar token on the XRP Ledger. A cross-currency payment lets Kev spend XRP while the stall receives the 5 tokens it asked for. The conversion and delivery happen in one transaction.

How does the ledger find a route?

A payment path is a route from the asset Kev spends to the asset the stall accepts. The ledger can convert between assets using offers in its built-in decentralised exchange or liquidity in an automated market maker (AMM) pool. One payment can use several paths if a single route can’t supply the full amount. The stall needs to be able to receive the specific token, which for a trust line token typically means having a trust line for the correct issuer.

What if the exchange rate moves?

Kev can set the amount the stall should receive and a maximum amount of XRP he’s willing to spend on the conversion. That cap is called SendMax. If the available routes can deliver all 5 tokens for less than his cap, he spends only what the conversion needs, plus the separate XRP network fee. If there’s too little liquidity or the rate moves beyond his cap, the default payment fails without leaving him partway through the conversion. A failed transaction recorded on the ledger can still incur a network fee.

Can the stall receive less than it asked for?

A standard cross-currency payment delivers the full requested amount or fails. The sender can explicitly enable partial payment, which allows a smaller amount to arrive. A shop that accepts payments should check the validated transaction’s delivered_amount to see what actually arrived before marking an invoice paid.

Kev’s tip: Check what the other person will receive and the most you’re willing to spend. They’re two separate amounts, often in two different assets.

Sources

#XRPLEducationMonth

XRPL Foundation