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.
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:
- Download this repo in a folder of your choice:
git clone https://github.com/ickb/bot.git
- Enter into the repo folder:
cd bot
- Install dependencies:
pnpm install
- Build project:
pnpm build
- 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/
- Start matching user limit orders:
export CHAIN=testnet;
pnpm run forcestart;
For questions or comments, please join the discussion via GitHub Issues, the Nervos Nation iCKB channel, or the Nervos Talk thread.
This source code, crafted with care by Phroi, is freely available on GitHub and it is released under the MIT License.