P2P Bitcoin CFDs — Give it a try!

ItchySats
3 min readNov 15, 2021
Satoshi wants you — he’s itchy on his sats!

This blogpost points to the beta release 0.3.1 of ItchySats - non-custodial CFD trading secured by DLCs on the Bitcoin blockchain. The blogpost describes the testnet setup — give it a try!

🚧 Try it on testnet — no mainnet coins to be lost — feedback is welcome. Note that there might already be a newer released version: check here. 🚧

Here’s the 👉 mainnet blogpost 👈 and our 👉 roadmap 👈 for more details!

🤔 What what what does that mean?

We assume that you know what Contracts for Difference (CFDs) are. If not please read up 😬🚀

Non -custodial means that there is no middle man. Instead of trading on a platform such as e.g. BitMEX with a user account you trade P2P. No account, just you and your keys. You don’t have to trust a platform to get your funds back —you can always settle on-chain and will receive your money according to the Oracle’s attestation at expiry.

On Bitcoin this becomes possible by using Discreet Log Contracts (DLCs). When setting up the CFD with the other party, multiple spending transactions are generated. Only one spending transaction can be used to unlock the funds based on the signed price by an independent oracle at a later point in time. The basic workflow looks like this:

Our first demo version on testnet only includes taking a long position against a fixed testnet maker (that takes the selling position).

Got questions? Reach out to us on Telegram or Twitter.

📽 Demo Video Time!

The video showcases the daemon logs and the user interface that is served by the daemon locally. Bundling the application to make it available as app is in the works.

Have a look at the transaction that opens the CFD in the video. With the position being open, it’s now time to wait for Bitcoin to go through the roof. Once that happened we’ll post a video on closing the position and claim the funds on chain.

🐳 Docker it up!

Open a terminal and run this command:

docker run --rm -v$PWD/data/taker:/data -p8000:8000 --pull always ghcr.io/itchysats/itchysats/taker:0.3.1@sha256:58557bce9ffc4451d2548faf80c11f84db61a603407a750fd5c23320113369fe --maker=testnet.itchysats.network:9998 --maker-id=f979795740e3b0e9cc6b7151f8f08d6e412cc29893dfb1e71a64459f7e9d6954 testnet

Access the user interface at localhost:8000

The data directory to be used by the container will be created at $PWD/data/taker where $PWD is your current directory.

The docker command will always pull the latest docker container, start it and connect to our public testnet maker that takes the short position.

If the container shuts down because the connection to the maker is lost please just restart it. Automatic connection retries are in the works.

👯 Binary it up

You don’t have docker? Here’s how to run the binary:

  1. Download the Mac Linux binary (or chose on GitHub)
  2. Open a terminal and run the binary with command:
./taker --maker=testnet.itchysats.network:9998 --maker-id=f979795740e3b0e9cc6b7151f8f08d6e412cc29893dfb1e71a64459f7e9d6954 testnet

Access the user interface at localhost:8000

The data directory be created in the current directory with name testnet .

If the taker shuts down because the connection to the maker is lost please just restart it. Automatic connection retries are in the works.

🕊 Feedback

  1. Open an issue on GitHub
  2. Tweet at us
  3. Send us a Telegram

Thanks to @comit-network for supporting us with research & development power! We are one step closer to a decentralized trading.

Cheers,
Scratchy and ItchyMax

--

--

ItchySats

Non-custodial CFD trading directly on Bitcoin. DLCs make it possible. No middleman. No account. Just you and your keys. https://www.itchysats.network/