At the beginning, the stats


Personally, if the past year was focused on specializing as a developer in some chosen technologies like Flutter or Vuejs and starting up some personal projects like Hops, or learning Figma as a design tool for prototyping app ideas, 2023 is the year of finally joining the Bitcoin (and Crypto?) ecosystem (some 14 years late some might say, well indeed!).

After some hard lessons learned about self-custody using Celsius, catching up with an ever growing noise and information around the subject was challenging, and making a decision of where to start even more. The decision? Start where all begun, and maybe where all ends (after even more shitcoin noise and energy waste): Bitcoin as a Layer 1 technology, understanding it through the Bitcoin for Developers course at the Saylor Academy and its Layer 2 solution for its scalability problems, the Lightning Network.

So for the moment here I go with a compendium of my notes on the matter, subject to modification in preparation of a future, more complete article.

The idea of the study is to finalize with the publication of an app that contributes to the actual Lightning Network and Bitcoin adoption as a payment method. Probably using payment gateway solutions like Breeze, Alchemy Pay or GoCrypto. The Lightning Beer? ⚡️🍺 And maybe, finally, running my own LN node.

Bitcoin's Lightning Network Notes from a newcomer

  • The Lightning Network is designed to solve Bitcoin’s scalability problems.
  • It was in 2018 that Lightning Labs launched a beta version of its LN implementation into Bitcoin mainnet.
  • On top of that there are rounting fees that go toward nodes validating transactions.
    They generally consist of a flat fee of 2000 satoshis + a Liquidity Fee of 0,4 to 1% depending on the node.
  • There are no miners in the LN, all fees go to operators.
  • Fees in Bitcoin Lightning Network:
    Base Fee: Is the flat fee configured by the node per each transaction routed.
    Liquidity Provider Fee: A fee you can change based on how much liquidity someone is using on your channel. Eg. 1%.
  • To transact with each other, two parties must open a channel.
  • These two parties can transact indefinitely with each other before closing the channel. And the payer/customer can add more BTC to it after it is opened.
  • There a fee required to open and close a Lightning Network channel (needed to start payments).
  • Once the channel is closed all transactions are consolidated into one, which is then sent to the Bitcoin mainnet. This also has a cost associated.
  • Visa has the power to process 40K transactions per second. The Bitcoin Network validates 7. The LightningNetwork has a theoretical throughput of 40 million TPS.

Question? What is the cost of running a Lightning Node? How does its economy work?

  • The mainnet is the arbiter of all transactions. While off-chain protocols like LN have their own ledger, that ledger always integrates back into the mainnet, which is core to the Lightning Network design.

Question? So, a LN node must have funds (liquidity provider) in order to router payments, which adds up to the cost of running a node?

  • In the Lightning Network users must fund their LN Wallet from a traditional Bitcoin Wallet, which involves traditional Bitcoin Network Fees, so new users are using some BTC to interact with the protocol.
  • After funds are in the LN Wallet users must lock-up their BTCs to create a payment channel.
  • If one participant in a payment channel closes it while the other is offline, the former can steal the funds.
  • Bitcoin’s Lightning Network reached 4000 BTC with 18.000 nodes and 85K channels by mid 2022, according to Diego Kolling.
  • The lowest amount of satoshis to transfer in the LN is the mili-satoshi (Diego Kolling).

Running a Lightning Network Node

  • You can loose money as a LN node if you route payments and then need to get them back for a higher fee / cost than what you have just earned for routing. So you have to consider setting up your node fees considering you costs to get the money back from the channel
  • An option to run a LN node is thought running a personal server like Umbrel which comes BTC ready.
  • It can be run on a Raspberry Pi or on a VM like Ubuntu.
  • Minimum storage space recommended is 1TB.
  • It is possible to create a Telegram Bot in order to know the status (online/offline) of your node, as well as transactions received or routed.
  • As a node runner you can also establish a Watchtower with a friend node, in order to defend from malicious attacks. All that can be done before opening channels which is a different stage and risks.
  • Another way to earn more running a Node is to participate in a Lightning Pool, which is a marketplace for lightning channels, connecting those who need liquidity with those who run a node a can provide it.
  • LNDg is a management app for analyzing and automating your Lightning Node (?).

Other resources

  • – A great resource to get started to the use of payments via the Lightning Network. Examples of custodial and non-custodial wallets.
  • – The great panorama of the ecosystem.