lightning hubにお金が入る理由

原理的には、HTLCを利用したマルチホップの双方向ペイメントチャネルにおいて、中間者が利益を得る仕組みはない。 なぜhubがお金稼ぐみたいに言われているのか調べた。

Multihop payments

そのプロセスはMultihop paymentsをみるのが正確。




自分のノードを介して、他のノードに対する支払いが発生したときに、お金をもらう。 というのが基本。送信先ノードは、それぞれのhubの設定した手数料を見て最適なパスを選択していく。



lncli openchannel -h  
   lncli openchannel - Open a channel to an existing peer.

   lncli openchannel [command options] node-key local-amt push-amt


  Attempt to open a new channel to an existing peer with the key node-key
  optionally blocking until the channel is 'open'.

  The channel will be initialized with local-amt satoshis local and push-amt
  satoshis for the remote node. Once the channel is open, a channelPoint (txid:vout)
  of the funding output is returned.

  One can manually set the fee to be used for the funding transaction via either
  the --conf_target or --sat_per_byte arguments. This is optional.

  NOTE: peer_id and node_key are mutually exclusive, only one should be used, not both.

   --peer_id value        the relative id of the peer to open a channel with (default: 0)
   --node_key value       the identity public key of the target peer serialized in compressed format
   --local_amt value      the number of satoshis the wallet should commit to the channel (default: 0)
   --push_amt value       the number of satoshis to push to the remote side as part of the initial commitment state (default: 0)
   --block                block and wait until the channel is fully open
   --conf_target value    (optional) the number of blocks that the transaction *should* confirm in, will be used for fee estimation (default: 0)
   --sat_per_byte value   (optional) a manual fee expressed in sat/byte that should be used when crafting the transaction (default: 0)
   --private              make the channel private, such that it won't be announced to the greater network, and nodes other than the two channel endpoints must be explicitly told about it to be able to route through it
   --min_htlc_msat value  (optional) the minimum value we will require for incoming HTLCs on the channel (default: 0)