Blog Article

Fixing Memo-less Payments

Author

Tom Quisel

Publishing date

Faq

Exchanges

Memo

There’s now a simple solution to the “I forgot my memo” problem: exchanges and wallets can require memos for incoming Stellar payments by setting a flag on their account, and they can do it in a few clicks or in a few lines of code.

Some quick background: memos are used on the Stellar network primarily to support Stellar accounts that crypto exchanges provide for their users. If you’ve ever moved Lumens into an exchange like Coinbase, Binance, or CoinBene, you’ve probably seen a screen like this:

Coinbase’s “Receive Stellar Lumens” functionality

How this works: the exchange maintains a single Stellar account to receive deposits for all of its users, and provides a memo ID for each user. When a user wants to make a payment on the Stellar network to their exchange account, they must include the memo ID or the exchange won’t know to credit the account.

This has been a long-standing issue. A payment to an exchange account that’s missing a memo causes anxiety for the user when they think their funds have been lost, and causes headaches for the exchange as they try to track down the payment and handle it properly.

Happily, these issues can be the bugbears of our past. The Stellar community has approved SEP-29, which lays out a solution to the problem. Using data entries, an exchange can mark their account as requiring memos with a single, simple operation. Wallets that upgrade to the latest Stellar SDK will then refuse to let users send memo-less payments to those addresses.

Big thanks to members of the Stellar community for putting heads together on the solution, to the SDF Horizon team for coordinating a quick implementation, and to our community SDK maintainers out there!

For exchanges

This is an incredibly simple change to implement: just add a data entry to your deposits wallet with the key config.memo_required and the value 1.

Here’s a pre-populated Stellar Laboratory link that will set the memo-required flag for an account. To use it:

  • Add a source account
  • Fetch the next sequence number for that account
  • Scroll to the bottom, and hit “Sign in Transaction Signer”
  • On the next page, sign with your secret key
  • Click “Submit to Post Transaction Endpoint.” That’s it!

Here’s how to do it using the JS SDK:


new TransactionBuilder(account, {
 fee: 100,
 networkPassphrase: Networks.PUBNET
 })
 .addOperation(
 Operation.manageData({
 name: "config.memo_required",
 value: "1",
 })
 )
 .setTimeout(30)
 .build()

For wallets

Simply upgrade your frontend and backend to the latest version of the Stellar SDK. Memo checking is on by default in the new SDKs, so wallets that upgrade will gain this protective feature automatically.

The JS, Java, C#, Python, Ruby, and others have support already.