Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/forestdev1212/flash
https://github.com/forestdev1212/flash
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/forestdev1212/flash
- Owner: forestDev1212
- Created: 2024-06-03T12:42:18.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-06-27T01:55:35.000Z (6 months ago)
- Last Synced: 2024-06-27T04:34:16.673Z (6 months ago)
- Language: Rust
- Size: 334 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flashlight
# Setting up
## Setup Environment
```shell
cp .env.example .env
```Update values in `.env` accordingly
`KEEPER_PRIVATE_KEY`: can be a number array (as in example), or a path to a `keypair.json` as generated by `solana-keygen`. The address of this key requires SOL since it will be the signing authority of all transactions sent by this bot.
## Initialize User
A `ClearingHouseUser` must be created before interacting with the `ClearingHouse` program.
```shell
yarn run dev --init-user
```## Depositing Collateral
Some bots (i.e. trading, liquidator and JIT makers) require collateral in order to keep positions open, a helper function is included to help with depositing collateral.
A user must be initialized first before collateral may be deposited.```shell
# deposit 10,000 USDC
yarn run dev --force-deposit 10000
```# Run Bots
By default, some [Prometheus](https://prometheus.io/) metrics are exposed on `localhost:9464/metrics`.
## Run Filler Bot
```shell
yarn
yarn run dev:filler
```## Run Trigger Bot
```shell
yarn
yarn run dev:filler
```## Run JIT Maker Bot
⚠ requires collateral
```shell
yarn
yarn run dev:jitmaker
```## API
APP
devnet
- https://beta.drift.trade/SOLAPI
mainnet-beta
- https://dlob.drift.trade/devnet
- https://master.dlob.drift.trade/DLOB
- https://drift-labs.github.io/v2-teacher/#orderbook-trades-dlob-server## REFERENCES
- [Overview](https://exercism.org/tracks/rust)
- [rust-jup-ag](https://github.com/mvines/rust-jup-ag)