Coder Social home page Coder Social logo

silostack / solend-liquidator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from solendprotocol/liquidator

0.0 0.0 0.0 310 KB

open source version of a liquidation bot running against solend

License: MIT License

JavaScript 4.20% TypeScript 94.80% Dockerfile 1.00%

solend-liquidator's Introduction

Solend-liquidator-bot

open-source version of a liquidation bot running against Solend

Overview

The Solend liquidator bot identifies and liquidates overexposed obligations. Solend awards liquidators a 5% bonus on each liquidation. See Solend params for the most up-to-date parameters on each asset. This repo is intended as a starting point for the Solend community to build their liquidator bots.

Usage

A file system wallet funded with SOL, USDC, ETH, SRM BTC is required to liquidate obligations. Users will need to manually rebalance wallet whenever a token is depleted.

  1. Install docker engine and docker-compose

  2. Update file system wallet path in docker-compose.yaml.

secrets:
  keypair:
    file: <PATH TO KEYPAIR WALLET THAT WILL BE LIQUIDATING UNDERWATER OBLIGATIONS>
  1. Build and run liquidator for all pools
docker-compose up --build

To run liquidator in background:

docker-compose up --build -d

FAQ

  1. How to target a specific market? The liquidator by default checks the health of all markets (aka isolated pools) e.g main, turbo sol, dog, invictus, etc... If you have the necessary assets in your wallet, the liquidator will attempt to liquidate the unhealhty obligation, otherwise, it simply tells you "insufficient fund" and move on to check the next obligation. If you want to target a specific market, you just need to specify the MARKET param in docker-compose.yaml with the market address. You may find all the market address for solend in https://api.solend.fi/v1/config?deployment=production

  2. How to change RPC network By default we use the public solana rpc which is slow and highly rate limited. We strongly suggest using a custom RPC network e.g rpcpool, figment, etc.. so your bot may be more competitive and win some liquidations. Once you have your rpc url, you may specify it in config.ts

{
  name: 'production',
  endpoint: '<YOUR CUSTOM RPC NETWORK URL>',
},
  1. How to tweak throttling? If you have a custom rpc network, you would want to disable the default throttling we have set up by specifying the THROTTLE environment variable in docker-compose.yaml to 0
  - THROTTLE=0 # Throttle not avoid rate limiting

Support

PRs to improve this repo are welcomed! If you need help setting up your liquidator bot, feel free to post your questions in the #dev-support channel within Solend's discord server.

solend-liquidator's People

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.