Mats Jerratsch [ARCHIVE] on Nostr: š
Original date posted:2015-09-22 š Original message: So far my impression was ...
š
Original date posted:2015-09-22
š Original message:
So far my impression was that an attacker that only stops one payment
is just a nuisance, as the system can self-correct. The payer and
payee can set a timeout. If the payment has not arrived after the
timeout the payee can issue a refund back to the payer. The refund
will pay to the same secret hash as the initial payment, and it will
pay an amount that is sufficient such that the payer will receive his
initial payment completely back. (That is, he might end up paying more
refund than actual payment)
When the payer does receive the refund in his channel, he can be sure
that the payment got invalidated. The payee must not reveal the
secret, and even if he does, the funds will just circle back again.
(plus the payee will pay fees for both transactions as a disincentive)
This concept has been around already, at least I read it somewhere.
However, I recently thought about it and got a couple of unresolved
issues:
(1)
How do we resolve the complete chain to remove both, the refund and
the payment completely? Do we just wait until they timeout? This does
not seem very efficient and it would maximise the damage the attacker
would do to the network - that is, he is locking up the payment amount
for N1 nodes on the first route and N2 nodes on the refund route for
the maximum amount of time. I thought about letting the nodes resolve
this on their own, but this would need cooperation from the very node
that isn't relaying the payment in the first place.
Lets assume A wants to pay E, and it chose the route
A->B->C->D->E.
However, C is uncooperative in that he does accept the payment in the
channel he has with B, but he is not relaying it further to D. (for
whatever reason)
So we end up with
A->B->C
Now the timeout hits and E is making the refund payment
E->D->F->B->A
with the same secret hash.
A and B can resolve this, both payments are the same amount (as
described above), so the payments net-worth is zero for both parties.
Now B has a binding payment towards C for X-a bitcoin, and he receives
X+a bitcoin from F. (with some fees a)
>From the point of view of B, this is just a normal payment from F
towards C with 2a in fees. And while B can drop the payment he gets
from F (they can just update the channel and remove the payment if B
agrees), he still has a binding agreement towards the payment to C.
Without C agreeing to drop the payment as well, B isn't in the
position to drop the payment towards F, keeping up the complete chain.
(2)
How do we resolve the case, where the refund gets stuck as well? Let's
assume the same case as above, but this time F is uncooperative too.
We end up with two chains of payments, where both payees don't get the
payment:
A->B->C
E->D->F
where C and F are both uncooperative. From the point of view of A, he
has made a final payment that he cannot revoke on his own. He further
has made the payment due to some contract, to which he expects some
kind of service/good. Waiting out one day till the lightning timeout
might not be an option for A.
The same is true other way round, where E has issued the refund and is
awaiting a new payment. Both parties can not sufficiently prove to the
other party they haven't received the payment, and even if they could,
the initial payment could still route correctly after some delay while
the refund doesn't.
Thinking about it, I guess E could give out multiple refunds via other
routes, until one finally arrives at the payer. As he is obliged to
not reveal the secret anyways, these are just for resolving the issue
at hand. However, this would again maximise the damage, as all
additional refunds would need to timeout. Furthermore, a malicious
payer could just claim he never received any refund, locking up lots
of funds of the payee with very few efforts...
Published at
2023-06-09 12:44:38Event JSON
{
"id": "e1b3da25f1377272710c8689fafca8ea27905dd52f953aac93e16e6e1776837b",
"pubkey": "b8a27d18150405cdfcd44c0dd8db860f5270312300248389bf57ce555c784528",
"created_at": 1686314678,
"kind": 1,
"tags": [
[
"e",
"b5b57978740a799524f789c978ceee5f2bde61143922af5930a7f8658ef6ef76",
"",
"reply"
],
[
"p",
"9456f7acb763eaab2e02bd8e60cf17df74f352c2ae579dce1f1dd25c95dd611c"
]
],
"content": "š
Original date posted:2015-09-22\nš Original message:\nSo far my impression was that an attacker that only stops one payment\nis just a nuisance, as the system can self-correct. The payer and\npayee can set a timeout. If the payment has not arrived after the\ntimeout the payee can issue a refund back to the payer. The refund\nwill pay to the same secret hash as the initial payment, and it will\npay an amount that is sufficient such that the payer will receive his\ninitial payment completely back. (That is, he might end up paying more\nrefund than actual payment)\n\nWhen the payer does receive the refund in his channel, he can be sure\nthat the payment got invalidated. The payee must not reveal the\nsecret, and even if he does, the funds will just circle back again.\n(plus the payee will pay fees for both transactions as a disincentive)\nThis concept has been around already, at least I read it somewhere.\nHowever, I recently thought about it and got a couple of unresolved\nissues:\n\n(1)\nHow do we resolve the complete chain to remove both, the refund and\nthe payment completely? Do we just wait until they timeout? This does\nnot seem very efficient and it would maximise the damage the attacker\nwould do to the network - that is, he is locking up the payment amount\nfor N1 nodes on the first route and N2 nodes on the refund route for\nthe maximum amount of time. I thought about letting the nodes resolve\nthis on their own, but this would need cooperation from the very node\nthat isn't relaying the payment in the first place.\n\nLets assume A wants to pay E, and it chose the route\n\nA-\u003eB-\u003eC-\u003eD-\u003eE.\n\nHowever, C is uncooperative in that he does accept the payment in the\nchannel he has with B, but he is not relaying it further to D. (for\nwhatever reason)\nSo we end up with\nA-\u003eB-\u003eC\n\nNow the timeout hits and E is making the refund payment\n\nE-\u003eD-\u003eF-\u003eB-\u003eA\n\nwith the same secret hash.\n\nA and B can resolve this, both payments are the same amount (as\ndescribed above), so the payments net-worth is zero for both parties.\nNow B has a binding payment towards C for X-a bitcoin, and he receives\nX+a bitcoin from F. (with some fees a)\n\u003eFrom the point of view of B, this is just a normal payment from F\ntowards C with 2a in fees. And while B can drop the payment he gets\nfrom F (they can just update the channel and remove the payment if B\nagrees), he still has a binding agreement towards the payment to C.\nWithout C agreeing to drop the payment as well, B isn't in the\nposition to drop the payment towards F, keeping up the complete chain.\n\n\n(2)\nHow do we resolve the case, where the refund gets stuck as well? Let's\nassume the same case as above, but this time F is uncooperative too.\nWe end up with two chains of payments, where both payees don't get the\npayment:\n\nA-\u003eB-\u003eC\nE-\u003eD-\u003eF\n\nwhere C and F are both uncooperative. From the point of view of A, he\nhas made a final payment that he cannot revoke on his own. He further\nhas made the payment due to some contract, to which he expects some\nkind of service/good. Waiting out one day till the lightning timeout\nmight not be an option for A.\nThe same is true other way round, where E has issued the refund and is\nawaiting a new payment. Both parties can not sufficiently prove to the\nother party they haven't received the payment, and even if they could,\nthe initial payment could still route correctly after some delay while\nthe refund doesn't.\n\nThinking about it, I guess E could give out multiple refunds via other\nroutes, until one finally arrives at the payer. As he is obliged to\nnot reveal the secret anyways, these are just for resolving the issue\nat hand. However, this would again maximise the damage, as all\nadditional refunds would need to timeout. Furthermore, a malicious\npayer could just claim he never received any refund, locking up lots\nof funds of the payee with very few efforts...",
"sig": "50e5bdb33bdb5c5c0018bf541e761517461517cb2fc26aaead7843de54a46cbdaa793988a1a11009088338fd8c936c6f053f0048882f36be3eb7936b8f4c321e"
}