The main goal of this bot is to avoid being liquidated due to the price volatility of bLuna, by repaying part of your debt when the LTV is too high.
â ī¸ You will need to use your private key to let the bot create and sign transactions. We highly recommend to create a dedicated wallet and we decline all responsibility if you lose any money.
The bot will fetch your current LTV every X seconds (10 per default).
If your LTV is higher than LTV_LIMIT
(43% per default), the bot will try to repay the sum needed to make your LTV back at LTV_SAFE
(35% per default).
- We verify the balance of your wallet to see if you have enough money to repay;
- We verify the balance of your deposit to see if you can withdraw from it to repay;
- We verify if you have any unclaimed reward that we can claim and sell to repay;
- đ§ We verify if you have any token stake in governance that we can unstake and sell to repay (#3).
âšī¸ If we need to claim any rewards, we will sell only the required amount and stake in governance the rest of your token.
If your LTV is lower than LTV_BORROW
(30% per default), the bot will borrow more to reach the LTV_SAFE
(35% per default)`, then it will deposit the amount borrowed.
You will need to have Node.js
installed on your system to run this bot.
We highly recommend you to use volta.sh
or nvm
to manage your Node.js
version.
âšī¸ The bot has been tested with Node.js 16.2.0.
Once you have node
and npm
accessible in your terminal's path, you will need to do the following:
- Clone the repository;
- Install its dependencies (
npm install
); - Copy the
.env.example
file to.env
and fill all values (cp .env.example .env
); - Run the bot with
npm run start
.
âšī¸ We recommend using a tool like
pm2
to run the bot in a background process.
This bot will notify you via a Telegram Bot for any transactions.
You need to create your Telegram Bot to activate this feature. It can be quickly done via the Telegram application.
Once you have your token
and your chat_id
you can define those variables inside the .env
file.
âšī¸ The
chat_id
is your user ID. You can have it when sending/getid
to IDBot.
If you would like to try the bot before running in production, you may want to use the Terra Testnet. You can add fake money to your Testnet Wallet using https://faucet.terra.money/.
We also provide a dry-run option to not execute any transactions and only notify you (#6).