Bitcoin Lightning Network Payment Channel & Routing Liquidity Simulator
A deterministic Layer-2 payment channel simulator and multihop graph routing engine. Model 2-of-2 multisig funding balances, directional local vs. remote liquidity exhaustion, multihop Hash Time-Locked Contract (HTLC) fee accrual, Submarine Swap rebalancing economics (Loop In / Loop Out), and unilateral force-close CSV penalty timelocks.
HTLC Forwarding Economics & Channel Balance Analysis
| Channel Metric | Satoshi Amount | USD Equivalent | Channel Share |
|---|---|---|---|
| Local Outbound Sending Capacity | 2,500,000 Sats | $1,625.00 | 50.0% |
| Remote Inbound Receiving Capacity | 2,500,000 Sats | $1,625.00 | 50.0% |
| Single Forward Routing Fee Earned | 88.5 Sats | $0.0575 | 1 Sat Base + 350 PPM |
| Gross Daily Routing Volume Forwarded | 11,250,000 Sats | $7,312.50 | 2.25x Channel Turnover |
| Annual Gross Forwarding Fees Earned | 290,449 Sats | +$188.79 | 5.81% APR |
| Submarine Loop Rebalance (500k Sats) | -19,105 Sats | -$12.42 | Loop Out to Cold UTXO |
| Unilateral Force-Close Breakeven Run | 10,850 Sats | $7.05 | 144 Blocks CSV Timelock |
Routing Sensitivity: PPM Rate vs. Daily Forwarding Volume
Quantitative Formulation: Lightning Network Graph Routing & Channel Physics
The Bitcoin Lightning Network functions as a directed graph of bidirectional payment channels anchored to Bitcoin Layer-1 via 2-of-2 multisignature UTXOs. Channel capacity is strictly conserved: payments do not create new satoshis, but shift ownership between local and remote commitment balances.
Where \(\text{PPM}\) represents Parts Per Million (e.g. \(500\text{ PPM} = 0.05\%\)). Routing nodes maximize yield by operating at high velocity and setting fees dynamically to balance inbound and outbound channels.
When a channel becomes outbound-depleted (\(\text{Local} \approx 0\)), the node can no longer route payments. Node operators execute Submarine Swaps (Loop Out) to atomically exchange off-chain channel liquidity for on-chain UTXO cold storage, incurring base-chain sat/vB fees.
If a peer attempts to broadcast an outdated commitment state, the node operator uses the revocation secret within the CheckSequenceVerify (CSV) timelock window to seize 100% of the channel's funds as a punitive fraud remedy.