Published on: 2015-11-24T23:04:31+00:00
In this discussion, Ryan Grant suggests a thought experiment of utilizing Lightning for crowdfunding. However, he realizes that it is not necessary to do so. He proposes that individuals who hold coins on the Bitcoin blockchain can sign their part of the transaction for free, and only the initiator needs to pay a transaction fee. The conversation then delves into the concept of extending the protocol to enable payments to anything, known as "Atomic swap to X. "The challenge with swapping onto the blockchain is the need for a timeout mechanism. To address this, a transaction can be created with a small output using a scriptPubkey format of "pay to me, or after pay to anyone." This can serve as one input to the crowdfunding transaction. After the timeout, anyone can double-spend and invalidate the crowdfunding transaction, effectively covering the expected transaction fee and generating free money.The discussion concludes with Rusty, the author, signing off with "Cheers. "Further exploration reveals that conducting a thought experiment in Lightning is deemed pointless. However, anyone holding coins on the Bitcoin blockchain can make a pledge without incurring any costs for signing their portion of the transaction. Only the initiator is responsible for paying the transaction fees.For instance, Alice plans to pledge to Bob's crowdfunded project using a one-input, one-output, anyone-can-pay transaction valid for one month. Bob has shared his address linked to an open channel on the Lightning Network, and Alice has received Bob's hashed preimage R.To facilitate the transaction, Alice will utilize an intermediary node operated by Hubab. However, Alice requires a special Lightning protocol option to indicate that only the final hop should be rewritten and signed as anyone-can-pay, while all other anyone-can-pay donors contribute to the same output.To resolve this issue, Alice can send Hubab a regular channel transaction using the HTLC (Hashed Time-Locked Contract) to cover the expenses and fees, and subsequently provide Hubab with specific instructions on how to create a SIGHASH_ANYONE_CAN_PAY for Bob using the HTLC.Once Bob receives the pledge transaction from Alice, it should not be revoked until the anyone-can-pay output is claimed. Bob's crowdfunding software will combine the scriptPubKeys of the pledges delivered by Hubab, along with their HTLCs, to claim the anyone-can-pay output and release R.However, it is important to note that crowdfunding events may tie up funds for an extended period, leading Lightning Network nodes to adjust their fees accordingly. Additionally, there is a need for an update_revoke_pledge_htlc mechanism to revoke accepted pledges that have not yet expired or caused other errors.If Hubab needs to route further to Carol, she must have knowledge of more than just her handoff address, including whether the next destination is final.Lastly, when signing the SIGHASH_ANYONE_CAN_PAY transaction, Hubab (or Carol) must select an input matching the exact amount.Overall, while there are complexities involved in crowdfunding with the Lightning Network, the described routed option presents a viable solution.
Updated on: 2023-07-31T18:40:26.113189+00:00