Catamaran Swaps
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921544/catamaranswap3.jpg)
Trustless swaps between Bitcoin chain and Stacks chain
Friedger Müffke - 16 Sep 2021 - Blockchain Brussels - Citizen Corner
Bitcoin
Value transfer (and storage)
Mining: Energy to coins
Stacks Blockchain
Background: Naming system and own your internet
More programmable Bitcoins with smart contracts
Mining: Bitcoins to coins
Stacking: Earn BTC with STX
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921591/stxowninternet.png)
Mining
-
Bitcoin (Proof of work)
Miners throw dices until win
Most dices, highest probability to win
-
Stacks (Proof of transfer)
Miners throw Bitcoins until Bitcoin block
Most Bitcoins, highest probability to win
![](https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png)
![](https://assets.coingecko.com/coins/images/1/small/bitcoin.png)
Mining
-
Bitcoin (Proof of work)
Miners throw dices until win
Most dices, highest probability to win
-
Stacks (Proof of transfer)
Miners throw Bitcoins until Bitcoin block
Most Bitcoins, highest probability to win
-
Miami Coin (PoX lite)
Miners throw Stacks until Stacks block
Most Stacks, highest probability to win
![](https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png)
![](https://assets.coingecko.com/coins/images/1/small/bitcoin.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921684/E9uGsGKVIAQDiBO.png)
Stacks miners know about Bitcoin Blocks
credit: @axopoa
Trustless swaps
- Bitcoin
Transfers
- Stacks
Transfers
Contract calls
![](https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png)
![](https://assets.coingecko.com/coins/images/1/small/bitcoin.png)
Trustless swap
- Seller puts STX or assets into escrow
- Buyer sends BTC to seller
- Buyer submits BTC transaction,
escrow sends STX or assets
![](https://assets.coingecko.com/coins/images/1/small/bitcoin.png)
![](https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png)
![](https://assets.coingecko.com/coins/images/2069/small/Stacks_logo_full.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921544/catamaranswap3.jpg)
Verify BTC transaction
- Provide:
- tx
- Merkle proof
- block header
Verify on-chain: - tx is in proof (hash)
- Merkle root is in block header
- block header hash is in blockchain (lookup)
Swap NFTs, FTs
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921544/catamaranswap3.jpg)
Mint by Bitcoin Tx
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921777/catamaranswap4.jpg)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/21782/images/8921843/E_F6WU7XMAQX5lU.jpeg)
deck
By friedger
deck
- 357