This repo contains three components to mine for the Uniswap V4 address:
- Modified version of create2crunch
- Server instance to collect logs and forward salts to tg
- Script to bid on vastai instances
This service will collect logs from all your vastai boxes. It will only forward the highest salt to tg.
-
Setup a tg bot using botfather + tg channel
-
Host server using railway
cd log-aggregator
railway init
railway up
You will need to supply the env vars
BOT_TOKEN
andCHANNEL_ID
on your railway dashboard (how to get your CHANNEL_ID)
Modified create2crunch that scores addresses based on Uniswap's challenge criteria. I one shotted a prompt, it looked good, and is most likely not the optimal approach.
Head to cloud.vast.ai/templates/edit. You can use the docker image mousless/fourfourfourfour
to skip building it yourself.
Fill in the on-startup Script
section with the following
for i in $(seq 0 $(($(clinfo | awk '/Platform Name/ {pname=$3} /Number of devices/ {if (pname ~ /NVIDIA/) {print $4}}') - 1))); do
nohup /home/target/release/fourfourfourfour \
0x48E516B34A1274f49457b9C6182097796D0498Cb \
0x0000000000000000000000000000000000000000 \
0x94d114296a5af85c1fd2dc039cdaa32f1ed4b0fe0868f02d888bfc91feb645d9 \
$i \
$YOUR_RAILWAY_ENDPOINT_URL_HERE \
> "log_$i.txt" 2>&1 &
done
Note: the zero address is being used in the salt meaning there is no frontrunning protection
Note: replace
$YOUR_RAILWAY_ENDPOINT_URL_HERE
with your log-aggregator's endpoint
vastai offers interruptible boxes at a much lower price compared to renting. This is a simple script to periodically place bids on RTX 4090s (up to $0.2/h).
cd bidder
railway init
railway up
You will need to supply the env vars
VAST_API_KEY
andVAST_TEMPLATE_HASH
on your railway dashboard.