Stan Kladko [ARCHIVE] on Nostr: 📅 Original date posted:2017-12-14 📝 Original message: I see, thank you for the ...
📅 Original date posted:2017-12-14
📝 Original message:
I see, thank you for the explanation.
Now I understand, so if my node is down and I received payments, I
may lose some of my received payments.
But if I route and someone routed large amounts of money through me,
and then my node is down, then may lose these payments too.
Basically, if I am routing, then if my node crashes, I may be liable
for some of the routed funds, in addition losing some of the funds I
received .
So from the safety perspective there are three stages of risk
a) send only
b) send and receive
c) send and receive and route
On Thu, Dec 14, 2017 at 5:11 AM, ZmnSCPxj <ZmnSCPxj at protonmail.com> wrote:
> Good morning Stan,
>
> Money is safe when network is down only if you only pay out of your node.
> Once you receive, it is possible for your counterparty to transmit an
> invalid old state where it owns more money than you do. Then you need to
> monitor the blockchain for invalid closings of channel state, meaning you
> cannot be offline for more than a few days (this timeout is settable in your
> node).
>
> Basically, consider the below situation:
>
> You make a channel to me and load it with 3mBTC. You force the channel to
> be unidirectional, because you might be offline for months.
>
> Stan: 3mBTC, ZmnSCPxj: 0mBTC Initial state
> Stan: 2mBTC, ZmnSCPxj: 1mBTC after you pay me 1 mBTC
> Stan: 1mBTC, ZmnSCPxj: 2mBTC after you pay me 1 mBTC
>
> Now suppose you decide to accept money via this channel. So the channel
> history now becomes:
>
> Stan: 2mBTC, ZmnSCPxj: 1mBTC after I pay you 1 mBTC
> Stan: 3mBTC, ZmnSCPxj: 0mBTC after I pay you 1 mBTC
>
> At this point, I can take back my 2mBTC by replaying the old "Stan: 1mBTC,
> ZmnSCPxj: 2mBTC" state. Normally, this is a bad move on my part, since old
> state is revoked and you can present evidence of fraud on the blockchain
> layer to take the entire channel value as yours, as damages. However, you
> only have a few days where you can present this evidence. If those few days
> pass, then the payment is finalized and I get back the 2 mBTC I paid to you.
>
> The upshot is that if you receive money for any reason (whether for routing,
> or because you are the final payee) you can only be offline for at most a
> few days. Otherwise, you force yourself into unidirectional mode only (you
> can only pay, never receive): unidirectional mode also is bad for you since
> you cannot offset the fees you pay for spending using fees you receive for
> routing.
>
> If you are going to receive money anyway, you might as well enable routing
> also, because that lets you earn some fees (to offset the fees you would pay
> to spend your money). The added risk is low: most routes will either
> successfully reach the destination, or fail outright, within a few seconds,
> freeing the funds back to you again.
>
> The protocol has two settings "max_htlc_value_in_flight_msat" and
> "max_accepted_htlcs" to limit your exposure to routing risk. These limit
> how much of your channel funds can be spent on routing
> (max_htlc_value_in_flight_msat) and the number of routes at a time that
> should be used on that channel (max_accepted_htlcs). If those limits would
> be violated by a route attempting to go to you, the route simply fails and
> the payer will have to find another route.
>
> Regards,
> ZmnSCPxj
>
>
> Sent with ProtonMail Secure Email.
>
> -------- Original Message --------
> Subject: Re: [Lightning-dev] Peer Selection
> Local Time: December 14, 2017 12:10 AM
> UTC Time: December 13, 2017 4:10 PM
> From: stan.kladko at galacticexchange.io
> To: ZmnSCPxj <ZmnSCPxj at protonmail.com>
> lightning-dev at lists.linuxfoundation.org
> <lightning-dev at lists.linuxfoundation.org>
>
> Thank you - this is lots of information !)
> You would also have to make your outgoing channels private (not sent by node
> gossip) so that others will not route through you.
>
> If I would have only a single outgoing channel I would not have to
> make it private ? Correct? There is no way to route through a node
> that has one channel.
>
> Another interesting question is what happens if I have lots of
> channels, but in my software block all routing through my node?
>
> Is there a way for me to block all routing through my node by
> modifying node software but still enjoy all benefits of receiving and
> sending deposits?
>
> As you said, blocking all routing has lots of benefit since money is
> safe if the network is down :-)
>
> Sorry for playing devils advocate - I am just trying to understand it )
>
>
>
> On Wed, Dec 13, 2017 at 3:13 PM, ZmnSCPxj ZmnSCPxj at protonmail.com wrote:
> Good morning,
> If you have a reason to open a channel to an arbitrary node, then other
> nodes have a reason to open a channel to an arbitrary node, which might be
> you. Even if the
> network grows large, that > also means there are more participants who
> might decide, via whatever heuristic, to channel to your node.
> If I am connected to some nodes, but no one connected to me, then all
> of my deposit is used by me only, and is not used by other nodes.
> If I am routing nodes through my node, then it can potentially
> negatively affect availability of my deposit for my own transactions.
> So it seems to me that the best strategy is to connect but accept no
> incoming connections.
> How much real is this problem?
> You would also have to make your outgoing channels private (not sent by node
> gossip) so that others will not route through you. You will not be able to
> receive money on-Lightning (since your channels are private, people who are
> trying to send money to you on-Lightning will not be able to find a route to
> you). You will not earn any money from routing fees (since you are not
> willing to have others use your channels for routing).
> It has the advantage that you can actually lose Internet connectivity
> indefinitely with no possibility of loss of funds, simply because in this
> mode of operation, channels are effectively unidirectional only from you to
> the rest of the network.
> However, I think in the long run, you would prefer to receive funds by
> Lightning also, and so cannot use this kind of operation. Consider that in
> the future, you may get paid your salary or dividends in bitcoin over
> Lightning: your business/employer receives money from its customer over
> Lightning, it sends part of that money to sub-contractors and suppliers, and
> some to you (employee or shareholder). You then spend the money you receive
> as salary/dividends for food and services and other vices you might have,
> which are provided by other businesses which have their own shareholders,
> employees, sub-contractors, and suppliers.
> In such a world, you would have to make your channels public and accept
> incoming channels, and at minimum accept incoming money (even if you reject
> routing attempts). Since routing can earn you some amount of money as fees,
> you probably want to accept at least a few routing attempts at a time to
> earn some fees (and offset the fees on your own transactions). This also
> leads to a more mesh-like network; the "unidirectional mode" where you keep
> all your channels private and only outgoing effectively makes you a
> second-class member of the network (and has higher onchain fees: if you have
> depleted a channel, there is an incentive to keep it open only if you are
> willing to accept routing attempts through you (every open channel is an
> opportunity to route, and a channel depleted on your end is full on the
> opposite end and you can still at least accept transactions toward you),
> otherwise, you are better off closing channels (and incurring fees) so you
> can recover the channel reserve).
> Regards,
> ZmnSCPxj
Published at
2023-06-09 12:48:04Event JSON
{
"id": "d697126130aa8eacfbbf9d07dc2f36426888a73854f4826534d321f095486986",
"pubkey": "bb6a5aab45ee6665cfa35d9cdfbb10ea8cce5d69ef1372d8395f055dd667d022",
"created_at": 1686314884,
"kind": 1,
"tags": [
[
"e",
"81b92590efc5978b0f7574c7b296b0057ffe7b91eab7dae2e0e9c032227845a8",
"",
"root"
],
[
"e",
"b475210bfd93b861d39998d21d8b8d4af42cd4c93995f0caed41650e8bba8fbb",
"",
"reply"
],
[
"p",
"4505072744a9d3e490af9262bfe38e6ee5338a77177b565b6b37730b63a7b861"
]
],
"content": "📅 Original date posted:2017-12-14\n📝 Original message:\nI see, thank you for the explanation.\n\nNow I understand, so if my node is down and I received payments, I\nmay lose some of my received payments.\nBut if I route and someone routed large amounts of money through me,\nand then my node is down, then may lose these payments too.\n\nBasically, if I am routing, then if my node crashes, I may be liable\nfor some of the routed funds, in addition losing some of the funds I\nreceived .\n\nSo from the safety perspective there are three stages of risk\n\na) send only\nb) send and receive\nc) send and receive and route\n\n\n\n\n\nOn Thu, Dec 14, 2017 at 5:11 AM, ZmnSCPxj \u003cZmnSCPxj at protonmail.com\u003e wrote:\n\u003e Good morning Stan,\n\u003e\n\u003e Money is safe when network is down only if you only pay out of your node.\n\u003e Once you receive, it is possible for your counterparty to transmit an\n\u003e invalid old state where it owns more money than you do. Then you need to\n\u003e monitor the blockchain for invalid closings of channel state, meaning you\n\u003e cannot be offline for more than a few days (this timeout is settable in your\n\u003e node).\n\u003e\n\u003e Basically, consider the below situation:\n\u003e\n\u003e You make a channel to me and load it with 3mBTC. You force the channel to\n\u003e be unidirectional, because you might be offline for months.\n\u003e\n\u003e Stan: 3mBTC, ZmnSCPxj: 0mBTC Initial state\n\u003e Stan: 2mBTC, ZmnSCPxj: 1mBTC after you pay me 1 mBTC\n\u003e Stan: 1mBTC, ZmnSCPxj: 2mBTC after you pay me 1 mBTC\n\u003e\n\u003e Now suppose you decide to accept money via this channel. So the channel\n\u003e history now becomes:\n\u003e\n\u003e Stan: 2mBTC, ZmnSCPxj: 1mBTC after I pay you 1 mBTC\n\u003e Stan: 3mBTC, ZmnSCPxj: 0mBTC after I pay you 1 mBTC\n\u003e\n\u003e At this point, I can take back my 2mBTC by replaying the old \"Stan: 1mBTC,\n\u003e ZmnSCPxj: 2mBTC\" state. Normally, this is a bad move on my part, since old\n\u003e state is revoked and you can present evidence of fraud on the blockchain\n\u003e layer to take the entire channel value as yours, as damages. However, you\n\u003e only have a few days where you can present this evidence. If those few days\n\u003e pass, then the payment is finalized and I get back the 2 mBTC I paid to you.\n\u003e\n\u003e The upshot is that if you receive money for any reason (whether for routing,\n\u003e or because you are the final payee) you can only be offline for at most a\n\u003e few days. Otherwise, you force yourself into unidirectional mode only (you\n\u003e can only pay, never receive): unidirectional mode also is bad for you since\n\u003e you cannot offset the fees you pay for spending using fees you receive for\n\u003e routing.\n\u003e\n\u003e If you are going to receive money anyway, you might as well enable routing\n\u003e also, because that lets you earn some fees (to offset the fees you would pay\n\u003e to spend your money). The added risk is low: most routes will either\n\u003e successfully reach the destination, or fail outright, within a few seconds,\n\u003e freeing the funds back to you again.\n\u003e\n\u003e The protocol has two settings \"max_htlc_value_in_flight_msat\" and\n\u003e \"max_accepted_htlcs\" to limit your exposure to routing risk. These limit\n\u003e how much of your channel funds can be spent on routing\n\u003e (max_htlc_value_in_flight_msat) and the number of routes at a time that\n\u003e should be used on that channel (max_accepted_htlcs). If those limits would\n\u003e be violated by a route attempting to go to you, the route simply fails and\n\u003e the payer will have to find another route.\n\u003e\n\u003e Regards,\n\u003e ZmnSCPxj\n\u003e\n\u003e\n\u003e Sent with ProtonMail Secure Email.\n\u003e\n\u003e -------- Original Message --------\n\u003e Subject: Re: [Lightning-dev] Peer Selection\n\u003e Local Time: December 14, 2017 12:10 AM\n\u003e UTC Time: December 13, 2017 4:10 PM\n\u003e From: stan.kladko at galacticexchange.io\n\u003e To: ZmnSCPxj \u003cZmnSCPxj at protonmail.com\u003e\n\u003e lightning-dev at lists.linuxfoundation.org\n\u003e \u003clightning-dev at lists.linuxfoundation.org\u003e\n\u003e\n\u003e Thank you - this is lots of information !)\n\u003e You would also have to make your outgoing channels private (not sent by node\n\u003e gossip) so that others will not route through you.\n\u003e\n\u003e If I would have only a single outgoing channel I would not have to\n\u003e make it private ? Correct? There is no way to route through a node\n\u003e that has one channel.\n\u003e\n\u003e Another interesting question is what happens if I have lots of\n\u003e channels, but in my software block all routing through my node?\n\u003e\n\u003e Is there a way for me to block all routing through my node by\n\u003e modifying node software but still enjoy all benefits of receiving and\n\u003e sending deposits?\n\u003e\n\u003e As you said, blocking all routing has lots of benefit since money is\n\u003e safe if the network is down :-)\n\u003e\n\u003e Sorry for playing devils advocate - I am just trying to understand it )\n\u003e\n\u003e\n\u003e\n\u003e On Wed, Dec 13, 2017 at 3:13 PM, ZmnSCPxj ZmnSCPxj at protonmail.com wrote:\n\u003e Good morning,\n\u003e If you have a reason to open a channel to an arbitrary node, then other\n\u003e nodes have a reason to open a channel to an arbitrary node, which might be\n\u003e you. Even if the\n\u003e network grows large, that \u003e also means there are more participants who\n\u003e might decide, via whatever heuristic, to channel to your node.\n\u003e If I am connected to some nodes, but no one connected to me, then all\n\u003e of my deposit is used by me only, and is not used by other nodes.\n\u003e If I am routing nodes through my node, then it can potentially\n\u003e negatively affect availability of my deposit for my own transactions.\n\u003e So it seems to me that the best strategy is to connect but accept no\n\u003e incoming connections.\n\u003e How much real is this problem?\n\u003e You would also have to make your outgoing channels private (not sent by node\n\u003e gossip) so that others will not route through you. You will not be able to\n\u003e receive money on-Lightning (since your channels are private, people who are\n\u003e trying to send money to you on-Lightning will not be able to find a route to\n\u003e you). You will not earn any money from routing fees (since you are not\n\u003e willing to have others use your channels for routing).\n\u003e It has the advantage that you can actually lose Internet connectivity\n\u003e indefinitely with no possibility of loss of funds, simply because in this\n\u003e mode of operation, channels are effectively unidirectional only from you to\n\u003e the rest of the network.\n\u003e However, I think in the long run, you would prefer to receive funds by\n\u003e Lightning also, and so cannot use this kind of operation. Consider that in\n\u003e the future, you may get paid your salary or dividends in bitcoin over\n\u003e Lightning: your business/employer receives money from its customer over\n\u003e Lightning, it sends part of that money to sub-contractors and suppliers, and\n\u003e some to you (employee or shareholder). You then spend the money you receive\n\u003e as salary/dividends for food and services and other vices you might have,\n\u003e which are provided by other businesses which have their own shareholders,\n\u003e employees, sub-contractors, and suppliers.\n\u003e In such a world, you would have to make your channels public and accept\n\u003e incoming channels, and at minimum accept incoming money (even if you reject\n\u003e routing attempts). Since routing can earn you some amount of money as fees,\n\u003e you probably want to accept at least a few routing attempts at a time to\n\u003e earn some fees (and offset the fees on your own transactions). This also\n\u003e leads to a more mesh-like network; the \"unidirectional mode\" where you keep\n\u003e all your channels private and only outgoing effectively makes you a\n\u003e second-class member of the network (and has higher onchain fees: if you have\n\u003e depleted a channel, there is an incentive to keep it open only if you are\n\u003e willing to accept routing attempts through you (every open channel is an\n\u003e opportunity to route, and a channel depleted on your end is full on the\n\u003e opposite end and you can still at least accept transactions toward you),\n\u003e otherwise, you are better off closing channels (and incurring fees) so you\n\u003e can recover the channel reserve).\n\u003e Regards,\n\u003e ZmnSCPxj",
"sig": "2febac1ba6308dfdf3a4277f7703eeff386f50c6fccf2102bab713c2b00371d428e380f5586037f9ab6d5345e76df0fec0663956a1a00c47a62f71133ed3211e"
}