question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

any sender can initiate htlc claim

See original GitHub issue

According to AIP 102 only the recipient of a HTLC lock should be able to initiate the claiming of the locked amount, i.e. the recipientId of the lock transaction and the senderPublicKey of the claim transaction must be equal.

Only a recipient CAN claim the htlc_lock transaction. Meaning htlc_claim senderPublicKey MUST match htlc_lock recipientAddress

Looking at the htlc-claim handler no such check appears to be in place - any senders claim transaction will be accepted and forged (given that the secret is correct).

I’ll try to confirm the above later today.

PS: I’d be happy to submit a PR if the above should be the case.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
spkjpcommented, Nov 8, 2019

Initially the plan was to only allow the recipient to claim. But some concerns were brought up during implementation that it might be too inflexible and better to allow anyone claim the lock similar to refund. So yes, it is by design and the AIP outdated. Will be updated accordingly!

0reactions
datedcommented, Nov 8, 2019

Gotcha! Thanks for the follow up!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hashed TimeLock Contract (HTLC) - Binance Academy
If the recipient forfeits or fails to claim the payment, the funds will be returned to the original sender. The HTLC feature is...
Read more >
Hash Time Locked Contracts (HTLCs) Explained - Liquality Blog
A Timelock adds a “timeout” expiration date to a payment. It requires the intended recipient to claim the funds prior to the expiry....
Read more >
Understanding Hashed Time-locked Contracts (HTLCs)
Timelock: locks out a transaction until a preset or pre-determined time is reached. Neither the sender nor the recipient can access the funds...
Read more >
Cross-L2 Bridge: Hashed Timelock Contract vs Delayed ...
LP B checks if the source contract is correct and finalized, then LP B will create another HTLC with reversed sender/recipient, i.e., sender...
Read more >
lightning network - Why do multihop LN payments start settling ...
In HTLC, after all the parties have locked their funds in the contract, claiming payment happens in a reverse way, starting with the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found