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 of the Nostr network: ZAP.

In the previous articles, we have already learned the basics of using the Nostr network. We post and browse posts every day. If you have been paying attention, you may have noticed that some words are frequently mentioned, such as zap, lightning, and invoices. These words are the focus of today's topic, as we will explore how economic activities are conducted on the Nostr network around them.

Simply put, on the Nostr network, we can send a certain amount of sat to others through the Lightning Network, which is equivalent to a reward. Your reward 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 how to zap, which means giving a reward to someone.

How to Zap#

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

  2. After creating the wallet, an address will be automatically 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 others' profile pages to zap them.

Send Zap

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

Lightning Network (Lightning) has been mentioned multiple times above, so let's find out what it is.

Lightning Network Brief#

How it was born~#

After Bitcoin was invented by Satoshi Nakamoto, the limited block speed resulted in a limited number of transactions that could be achieved per minute. In order to increase the potential for more transactions, Pieter Wuille, a Bitcoin developer, proposed an innovative alternative solution called "Segregated Witness" (SegWit), which can be implemented through a soft fork. It does not double the block size limit, but it improves the efficiency of transaction data, which means that the information capacity of a 1MB block is 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 system composed of second 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 source of 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 a 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 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 created to address criticisms of Bitcoin regarding transaction speed, cost, and privacy in everyday payments. The Lightning Network is a lightweight version of Bitcoin, with some 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 has grown on different people, influencing and inspiring each other. From the cypherpunk organization to the design of Bitcoin, to today's decentralized social protocol Nostr, we believe that decentralization has its necessity and significance, and we hope that more beautiful things will be created. We look forward to each and every one of us continuing to move forward and create.

Invoice: By the way, when someone says "Please give me your invoice," they are actually referring to the Lightning Network's payment address. You can directly give the other person your payment address or set a payment amount and then give them 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 the operation principles of the Lightning Network, I recommend reading it: https://bolt.fun/guide/

Other Wallets that Support the Lightning Network#

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 uses WebLN to securely communicate between web applications and users' Lightning nodes, allowing manufacturers to verify their profiles with a click.

🔗 https://getalby.com/

2. Connecting 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.