GithubHelp home page GithubHelp logo

liqbot's Introduction

liquity-liqbot 🤖

A liquidation bot for Liquity Protocol. Features:

  • Real-time monitoring via WebSockets
  • Smart Trove selection
  • Flashbots support

Prerequisites

  • Node v12 or newer
  • Yarn v1.22.x ("Classic")

Installation

After cloning the repo:

cd liqbot
yarn

Configuration

The installation step creates a configuration file config.ts inside the liqbot directory. See the LiqbotConfig interface for a description of each configuration field.

At the very least, you should configure the following fields:

  • httpRpcUrl
  • wsRpcUrl (optional, but highly recommended)
  • chainId
  • walletKey

If you're starting from the default configuration template, you only need to provide an Alchemy API key in addition to walletKey. If you're not going to use Alchemy for connecting to Ethereum, you'll need to configure httpRpcUrl and wsRpcUrl yourself.

Using Flashbots

If you'd like liqbot to send transactions privately through a Flashbots relay, you'll have to do some additional configuration.

Liqbot uses a helper contract to pay a pre-configured portion of the ETH it receives from liquidation as compensation to the miner. (This portion can be configured using the minerCutRate field).

You'll have to deploy an instance of this contract before you can start using liqbot through Flashbots. After configuring the basics (see above), run the following command:

yarn deploy

If successful, this will print the address of the newly deployed helper contract. Copy and paste this address into the executorAddress field of the configuration file.

Additionally, you'll have to configure a bundleKey. This is an Ethereum private key just like walletKey, but it doesn't need to hold any ETH, and will only be used for identification towards the Flashbots network.

Testing on Görli testnet

You can use config.goerli.ts as an alternate configuration template for testing purposes. Görli is the only testnet currently supported by Flashbots. Be aware that Flashbots only runs a small portion of the validators on the network, so it can take a long time to get a bundle included.

Running

Run this command to start liqbot:

yarn start

It will keep running and logging liquidation attempts until killed with Ctrl+C.

liqbot's People

Contributors

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