From my understanding a hash timelock function trade or atomic swap involves 2 transactions one separate blockchains. The BTC user named Bob is making a trade with Alice for her LTC. Assuming its a 1 to 1 trade and neither party trusts one another.
User bob makes a btc transaction sending his coin to an address they both control via multi-sig with 2-3. Meaning it needs 2 signatures to in order to make it a valid transaction. This address also has a "time lock" feature of being able to lock the coins for 60 minutes? (is that even a thing?)
Now Alice does the same thing with her LTC by locking it in another address with multi-sig.
They both see that the coins are locked away in these 2 addresses and they will be locked for 60 minutes.
Within this this 60 minutes, alice or bob signs the transaction of one of these addresses.
Once its proved its signed, now they will proceed to the next address to sign.
Now BOTH transactions are signed and is ready to be broadcasted.
I got this far, but I'm unsure if this was the correct way of understanding how an atomic swap might work. Can someone make it even more simple to understand?
My other question is what stops one of them trying to steal both of the coins once the lock is expired?