ElementsProject / peerswap

MIT License
109 stars 40 forks source link

peerswap logo

PeerSwap

Disclaimer: PeerSwap is beta-grade software.

We currently only recommend using PeerSwap with small balances or on signet/testnet

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The PeerSwap project is not responsible for how you deploy, distribute, or integrate Peerswap. Please refer to your local system administrator, PaaS provider, or appliance distributor. A few community Docker examples can be found here and here. PeerSwap cannot provide official Docker containers for these reasons:

PeerSwap enables Lightning Network nodes to balance their channels by facilitating atomic swaps with direct peers. PeerSwap enhances decentralization of the Lightning Network by enabling all nodes to be their own swap provider. No centralized coordinator, no 3rd party rent collector, and lowest cost channel balancing means small nodes can better compete with large nodes.

Project Status

PeerSwap is beta-grade software that can be run as a Core Lightning plugin or as a standalone daemon/CLI with LND

As we don't have a proven fee model for swaps yet, we only allow swaps with allowlisted peers.

PeerSwap allows two different types of swaps:

We have a detailed Spec-draft available for review and reimplementation. An interoperable second implementation and discussions toward the next protocol upgrade are currently underway.

Get Involved

Join our Discord to meet other PeerSwap node operators, for support, or to get involved with development as we work toward adding more features and usability improvements.

Peerswap Discord

Follow @PeerSwapLN on Twitter to keep up with project announcements.

Getting Started

Setup

PeerSwap is usable with both Core Lightning and LND implementations:

To run PeerSwap as a Core Lightning plugin, see the CLN setup guide.

To run PeerSwap as a standalone daemon with LND, see the LND setup guide.

To run Elements for L-BTC swaps, see the Elements setup guide.

To run LWK for L-BTC swaps, see the LWK setup guide.

Note
Most of the benefits of PeerSwap come from using L-BTC. Swaps using L-BTC are more private, faster, and avoid the mainchain blockchain during high fee environments that can make swaps uneconomical.

Usage

See the Usage guide for instructions on how to use PeerSwap.

Upgrading

See the Upgrade guide for instructions to safely upgrade your PeerSwap binary.

Further Information

FAQ

Signet Testing

Core Lightning

For a Core Lightning Bitcoin signet / Liquid testnet setup guide see this guide.

LND

For a LND Bitcoin signet / Liquid testnet setup guide see this guide.

Development

PeerSwap uses the nix package manager for a simple development environment. In order to start hacking, install nix, golang and run nix-shell. This will fetch all dependencies (except golang).