Skip to main content
6 votes

HTLC (Hash Time Lock Contract) using bitcoin-qt

The HTLC isn't really a specific type of bitcoin transaction, it is more a specific output script with the required spend conditions. Thus to make an HTLC, you really need to create a custom script ...
meshcollider's user avatar
  • 11.9k
5 votes

How is the construction of atomic swaps improved by Schnorr?

To perform an atomic swap, both assets need to be locked up to ensure the eponymous atomic execution of both payments or neither. Traditionally, this uses a complex output script that has two outcomes....
Murch's user avatar
  • 75.9k
5 votes
Accepted

Would it be possible to do atomic swaps with Monero and Bitcoin?

To do an atomic swap, you essentially need two things: The ability to do 2-of-2 multisignatures. Basically every cryptocurrency supports this, including Bitcoin and Monero, though with varying ...
Andrew Poelstra's user avatar
5 votes
Accepted

Can someone ELI5 to me for Bitcoin Atomic Swaps?

I think this is easier to understand if you abstract a little bit. On a high level, an atomic swap is very simple: the two parties set up transactions such that they can both take their coins be ...
Andrew Poelstra's user avatar
5 votes
Accepted

Why does blockwide signature aggregation prevent adaptor signatures?

There is a simple information theoretic argument: when two parties produce an adaptor signature, one party will learn a secret tweak from the eventually published on-chain signature, by comparing it ...
Pieter Wuille's user avatar
4 votes
Accepted

HTLC (Hash Time Lock Contract) using bitcoin-qt

I haven’t played the whole HTLC thing through, but was starting easy: try to create a redeem script, and the condition shall be, that a hash is checked with „equal verify“. Only play on testnet/...
pebwindkraft's user avatar
  • 5,096
4 votes
Accepted

Will all crypto-currencies exist on the same lightning network?

The Lightning Network can be used across currencies, but each individual payment channel must only correspond to one currency. Furthermore, each currency must use the same inputs and outputs system ...
Ava Chow's user avatar
  • 70.9k
3 votes
Accepted

Simple explanation of how a hash timelock function works with an atomic trade of bitcoin / litecoin trade without a 3rd party?

I am leaving out a few details here, but this will get you thinking on the right path... Alice and Bob have accounts on both the Bitcoin and Litecoin networks. Bob has Bitcoin, but wants Litecoin. ...
jmjatlanta's user avatar
3 votes

Can someone ELI5 to me for Bitcoin Atomic Swaps?

Basically this depends on the knowledge of random number X : Bitcoin TX1 (To redeem: reveal secret number X or refund) A -------> B ----> Altcoin TX2 (To redeem: ...
dark knight's user avatar
  • 2,017
3 votes

How do atomic swaps work when blockchains operate at different rates?

Atomic swaps work with so-called hashed timelock contracts. These lock the value for a specific time except the other party can provide a secret which hashes to the given hash. In Bitcoin (and most ...
noobWithAComputer's user avatar
3 votes
Accepted

Is atomic swaps available for someone reasonably techical right now?

Atomic swaps can be performed, yes, they aren't just a theoretical thing. For example here is a tool on GitHub for creating atomic swap transactions between Decred, Bitcoin Core, Litecoin and a couple ...
meshcollider's user avatar
  • 11.9k
2 votes

How to do atomic swap with bitcoin?

Currently atmoic swaps aren't really done except in really special occasions and with specially crafted transactions. There aren't really services that offer atomic swaps and existing software cannot ...
Ava Chow's user avatar
  • 70.9k
2 votes

How is the construction of atomic swaps improved by Schnorr?

A slightly different take: if you have Schnorr signatures, then you can build payment channels based on aggregated multisignatures. Such payment channels look indistinguishable from regular p2pkh on ...
Mark Lundeberg's user avatar
1 vote

Is atomic swap flawed?

It is a prerequisite for atomic swaps that funds must be staged in outputs under shared control of both trading parties in both networks. This is achieved with a output script construction that has ...
Murch's user avatar
  • 75.9k
1 vote
Accepted

Is there a way to handle scalar multiplication with the Secp256k1 generator to finalize a Bitcoin script in an atomic swap?

If I got your question right, you need to check if someone actually have a scalar s such that s*G == S? If you need to explicitly commit to s, like: <s> OP_ECC_MULL_G <S> ...
Davidson Souza's user avatar
1 vote

Why does blockwide signature aggregation prevent adaptor signatures?

The adaptor signature s' is the real signature s, minus a secret tweak t: s'=s-t The adaptor signature is published together with the elliptic curve points R for the nonce and T for the tweak, which ...
gijswijs's user avatar
  • 295
1 vote

How to do atomic swap with bitcoin?

Some links that may help you do atomic swaps using Hashed Time-Lock Contracts: Doing it with bitcoin-qt: HTLC (Hash Time Lock Contract) using bitcoin-qt Doing it with libbitcoin: http://...
jmjatlanta's user avatar
1 vote

lightning to lightning non custodial swaps

An HTLC always "freezes" funds. It is a smart contract that says "here is the balance and a hash. If you give me the preimage of that hash within time T, the balance is yours. Otherwise I can take it ...
stefanwouldgo's user avatar
1 vote
Accepted

Bitcoin scripts that force disclosure of the private key

I've done some searches and research, and I also got input on #elements channel on bitcoincore slack, so I feel that I can answer these now (EDIT: At first I got confused about CODESEPARATOR method, ...
Dmitry Petukhov's user avatar
1 vote

where can i do a testnet Lightning Network Reverse Submarine Swap?

As of now this is possible with Lightning Labs' Loop. It's a non-custodial reverse submarine swap implementation. You need to build LND with some special flags to enable the feature. Loop is ...
pseudozach's user avatar
1 vote

where can i do a testnet Lightning Network Reverse Submarine Swap?

you can try sideshift.ai or zigzag.io the first one supports testnet but is still invoite only. For zigzag.io I think this service is only offered on mainnet.
Rene Pickhardt's user avatar
1 vote

How to perform atomic swap Bitcoin-Litecoin

You would need to find another party to do the swap. An example: Alice and Bob have accounts on both chains. Alice has Litecoin that she wants to exchange into Bitcoin. Bob has Bitcoin that he wants ...
jmjatlanta's user avatar
1 vote

Trying to get a deeper understanding of atomic swaps

I like the question, but this is maybe not the right forum to get the best answers. It is more or less a Q&A style area, where you should raise a single question, which can easily be answered. ...
pebwindkraft's user avatar
  • 5,096
1 vote

Atomic Swap - What if redeem is done just before expiration

As you stated, setting 2 different expiration times provides safety. My recommendation is to select the network with the longest period before immutability as the first contract, and pick a time that ...
jmjatlanta's user avatar
1 vote

Aborting a three-way swap

a) If Bob aborts before step 2, then Alice will not reveal s. 6T will elapse and Alice will get her BTC back. If Bob aborts after step 2, then Alice will not reveal s, as she has no incentive to do so ...
dionyziz's user avatar
  • 1,012
1 vote

Atomic Swap - Problem?

There is a problem with the transaction favoring a party, and they can use the timeout to their advantage. But it is not as dire as some think. Here is an example: Alice creates a contract on the ...
jmjatlanta's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible