Skip to content

ickb/bot

Repository files navigation

iCKB/Bot

Currently the Bot tries to minimize the amount of iCKB holdings, actively looking to convert them to CKB. This is to maximize the CKB liquidity that the bot can offer in case of a iCKB to CKB liquidity crunch, such as when the redemptions overcome the short term availability of mature deposits.

Rules of thumb:

  • Distribute liquidity across multiple isolated bots (each holding only a fraction) to keep potential hack losses manageable.
  • Each bot liquidity must be at least 130k CKB.

Docs

The docs directory aims to host comprehensive documentation outlining the inner workings of the iCKB Fulfillment Bot. As a living document, it will be continuously updated to reflect the Bot’s evolution and ongoing improvements:

Run the limit order fulfillment bot on testnet

  1. Download this repo in a folder of your choice:
git clone https://github.com/ickb/bot.git
  1. Enter into the repo folder:
cd bot
  1. Install dependencies:
pnpm install
  1. Build project:
pnpm build
  1. Define a env/testnet/.env file, for example:
CHAIN=testnet
BOT_PRIVATE_KEY=0x-YOUR-SECP256K1-BLAKE160-PRIVATE-KEY
BOT_SLEEP_INTERVAL=60

Optionally the property RPC_URL can also be specified:

RPC_URL=http://127.0.0.1:8114/
  1. Start matching user limit orders:
export CHAIN=testnet;
pnpm run forcestart;

Questions

For questions or comments, please join the discussion via GitHub Issues, the Nervos Nation iCKB channel, or the Nervos Talk thread.

Licensing

This source code, crafted with care by Phroi, is freely available on GitHub and it is released under the MIT License.

About

A bot that fulfills iCKB limit orders

Resources

License

Stars

Watchers

Forks