Coder Social home page Coder Social logo

cymqqqq / itchysats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from get10101/itchysats

0.0 0.0 0.0 15.78 MB

CFDs on Bitcoin.

Home Page: https://itchysats.network

License: MIT License

Shell 0.08% JavaScript 0.21% Rust 85.22% TypeScript 14.29% CSS 0.11% HTML 0.04% Dockerfile 0.02% EJS 0.02%

itchysats's Introduction

WARNING

โš ๏ธ Unmaintained: This project is unmaintained. We've continued the core idea of non-custodial trading with our new project 10101 here: https://github.com/get10101/10101/

WARNING

ItchySats

Bors enabled

CFD trading on Bitcoin - non-custodial, peer-to-peer, Bitcoin only.

Trading on ItchySats is secured by DLCs (Discreet Log Contracts). Here is some material to read up on DLCs and ItchySats' protocol implementation:

  • The ItchySats Roadmap which includes a simplified example of how the protocol works
  • Blogpost by @luckysori of the COMIT team, describing the protocol in detail
  • DLC overview on Bitcoin Optech for information beyond ItchySats

Installation

Bitcoin/Lightning nodes

ItchySats is available on many DIY Bitcoin/Lightning node distributions:

Desktop App

We package ItchySats as an Electron app for Windows and MacOS. The latest release can be found here.

Homebrew (macOS)

We maintain a homebrew tap with the latest version of ItchySats.

brew tap itchysats/itchysats
brew install itchysats

After the initial install, homebrew will take care of keeping ItchySats up-to-date.

Mobile

ItchySats is not available as a full mobile app yet. In the meantime, if you'd like to use ItchySats on-the-go, the best way is to install ItchySats on your bitcoin node and use Tailscale or connect to your node via Tor.

Quickstart: Users / Traders

This guide is for how to use ItchySats as a taker. Currently, ItchySats does not officially support multiple makers. Please note that trade execution is already fully peer to peer, but there is currently only one maker out there. We are working on adding support for maker discovery and trading with multiple makers for a more competitive market.

To open a position:

  1. Open ItchySats.
  2. Unlock ItchySats by typing in the default password (weareallsatoshi - except for Umbrel, where it depends on its seed and is visible in the AppStore).
  3. Choose your own secure password. Don't forget to store it securely; there's no way to reset it without removing the ItchySats database.
  4. Transfer funds into the ItchySats wallet.
  5. Open a long or short position - this will lock the funds in a multisig on chain.
  6. Wait for the price to move.
  7. Close the position - this will spend the locked up funds according to the price.

With the current maker you can close positions at any point in time. Trades are limited to a contract size between 100 and 1000 contracts.

If the market maker is not available you can close by using an independent oracle attesting to the price. Oracle price outcomes can be found here.

Can't find what you are looking for? Check out the ๐Ÿ‘‰ FAQ ๐Ÿ‘ˆ.

ItchySats Wallet

ItchySats includes an internal wallet that is used to sign transactions during the DLC setup. Additionally, when a CFD is closed, your payout is sent to an address owned by this wallet. This wallet is completely under your control. You can withdraw from the wallet at any time.

On Umbrel this wallet is derived from its app seed, so the only thing you have to back up is the Umbrel seed.

When running the binary / docker container a random seed will be used to derive the wallet. Make sure to back up the taker_seed file that can be found in the data directory of the application.

Safety

ItchySats is currently Beta software. We are doing our best to make ItchySats stable, but there could be unexpected bugs that result in positions being closed at an unfavorable point in time. Please be mindful of how much money you transfer to the internal wallet and how much you are willing to risk when opening a new CFD.

Quickstart: Developers

To start the local dev-environment all the components can be started at once by running the following script:

./start_all.sh

Note: Before first run, you need to install all dependencies

The script combines the logs from all binaries inside a single terminal so it might not be ideal for all cases, but it is convenient for quick regression testing.

Pressing Ctrl + c once stops all the processes.

The script also enables backtraces by setting RUST_BACKTRACE=1 env variable.

The maker and taker frontend depend on the respective daemon running.

Starting the maker and taker frontend

We use a separate react projects for hosting taker and maker frontends.

Building the frontends

The latest version of the built frontends will be embedded by cargo inside their respective daemons and automatically served when the daemon starts. Embedded frontend is served on ports 8000 and 8001 by default.

This means that it is highly recommended to build the frontend before the daemons.

./build_frontends.sh

Developing frontend code

If hot-reloading of the app is required, frontend can be started in development mode. Development frontend is served on ports 3000 and 3001 by default.

Taker
cd taker-frontend
yarn install
yarn dev
Maker
cd maker-frontend
yarn install
yarn dev

Linting

To run eslint, use:

cd maker-frontend && yarn run eslint
cd taker-frontend && yarn run eslint

Contact

Feel free to reach out to us on Twitter, Telegram or Matrix.

Contributing

We encourage community contributions whether it be a bug fix or an improvement to the documentation. Please have a look at the contributing guidelines.

itchysats's People

Contributors

bors[bot] avatar dependabot[bot] avatar thomaseizinger avatar luckysori avatar klochowicz avatar da-kami avatar bonomat avatar restioson avatar rishflab avatar 1010tom avatar holzeis avatar delicioushair avatar scratchscratchscratchy avatar lukechilds avatar romanz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.