wtogami / peerswap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

PeerSwap is a Peer To Peer atomic swap plugin for lightning nodes.

It allows rebalancing of your channels using btc with your nodes wallet or using l-btc on the Liquid sidechain with an external Liquid installation.

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:

  • Swap-in: trading an onchain-asset for lightning outbound liquidity
  • Swap-out: trading an onchain-asset for lightning inbound liquidity

We have a detailed Spec-draft available for review and reimplementation.

Join our Discord to get support and give feedback

Peerswap Discord

Getting Started

Setup

you can use peerswap with lnd and core-lighting:

To run peerswap as a core-lightning plugin see the core-lightning setup guide

To run peerswap as a standalone daemon with lnd see the lnd setup guide

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

  • What is the difference between BTC and L-BTC Swaps?

    • btc vs l-btc
  • Why should use PeerSwap instead of Loop, Boltz or other centralized swap providers?

    • Centralized swap providers rely on multi-hop payments in order to route the payment over the Lightning Network. This makes them less reliant (and more costly) than direct swaps with peers. PeerSwap is also the only swaping service that allows swaps with liquid bitcoin.
  • What is the difference between splicing and PeerSwap?

    • It is very simple and it already works today without changes to the LN protocol. Splicing also requires a change of the channel capacity. Also only peerswap allows swaps with liquid bitcoin.
  • What is the difference between liquidity-ads and PeerSwap?

    • Liquidity Ads are only for the initial channel creation. PeerSwap allows for rebalancing channels that are already active.
  • Why should I do a swap-in vs opening a new channel?

    • If you want to leave the old channel open, opening a new channel is in fact cheaper than a swap-in. The advantage of a swap-in comes with using liquid, as it allows for new outbound liquidity in 2 minutes.
  • Will there be an easier way to run peerswap with a liquid wallet?

Signet Testing

Core Lightning

For a Core Lightning bitcoin-signetnet / liquid-testnet setup guide see this guide

lnd

For a lnd bitcoin-signetnet / 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 (bar golang).

About

License:MIT License


Languages

Language:Go 97.2%Language:Shell 1.4%Language:Makefile 0.9%Language:Nix 0.4%Language:Dockerfile 0.1%