Script to compound Raydium Fusion pools
This software is unaudited - use at your own risk.
Warning: This script will use all of the funds in the pool accounts to compound
You must have SOL in your wallet for tx costs.
You must have funds deposited to one of Raydium.io's Fusion Pools.
To do this:\
- go to sollet.io and save the seed phrase in a safe place
- obtain equal amount of the pool tokens, ie 100$ of ATLAS and 100$ of RAY
- go to raydium.io and in the app click "Liquidity", then "Connect" your wallet
- enter valid amounts, then select "Supply"
- once confirmed, add the LP token to the "Fusion" pool
Current config examples are for ATLAS-RAY, ATLAS-USDC, POLIS-RAY and POLIS-USDC, but can modify env for other pools.
- Harvest - receive rewards
- Balance Funds - swap some of the higher value token for lower value token - to maximize LP tokens
- Add Liquidity - obtain more LP tokens
- Stake LP Tokens - add to fusion pool
cp .env.atlasray.example .env.atlasray
- if your address printed is not correct, try another path based on .env comments
- Click "Harvest" with sollet on ATLAS-RAY Fusion Pool, when the popup appears, copy and paste accounts by #:
- This is manual for now - hoping to automate soon
USER_INFO_ACCOUNT - Account #3
USER_LP_TOKEN_ACCOUNT - Account #5
USER_RAY_TOKEN_ACCOUNT - Account #7
USER_COIN_TOKEN_ACCOUNT - Account #11
- Click "Swap" with sollet for ATLAS->RAY, when the popup appears, copy and paste accounts by #:
- This is manual for now - hoping to automate soon
USER_PC_TOKEN_ACCOUNT - Account #17
npm install
npm run atlas-ray
For other pools, replicate these steps with corresponding tokens.
Get path-to-node:
whereis node
Edit cron file
crontab -e
Save this line below to compound OXY-RAY once every hour:
0 * * * * cd <full-path-to-deploy-directory> && cp ./.env.atlasray .env && <path-to-node> --experimental-modules --es-module-specifier-resolution=node <full-path-to-deploy-directory>/src/compound.js 2>&1 | /usr/bin/logger -t atlas-ray
Verify running (after 1 hr passes)
tailf /var/log/syslog -n 3000 | grep atlas-ray