Giter Club home page Giter Club logo

fuse-twap-bot's Introduction

Fuse by Rari Capital: Uniswap V2 TWAP Bot

This repository contains the JavaScript source code for the Fuse Uniswap V2 TWAP Bot. See here for the Fuse dApp, here for the Fuse SDK, or here for the Fuse contracts.

How it works

This bot updates on-chain price data for Fuse pools via TWAPs of Uniswap V2 (and SushiSwap) pairs based in ETH. If you are using prices for which others are not reliably posting TWAPs, you will need to run a bot and a redundancy bot; if others are reliably posting TWAPs, simply run your own redundancy bot for additional security. Note that the more often you update the oracle and the more assets you do so for, the ETH you will spend on gas fees. However, also note that infrequent updates to an asset's price could leave room for attackers to profit via arbitrage at the expense of your users.

Installation

You'll want to run the script on the latest Node.js LTS (tested with v12.16.1) with the latest version of NPM.

Install PM2 (process manager) globally: npm i -g pm2

Install fuse-twap-bot dependencies: npm i or npm install

Usage

Configure your environment in ecosystem.config.js.

Start the rebalancer with PM2: pm2 start ecosystem.config.js (for production usage, add --env production)

Stop with PM2: pm2 stop ecosystem.config.js

Check process status with PM2: pm2 list

Find PM2 logs in ~/.pm2/logs.

License

See LICENSE.

Credits

Fuse's dApp is developed by David Lucid of Rari Capital. Find out more about Rari Capital at rari.capital.

fuse-twap-bot's People

Contributors

davidlucid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.