Peer Selection



Summary:

The Lightning Network is a payment protocol that operates on top of the Bitcoin blockchain and allows for faster, cheaper transactions. However, it also poses some risks to users in terms of losing funds. If a user's node is down and they have received payments, they may lose some of those payments. If the user is routing payments and their node crashes, they may be liable for some of the routed funds and could lose some of the funds they received. From a safety perspective there are three stages of risk: send only, send and receive, and send and receive and route.To avoid these risks, users must monitor the blockchain for invalid closings of channel states and cannot be offline for more than a few days. The protocol has two settings to limit exposure to routing risk: "max_htlc_value_in_flight_msat" and "max_accepted_htlcs". If these limits would be violated by a route attempting to go to a user, the route simply fails and the payer will have to find another route.Users can also make their outgoing channels private (not sent by node gossip) so that others will not route through them. However, this means they will not be able to receive money on-Lightning or earn any money from routing fees. It has the advantage that users can actually lose Internet connectivity indefinitely with no possibility of loss of funds. However, it is recommended that users accept incoming connections and channels, even if they reject routing attempts, since routing can earn them some amount of money as fees and offset the fees on their own transactions. This also leads to a more mesh-like network. If a user wants to receive funds by Lightning, they must make their channels public and accept incoming channels.


Updated on: 2023-05-24T17:04:50.799436+00:00