Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/forestdev1212/flash


https://github.com/forestdev1212/flash

Last synced: 24 days ago
JSON representation

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/SOL

API
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)