• About
  • FAQ
  • Earn Bitcoin while Surfing the net
  • Buy & Sell Crypto on Paxful
Newsletter
Approx Foundation
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
  • Home
    • Home – Layout 1
  • Bitcoin
  • Ethereum
  • Regulation
  • Market
  • Blockchain
  • Business
  • Guide
  • Contact Us
No Result
View All Result
Approx Foundation
No Result
View All Result
Home Bitcoin

Problem calculating routing fees

Moussa by Moussa
July 4, 2025
in Bitcoin
0
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


I’m trying to compute the routing fees for a lightning network payment of 100,000 msats. The route uses the following sequence of channels (CHAN1 is not shown for privacy reasons):

Related articles

Goldman Sachs Just Put a $100B Treasury Fund on Avalanche Rails

Goldman Sachs Just Put a $100B Treasury Fund on Avalanche Rails

September 29, 2026
Solana Lawsuit Shifts the Spotlight Back to Ethereum: Up Next $5,000?

HBAR Crypto 30% Rally: Nvidia AI Link Lacks Proof, What Now?

September 29, 2026

CHAN1 (base fee: 1000, ppm: 9)
647868x2102x1 (base fee: 0, ppm: 5000)
751905x3128x0 (base fee: 0, ppm: 5000)
751905x3125x0 (base fee: 1000, ppm: 1)

The route that lightning-cli returns is the following:

"route": [
   {
      "id": "0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f",
      "channel": "CHAN1",
      "direction": 1,
      "msatoshi": 101505,
      "amount_msat": "101505msat",
      "delay": 123,
      "style": "tlv"
   },
   {
      "id": "023d70f2f76d283c6c4e58109ee3a2816eb9d8feb40b23d62469060a2b2867b77f",
      "channel": "647868x2102x1",
      "direction": 1,
      "msatoshi": 101505,
      "amount_msat": "101505msat",
      "delay": 89,
      "style": "tlv"
   },
   {
      "id": "0265c45476ef53365755f7076eef987965f308b04dba1d8f74638e75b3164eafdd",
      "channel": "751905x3128x0",
      "direction": 0,
      "msatoshi": 101000,
      "amount_msat": "101000msat",
      "delay": 49,
      "style": "tlv"
   },
   {
      "id": "026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2",
      "channel": "751905x3125x0",
      "direction": 1,
      "msatoshi": 100000,
      "amount_msat": "100000msat",
      "delay": 9,
      "style": "tlv"
   }
]

The second to last channel is routing 101,000 msat, which means that the second to last node (0265c4…) receives 1,000 msats as a routing fee. I don’t understand how this number is calculated.

I thought the correct fee is:
math.ceil(base + 100,000 * ppm) = math.ceil(1,000 + 100,000 * (1/1,000,000)) = math.ceil(1,000.1) = 1,001 msats.

What is the correct formula?



Source link

Share76Tweet47

Related Posts

Goldman Sachs Just Put a $100B Treasury Fund on Avalanche Rails

Goldman Sachs Just Put a $100B Treasury Fund on Avalanche Rails

by Moussa
September 29, 2026
0

Key TakeawaysGoldman Sachs is bringing its $100B FTIXX Treasury fund to Lynq on Avalanche.The move deepens Wall Street’s use of...

Solana Lawsuit Shifts the Spotlight Back to Ethereum: Up Next $5,000?

HBAR Crypto 30% Rally: Nvidia AI Link Lacks Proof, What Now?

by Moussa
September 29, 2026
0

HBAR crypto briefly climbed above $0.130 and is trading near $0.117 today (September 29), up roughly 30% over the previous...

Chainlink Launches CCIP 2.0 With Extra Security Controls For Tokenized Assets

Chainlink Launches CCIP 2.0 With Extra Security Controls For Tokenized Assets

by Moussa
September 29, 2026
0

TL;DR Chainlink has launched CCIP 2.0, a major upgrade to its Cross-Chain Interoperability Protocol. The new version adds optional third-party...

Coljac Café Bitcoin Hub With 40+ Nearby Missouri Merchants

Coljac Café Bitcoin Hub With 40+ Nearby Missouri Merchants

by Moussa
September 29, 2026
0

When I heard of the Coljac Café Bitcoin acceptance, I expected to write a quaint little piece about a small-town...

Is Saylor’s Strategy Dumping Bitcoin? 3,568 BTC Leaves Linked Wallets

Is Saylor’s Strategy Dumping Bitcoin? 3,568 BTC Leaves Linked Wallets

by Moussa
September 29, 2026
0

Key TakeawaysEarlier today, 3,568 BTC ($297M) was flagged leaving Strategy-labeled wallets over 9 hours.Arkham’s Emmett Gallic said the 12 transfers...

Load More

youssufi.com

sephina.com

[vc_row full_width="stretch_row" parallax="content-moving" vc_row_background="" background_repeat="no-repeat" background_position="center center" footer_scheme="dark" css=".vc_custom_1517813231908{padding-top: 60px !important;padding-bottom: 30px !important;background-color: #191818 !important;background-position: center;background-repeat: no-repeat !important;background-size: cover !important;}" footer_widget_title_color="#fcbf46" footer_button_bg="#fcb11e"][vc_column width="1/4"]

We bring you the latest in Crypto News

[/vc_column][vc_column width="1/4"][vc_wp_categories]
[/vc_column][vc_column width="1/4"][vc_wp_tagcloud taxonomy="post_tag"][/vc_column][vc_column width="1/4"]

Newsletter

[vc_raw_html]JTNDcCUzRSUzQ2RpdiUyMGNsYXNzJTNEJTIydG5wJTIwdG5wLXN1YnNjcmlwdGlvbiUyMiUzRSUwQSUzQ2Zvcm0lMjBtZXRob2QlM0QlMjJwb3N0JTIyJTIwYWN0aW9uJTNEJTIyaHR0cHMlM0ElMkYlMkZhcHByb3gub3JnJTJGJTNGbmElM0RzJTIyJTNFJTBBJTBBJTNDaW5wdXQlMjB0eXBlJTNEJTIyaGlkZGVuJTIyJTIwbmFtZSUzRCUyMm5sYW5nJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1maXJzdG5hbWUlMjIlM0UlM0NsYWJlbCUyMGZvciUzRCUyMnRucC0xJTIyJTNFRmlyc3QlMjBuYW1lJTIwb3IlMjBmdWxsJTIwbmFtZSUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1uYW1lJTIyJTIwdHlwZSUzRCUyMnRleHQlMjIlMjBuYW1lJTNEJTIybm4lMjIlMjBpZCUzRCUyMnRucC0xJTIyJTIwdmFsdWUlM0QlMjIlMjIlM0UlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1lbWFpbCUyMiUzRSUzQ2xhYmVsJTIwZm9yJTNEJTIydG5wLTIlMjIlM0VFbWFpbCUzQyUyRmxhYmVsJTNFJTBBJTNDaW5wdXQlMjBjbGFzcyUzRCUyMnRucC1lbWFpbCUyMiUyMHR5cGUlM0QlMjJlbWFpbCUyMiUyMG5hbWUlM0QlMjJuZSUyMiUyMGlkJTNEJTIydG5wLTIlMjIlMjB2YWx1ZSUzRCUyMiUyMiUyMHJlcXVpcmVkJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJ0bnAtZmllbGQlMjB0bnAtcHJpdmFjeS1maWVsZCUyMiUzRSUzQ2xhYmVsJTNFJTNDaW5wdXQlMjB0eXBlJTNEJTIyY2hlY2tib3glMjIlMjBuYW1lJTNEJTIybnklMjIlMjByZXF1aXJlZCUyMGNsYXNzJTNEJTIydG5wLXByaXZhY3klMjIlM0UlQzIlQTBCeSUyMGNvbnRpbnVpbmclMkMlMjB5b3UlMjBhY2NlcHQlMjB0aGUlMjBwcml2YWN5JTIwcG9saWN5JTNDJTJGbGFiZWwlM0UlM0MlMkZkaXYlM0UlM0NkaXYlMjBjbGFzcyUzRCUyMnRucC1maWVsZCUyMHRucC1maWVsZC1idXR0b24lMjIlM0UlM0NpbnB1dCUyMGNsYXNzJTNEJTIydG5wLXN1Ym1pdCUyMiUyMHR5cGUlM0QlMjJzdWJtaXQlMjIlMjB2YWx1ZSUzRCUyMlN1YnNjcmliZSUyMiUyMCUzRSUwQSUzQyUyRmRpdiUzRSUwQSUzQyUyRmZvcm0lM0UlMEElM0MlMkZkaXYlM0UlM0NiciUyRiUzRSUzQyUyRnAlM0U=[/vc_raw_html][/vc_column][/vc_row]
No Result
View All Result
  • Contact Us
  • Homepages
  • Business
  • Guide

© 2024 APPROX FOUNDATION - The Crypto Currency News