banner
Hoodrh

Hoodrh

人文、产品、加密探索(非正式研究)
medium
twitter
substack
hoodrh.top

Decentralized protocol Nostr-series 005

This is a series of articles centered around the Nostr protocol, aimed at introducing the Nostr protocol and bringing more people into the decentralized world. In this article, we will introduce a very important feature in the Nostr network: ZAP.

In the previous articles, we have learned the basic usage of the Nostr network, and we also post and browse other people's posts every day. If you have noticed, you may have seen some words mentioned frequently, such as zap, lightning, and invoices. And these words are our topic today, as we explore how economic activities are conducted on the Nostr network.

Simply put, on the Nostr network, we can send a certain amount of sat to others through the Lightning Network, which is equivalent to tipping. Your tip is called a zap. The quantity of zap is measured in sat, which is the price unit of the Lightning Network, a second-layer infrastructure developed on the Bitcoin network for fast transactions (1 USD = 5000 sat).

So let's learn about the method of using zap, which is how you tip others.

How to Use Zap#

  1. First, you need a Bitcoin wallet that supports the Lightning Network. I have downloaded many wallets myself, and I feel that the most user-friendly one for new users is "Wallet of Satoshi," but there may be other choices for more professional users and those with higher requirements for fund security. (A list of Lightning Network-supported wallets will be provided at the end of the article.)

  2. After creating the wallet, an address will be generated. In "Wallet of Satoshi," the operation path is: click "Receive" - click the top Lightning Address, copy the address, and fill it in the "Lightning Address" column on the profile page of the Nostr client and save it.

Get LN Address

  1. At this point, you will see a lightning symbol ⚡️ on your profile page, which is a link to your Lightning address. Others can click on it to zap you, and of course, you can also click on the lightning address on other people's profile pages to send them zap.

Send Zap

PS. If you want to send zap to others but your wallet has no balance, you can transfer Bitcoin to the current Lightning Network address. (As for how to transfer money, how to buy Bitcoin, that's another story, you can search for relevant tutorials.)

The Lightning Network has been mentioned multiple times above, so let's understand what it is.

Lightning Network Brief Introduction#

How It Was Born~#

After Bitcoin was invented by Satoshi Nakamoto, the limitation of block generation speed resulted in a limited number of transactions that could be processed per minute. In order to increase the transaction possibilities of Bitcoin, Pieter Wuille, a Bitcoin developer, proposed an innovative alternative solution called "Segregated Witness" (SegWit), which could be implemented through a soft fork. It does not double the block size limit but improves the efficiency of transaction data, which means that the information capacity of a 1MB block can be doubled. More importantly, Segregated Witness fixes some long-standing code issues, making it easier for Bitcoin to implement an important innovative feature, the Lightning Network.

The Lightning Network technology was created by Thaddeus Dryja and Joseph Poon, and it is believed that it may compete with Visa's benchmark of 65,000 transactions per second in the future. It allows people to jointly sign smart contracts and create bi-directional payment channels with time locks based on the agreed amount in a Bitcoin transaction issued by the payer. Then, they can transfer funds to each other within the predetermined limit. At the same time, through a chain of channels, they can transfer funds to third parties, creating a payment network that can be traced and does not require confirmation on the Bitcoin blockchain. Therefore, in this model, there is no need to pay mining fees, and there is no limit on the number of transactions that can be processed within a certain period of time. Smart contracts prevent fraud, and the Bitcoin blockchain is only used at the settlement layer, responsible for recording the net amount of transactions when a channel is opened or closed. The Bitcoin blockchain serves as the ultimate proof, ensuring that all off-chain Lightning Network transactions are genuine.

Advantages of the Lightning Network#

The Lightning Network is essentially a payment channel network, where the sender's payment can reach any other beneficiary through this channel. Instead of recording each payment as an on-chain transaction for protection in the block, it tracks the balances on each side of the payment channel. Both parties only need to settle on-chain when this relationship ends, and if they want to "close" the channel, it will unlock the balance of their side of the payment channel on the chain. Lightning payments provide us with some privacy protection because payments are not individually recorded on the transaction chain, only the final settlement is.

It was established to address criticisms of Bitcoin regarding transaction speed, cost, and privacy in everyday payments. The Lightning Network is a lightweight version of Bitcoin, with slight architectural differences but still the same old Bitcoin.

And Also~#

The price unit of the Lightning Network, Sat (Satoshi), is also a tribute to Satoshi Nakamoto. The culture of decentralization grows on different people, influencing and inspiring each other. From the cypherpunk movement to the invention of Bitcoin, to today's decentralized social protocol Nostr, we believe that decentralization has its necessity and significance, and we hope that more wonderful things will be created. We look forward to each and every one of us continuing to move forward and create.

Invoices: By the way, when someone says "Please give me your invoice," it actually means the Lightning Network's payment address. You can directly give the other person your payment address or set a payment amount and then provide the address.

More Resources#

If you want to build your own service or product on Lightning, you can refer to this LNURL library: https://github.com/lnurl/luds

This is a column that provides a detailed introduction to the Lightning Network. If you are interested in how the Lightning Network works, I recommend reading it: https://bolt.fun/guide/

Other Lightning Network-Supported Wallets#

1. If you connect through the web 💻#

Alby 🐝 is a Bitcoin wallet extension that exists in your web browser, allowing you to access lightning-fast payments and authentication. Alby securely communicates between web applications and users' Lightning nodes using WebLN, allowing manufacturers to verify their profiles with a click.

🔗 https://getalby.com/

2. Connect from your mobile wallet 📱#

  1. Breez is a mobile Lightning wallet available on iOS and Android. 🔗 https://breez.technology/

  2. Phoenix is available on iOS and Android. 🔗 https://phoenix.acinq.co/

  3. Zeus allows you to connect to and control your Lightning node from your mobile device, making it more suitable for advanced users. Available for iOS and Android. 🔗 https://zeusln.app/

  4. Available on iOS and Android. 🔗 https://blixtwallet.github.io/

  5. Available for iOS and Android. 🔗 https://bluewallet.io/

That's all for today's content. See you in the next issue. 🌱🌸

| Spring is here, go out and enjoy nature.

You can also find me in these places:

Mirror: Hoodrh

Twitter: Hoodrh

Nostr: npub1e9euzeaeyten7926t2ecmuxkv3l55vefz48jdlsqgcjzwnvykfusmj820c

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.