Giter Site home page Giter Site logo

slender-keeper's Introduction

Slender-keeper

Description

The service is designed to automate actions related to managing liquidations in the Slender pool. It regularly checks the status of borrowers and initiates liquidations for borrowers with zero-or-negative net position value (NPV).

Installation

To set up and run this service locally or on a server, follow these steps:

  1. Clone the Repository: Use git clone to clone the repository to your local machine.
git clone https://github.com/eq-lab/slender-keeper.git
  1. Install Dependencies: Navigate to the project directory and install the required dependencies using yarn.
cd slender-keeper
yarn install
  1. Configuration: Configure the service by setting envs (see below) or by updating the necessary parameters in the src/configuration.ts file.
  2. Running the Service: Start the service by running the following command:
yarn start

The service will start monitoring borrowers and executing liquidations.

Usage

This service is designed to automate the process of monitoring of borrowers positions and initiating liquidations in the Soroban ecosystem. Here's an overview of how it works:

  • The service periodically retrieves borrower positions.
  • Borrowers with negative or zero NPV are identified for potential liquidation.
  • The service checks the liquidator's balances.
  • If the liquidator has sufficient balances, it initiates the liquidation process for the borrower.
  • The service handles liquidation errors and updates the database with borrowers accordingly.

Configuration

To configure the service for your specific environment, you'll need to set the following env or set values in the src/configuration.ts file: CONTRACT_CREATION_LEDGER - ledger number at which Slender pool was created
POOL_ID - Slender pool address
POOL_ASSETS - comma separated list of pool asset addresses
XLM_NATIVE - address of XLM contract
SOROBAN_URL - Sorban RPC URL
HORIZON_URL - Horizon RPC URL
NETWORK_PASSPHRASE - Soroban passphrase
LIQUIDATOR_ADDRESS - liquidator's account address
LIQUIDATOR_SECRET - liquidator's secret key
GET_TRANSACTIONS_RETRY - number of retries to get transaction for particular ledgers
GET_TRANSACTIONS_DELAY_MS - delay before retrying

License

This project is licensed under the MIT License - see the LICENSE file for details.

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.