Frequently Asked Question

How do Zaps work?

Last Updated 6 months ago

We won’t get into the deep technical weeds here but for the curious among you, let’s look at the basic mechanics of how Zaps work.

  1. When you click or tap on the little ⚡ icon in your client (Damus, Iris, Amethyst, etc), the first thing that happens is that the client pings the LNURL server that sits in front of lightning wallet of the person that you’re trying to Zap. The first request goes something like, “Hi there, I would love to give Alice some sats.”
  2. The LNURL server responds and, if Alice’s wallet supports Zaps, it will tell the client so and send/confirm Alice’s public key.
  3. At this point, the client does a little work to put together a Zap request (a kind 9734 note) with data about the profile or note that it would like to Zap, the amount, the relays it should broadcast the note to, and a few other things. This is effectively a request for an invoice from the LNURL server.
  4. The LNURL server responds with the requested invoice.
  5. At this point the client will hand that invoice off to the user’s lightning wallet to be paid. If you are using a wallet like Alby in the browser (and have set a budget) this process can happen very quickly.
  6. Once the user has paid the invoice directly to the wallet of the person they’re zapping, the receiver’s wallet will create a kind 9735 note and then broadcast that to the relays specified earlier in the Zap request.
  7. Relays receiving this note will then be able to tell connected clients about the zap and clients can show the zap to users in their UI.

And this all happens in just a few seconds and costs a tiny fraction of a penny.

Help Topics
  • Nostr protocol / Zaping

Please Wait!

Please wait... it will take a second!