Skip to content

svylabs/swaps

 
 

Repository files navigation

Integral Swaps

This repo contains examples of two SPV-based cross-chain trades, as well as some helpful Python utilites for interacting with them. This is unaudited code and we have not provided usage instructions. This code is presented without license. It is a complex cryptoeconomic system. If you're interested in using or deploying this code, please reach out to us directly via our website.

Stateless Swaps use Stateless SPV to establish Bitcoin payments.

Callback Swaps use a full Bitcoin Relay with SPV proof callbacks. These are the preferred method.

Each have been abstracted to work with multiple asset types, including NoFun, a wrapper intended to manage the complexities of revocable centrally managed tokens.

Building and testing contracts

npm i
truffle compile
truffle test

Linting

npm run lint

Python Setup

  • Install pyenv: link
  • Install pipenv: link

Then run: the following to set up the virtual environment:

$ pyenv install 3.7.0
$ pipenv install

Then interact with the scripts via interpreter

$ pipenv run ipython

About

SPV-based ETH/BTC swaps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 38.9%
  • Python 38.0%
  • JavaScript 22.9%
  • Shell 0.2%