# Lightning Labs Authors - Understanding Submarine Swaps (Highlights)

## Metadata
**Review**:: [readwise.io](https://readwise.io/bookreview/56237069)
**Source**:: #from/readwise #from/reader
**Zettel**:: #zettel/fleeting
**Status**:: #x
**Authors**:: [[Lightning Labs Authors]]
**Full Title**:: Understanding Submarine Swaps
**Category**:: #articles #readwise/articles
**Category Icon**:: 📰
**URL**:: [docs.lightning.engineering](https://docs.lightning.engineering/the-lightning-network/multihop-payments/understanding-submarine-swaps)
**Host**:: [[docs.lightning.engineering]]
**Highlighted**:: [[2025-11-14]]
**Created**:: [[2025-11-15]]
## Highlights
- To achieve these trustless properties, the on-chain transaction makes use of the same hash time-locked contracts (HTLC) as the Lightning Network. Before on-chain BTC are transferred, the recipient of the Lightning transaction generates a preimage, a random 32-byte secret. This preimage is hashed and used to construct the HTLCs for both on- and off-chain payments. ([View Highlight](https://read.readwise.io/read/01k9zy41z084d87nsf8r7fg0d0)) ^957218641
- The sender can generate a Bitcoin address with the following properties: For a limited time, the funds held in that contract can be swept knowing the preimage and a valid signature from the receiver. After that, they can be claimed using just the signature of the sender. ([View Highlight](https://read.readwise.io/read/01k9zy5ngayzf2xwf9828vvrdm)) ^957218755
- Depending on the exact arrangement, the sender might also ask for a non-refundable Lightning payment upfront, which can be used to cover the transaction fees from entering and exiting the smart contract, as well as compensate for the opportunity cost of funds being locked up for some time period. ([View Highlight](https://read.readwise.io/read/01k9zy7mecbtk5fvs24cm1mp2h)) ^957218832
- After funds have been confirmed to be settled in the smart contract, it is safe to pay the Lightning invoice. ([View Highlight](https://read.readwise.io/read/01ka005grqhmsrdwdvep77prav)) ^957224972