any sender can initiate htlc claim
See original GitHub issueAccording 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:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
Gotcha! Thanks for the follow up!