mirror of
https://github.com/0x1d/drift-keeper.git
synced 2025-12-14 18:35:20 +01:00
* Introduce instances list to scale bots and add config templating * Use env var for wallet address if not provided as path param * Expose SOL price as metric * Update docs * Add auto-swap * Add Panopticon * implement backoff stategy in autoswap * Add retry logic for withdraw and swap * bump drift-sdk, update ctl.sh and docs * Update filler bot, add tx metrics * Add user-metrics * Update build and dashboard
Auto-Swap
Configuration
- PRIVATE_KEY: Either use the PRIVATE_KEY or PRIVATE_KEY_FILE variable to set your Solana private key
- SWAP_THRESHOLD: min amount of USDC in Drift account to initiate the swap. Default: 10
- SWAP_RATION: ratio to which the swap should be executed. E.g. 0.5 = 50% of USDC will be swapped to SOL. Default: 0.5
- AUTOSWA_INTERVAL: Time in ms of the interval to check if SWAP_THRESHOLD is reached. Default: 60000
Example: .env file:
RPC_ENDPOINT=https://your-rpc-endpoint
PRIVATE_KEY="[123,456,...789]"
#PRIVATE_KEY_FILE=~/.config/solana/bot.json
SWAP_THRESHOLD=2
SWAP_RATIO=0.6
AUTOSWAP_INTERVAL=60000