Good morning again Chris, I am uncertain if you are aware, but some years ago somebody claimed that 2p-ECDSA could use Scriptless Script as well over on lightning-dev.
* https://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180426/fe978423/attachment-0001.pdf * https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-April/001221.html I cannot claim to follow the math enough to say it is actually secure, but the idea does exist. If this is sufficiently secure, we can fold the Spilman backout into the scriptless script swap as well. * Alice creates secret keypairs A = a * G, A = a * G * Bob creates secret keypairs B = b * G, B = b * G * Alice creates (but does not sign) funding from Alice -> A && B * Bob provides partial signature for A && B -(nLockTime=locktime1)-> Alice to Alice and Alice completes this signature and stashes it. * Bob creates (but does not sign) funding from Bob -> A && B * Alice provides partial signature for A && B -(nLockTime=lockTime2)-> Bob to Bob and Bob completes this signature and stashes it. * Alice and Bob sign and broadcast their funding transactions. * This can safely be done in any order; Bob will refuse to continue with the protocol until it sees Alice funding is confirmed, and will abort if locktime2 is too near. * Alice waits for Bob funding tx to confirm. * Alice provides a 2p-ECDSA adaptor signature for A && B --> Alice; the adaptor signature, when completed, reveals the secret a to Bob. * Bob waits for Alice funding tx to confirm. * Bob provides the partial signature for the given adaptor signature for A && B --> Alice and Alice completes this signature and stashes it. * Alice gives a outright to Bob. * Bob gives b outright to Alice. * Alice spends the A && B output before locktime2. * Bob spends the A && B output before locktime1. I also pointed out the griefing problem in Lightning also applies to SwapMarket. Bob can limit the griefing problem by requiring that locktime2 <= now + 12, and requiring that locktime1 >= now + 60. This means that Alice has to lock its funds for 10 hours if it forces Bob to lock its funds for 2 hours, making it undesirable as an attack on competing makers. This does prevent chaining (no maker is going to accept the outgoing), but if Alice wants chaining it can always use the private key handed over to immediately start a funding tx with another Bob. (This is not a good solution for griefing in the Lightning Network since channels are intended to be reused there, whereas the Spilman channels in CoinSwap exist only to allow funding transactions to confirm in any order onchain, and are used only for the specific swap; in Lightning the forwarding node has an incentive to release the incoming HTLC immediately instead of imposing the incoming wait time since the funding can be reused for a different payment, but in CoinSwap it cannot be reused anyway, so it could just let the incoming timelock lapse instead of releasing that encumbrance as would be done in Lightning.) Regards, ZmnSCPxj _______________________________________________ bitcoin-dev mailing list firstname.lastname@example.org https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev