Skip to content

eq-lab/slender-keeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages