I don't understand the real difference between source and destination tags.

Imagine we have client A and service B, and service B wants to identify the payment (deposit from A). He says: please send funds to address (0x123 and use destination tag "12345") why he should ask A to use destination tag but not source tag?

Why A can't use source tag '12345', can't B still identify A payment from source tag?


The ledger itself doesn't really care what tags you attach to a payment. They're just used to help exchanges or wallet services know who to credit for a payment.

The standard use of the a destination tag is to identify the recipient of a payment. The idea is that whoever or whatever controls the account that received the payment will look at the destination tag and know how to properly credit the payment.

While the source tag is rarely used, it serves a complementary purpose. Say Jeff has an account at exchange A and wants to send XRP to exchange B. He fills in exchange B's account and a destination tag that exchange B knows means to credit Jeff and asks exchange a to make the payment.

Now, suppose for some reason exchange B can't credit Jeff. Maybe his account his closed. Maybe he got the destination tag wrong. If exchange B doesn't know who to contact, they might try to return the payment. But if they just send it back to exchange A's account, how will they know to credit Jeff?

This is where the source tag comes in. If exchange A uses a source tag that it associated with Jeff's account in the payment, then exchange B can use that as the destination tag if it needs to refund, return, or partially refund the payment. It can use the incoming source tag as an outgoing destination tag and Jeff will get his XRP back.

Not the answer you're looking for? Browse other questions tagged or ask your own question.