Skip to content
A mechanism to create automatically rebalancing crypto funds in a decentralized and trust-less mannor.
Jupyter Notebook JavaScript Vue Python CSS HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build/contracts
contracts
designs
images
migrations
notebooks
public
snap-backtest-app
snap
src
test
.dockerignore
.gitignore
README.md
mnemonic.js
nginx.conf
package.json
requirments.txt
truffle-config.js
vue.config.js
yarn.lock

README.md

Snap a fund into existence

A snapFund allows you to create a portfolio of various ERC20 tokens, specifying the percentage ratios you would like to maintain between them.


A mechanism to create automatically rebalancing crypto funds in a decentralized and trust-less manor. Leveraging decentralized exchanges for automated value rebalancing and on chain peer to peer lending platforms to provide passive income for fund holders. The model presented bellow assumes that each user has their own fund and that they manage it in it’s entirety. This use case would be a user who has a collection of different cryptos and wants to specify a fixed ratio between them in value. They dont want to just buy a token from setprotocol or crypto20 as they then have no control over what is within the fund.

The general principle could be extended to a DAO where tokens are issued based on contribution and the DAO controls the parameters of the fund such as its composition and rebalancing period. There are lots of complex things that then must be considered however such as front running the fund, using the fund to buy up your own token and other game theory considerations that are outside the core idea of the hackathon.

Getting Snap running locally

Requirements

Vyper Requirements Pre requisite: python3

  1. Set up a virtual environment
$ pip3 install virtualenv
$ virtualenv -p python3 env
$ source env/bin/activate
  1. Install dependencies
pip install -r requirements.txt

Pre requisite: truffle Pre requisite: ganache Pre requisite: yarn 3. Run yarn

yarn
Testing

To test the contracts, run:

truffle test --migrations_directory migrations_null

To get the front end running locally, run:

yarn serv

Running Snap Backtester App

cd snap-backtest-app
docker build --rm -t backtester-app .
docker run --rm -p 8050:8050 -t backtester-app

For all analyses check ./notebooks/.

Have a balanced time!

You can’t perform that action at this time.