GithubHelp home page GithubHelp logo

bad-debt-backend's Introduction

Bad Debt Backend

This is the backend of the RiskDAO's Bad Debt Dashboard

Install

npm install
npm run build

Required environment variables

Always needed:

  • RPC_URL_{{NETWORK}} (for the network of the runner you want to start)

Needed only if network = ETHEREUM

  • ZAPPER_KEY

RPC_URL_{{NETWORK}}

Examples:

  • RPC_URL_ETH
  • RPC_URL_BSC
  • RPC_URL_CRONOS
  • RPC_URL_MATIC
  • RPC_URL_AVAX
  • RPC_URL_GNOSIS
  • RPC_URL_NEAR
  • RPC_URL_OPTIMISM
  • RPC_URL_MOONBEAM

Run a parser

In the src/runners directory, you can find many .ts files. This files are each responsible for running a protocol parser.

Add a parser for a Compound fork

Adding a new parser for a protocol that is a fork of compound is quite simple.

Let's say the new protocol you're adding is named "Proto"

  • Create a new config file here: src/configs/ProtoConfig.json. This file should contains all required infos.
  • Create a new runner here: src/runners/ProtoRunner.ts, then two cases:
    • if the new protocol does not have any specificities w.r.t Compound: just create an instance of the CompoundParser class
    • if there are any specificities, create a new Parser here: src/parsers/compound/ProtoParser.ts and overrite the functions that need to be in order to add the specificities

Examples of Compound forks without specificities:

  • Sonne Finance,
  • Rari-Capital

Examples of Compound forks with specificities:

  • Aurigami
  • Moonwell

bad-debt-backend's People

Contributors

alfulinku avatar 0xvorian 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.