pull down to refresh
From: https://github.com/supertestnet/utxo-dealership
first the buyer creates an htlc and deposits his coins inside
the buyer should be able to take the coins after the timelock
but the seller should be able to take them with the preimage
next the seller creates an htlc and deposits a coinbase inside
the seller should be able to take the coins after the timelock
but the buyer should be able to take them with the preimage
the buyer's timelock should be longer than the seller's otherwise
the buyer could wait til his own timelock expires, then sweep
the funds from his own htlc using the timelock path, then
sweep the funds from the seller's htlc using the preimage before
the seller's timelock expires, thus taking the seller's money
without the seller being able to reimburse himself
also both htlcs should use the same hash which the buyer knows
when the coinbase matures the buyer should disclose the preimage
to the seller
then the seller should send the buyer a sig so he can withdraw
from the seller's htlc using the multisig path
then the buyer should send the seller a sig so he can withdraw
from the buyer's htlc using the multisig pathreply
https://image.nostr.build/6d3b6408edef51cdc757c32bb355475bc75f14daa20fa776f9076f025c0e415e.gif