Skip to content

Commit

Permalink
add disclaimer warning about private key discretion, update video to …
Browse files Browse the repository at this point in the history
…match latest changes
  • Loading branch information
chuckbergeron committed Jun 13, 2024
1 parent 4319d67 commit 8346c2c
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PoolTogether v5 Draw Auction Bot - GitHub Actions

### DISCLAIMER: These bots are meant for intermediates & experts to run and modify to their liking. There is a lot of prerequisite knowledge about blockchains, private keys, swaps, and GitHub infrastructure that should be known before running a bot. If anyone ever asks you for your private key _do not give it to them_. Nobody from Generation Software, Pooltime, or PoolTogether will ever ask you for your private key.

This repo contains two simple scripts ([index.ts](/index.ts) and [.github/workflows/cron.yml](/.github/workflows/cron.yml)) to run the Generation Software PoolTogether v5 Draw Auction bot using GitHub Actions.

You can simply fork this repo, enter your own custom environment variables in your newly-forked GitHub Repository's Settings (`Settings` -> `Secrets and variables` -> `Actions` -> `New repository secret`), and enable automated workflow runs.
Expand All @@ -14,9 +16,9 @@ You can simply fork this repo, enter your own custom environment variables in yo

### Installation:

[<img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/video-thumb.jpg" width="50%">](https://www.youtube.com/watch?v=RmJySyZsHNc "Watch the 1-minute installation video")
[<img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/video-thumb.jpg" width="50%">](https://www.youtube.com/watch?v=Dt-ibfZH-LU "Watch the 1-minute installation video")

[Watch the 1-minute video](https://www.youtube.com/watch?v=RmJySyZsHNc), or:
[Watch the 1-minute video](https://www.youtube.com/watch?v=Dt-ibfZH-LU), or:

1. [Fork this repository](#user-content-1-fork-this-repository)
2. [Set your environment variables](#user-content-2-set-your-environment-variables)
Expand All @@ -26,8 +28,6 @@ You can simply fork this repo, enter your own custom environment variables in yo

**Note**: This process is essentially the same for the [Prize Claimer](https://github.com/GenerationSoftware/pt-v5-prize-claimer-gh-action-bot/) and [Liquidator](https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot) bots as well.



---

#### 1. Fork this repository
Expand All @@ -42,21 +42,19 @@ Start by forking this bot to your own new repository - this essentially deploys

[Fork / deploy this bot](https://github.com/GenerationSoftware/pt-v5-draw-auction-gh-action-bot/fork)


#### 2. Set your environment variables

Once the repository has been forked you can update your `Secrets` (under `Settings`) to point to your own API keys. Each bot requires 2 secrets: a private key which will send transactions on your bot's behalf, and a RPC URL such as one from [Infura](https://www.infura.io/) or [Alchemy](https://www.alchemy.com/).

> <kbd><img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/screenshot-settings-1.jpg?raw=true" /></kbd>

> <kbd><img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/screenshot-settings-2-jsonrpc.jpg?raw=true" /></kbd>
`JSON_RPC_URL`: We will need JSON_RPC_URLs for each network you want to use. The following are required for each network you want the bot to run against: `BASE_MAINNET_JSON_RPC_URL`, `ARBITRUM_MAINNET_JSON_RPC_URL`, `OPTIMISM_MAINNET_JSON_RPC_URL`.

> <kbd>
<img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/screenshot-settings-4-privkey.jpg?raw=true" />
</kbd>
> <img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/screenshot-settings-4-privkey.jpg?raw=true" />
> </kbd>
`CUSTOM_RELAYER_PRIVATE_KEY`: We recommend creating a brand new EVM account and only sending a small amount of ETH (less than $100) to it for relaying your bot transactions. In the rare case that the account gets compromised you will only lose whatever ETH is currently in it.

Expand All @@ -66,7 +64,6 @@ Once the repository has been forked you can update your `Secrets` (under `Settin

> <kbd><img src="https://github.com/GenerationSoftware/pt-v5-liquidator-gh-action-bot/blob/main/images/screenshot-settings-5-some.jpg?raw=true" /></kbd>

#### 3. Enable automated workflows

By default, GitHub does not enable automated workflows for newly forked repositories. Navigate to the `Actions` tab to enable workflows on your newly forked repository:
Expand Down Expand Up @@ -96,11 +93,11 @@ Click the name of the run to see the logs. For instance, one of my runs is simpl
In the [.github/workflows/cron.yml](/.github/workflows/cron.yml) file you can update the following variables: `CHAIN_ID`, `MIN_PROFIT_THRESHOLD_USD`, and/or `REWARD_RECIPIENT`. This will allow you to change which chain you are running the bot against, how much profit you want to make per transaction, and who (which EVM EOA account) receives the profits earned.

###### `CHAIN_ID`: Simply the chain ID. You can find most chain ID's on [https://chainlist.org/](https://chainlist.org/)
###### `MIN_PROFIT_THRESHOLD_USD`: This is in $USD, so 0.1 would be $0.10 per transaction
###### `REWARD_RECIPIENT`: Any typical account address, if left blank this will default to the relayer account set by the `CUSTOM_RELAYER_PRIVATE_KEY` variable.

###### `MIN_PROFIT_THRESHOLD_USD`: This is in $USD, so 0.1 would be $0.10 per transaction

###### `REWARD_RECIPIENT`: Any typical account address, if left blank this will default to the relayer account set by the `CUSTOM_RELAYER_PRIVATE_KEY` variable.

## Lastly:

The Draw Auction bot's relayer account needs to be stocked with ETH, to pay gas fees and RNG fees for transactions. We recommend keeping less than $100 in value on the relayer at a time in case your private key were to get compromised.
The Draw Auction bot's relayer account needs to be stocked with ETH, to pay gas fees and RNG fees for transactions. We recommend keeping less than $100 in value on the relayer at a time in case your private key were to get compromised.

0 comments on commit 8346c2c

Please sign in to comment.