Compound your Algorand staking rewards by automatically sending yourself 0 Algo transactions.
- Install Docker Engine.
- Install Docker Compose.
- Install Docker Desktop.
- Install Windows Terminal.
- Install WSL2.
- Use Ubuntu 20.04 LTS as your distro.
- Install Docker Desktop.
Open a terminal and run:
git clone https://github.com/algorand/sandbox.git
cd sandbox
./sandbox up mainnet
Notes:
- If you're on Windows, open Windows Terminal, select Ubuntu (from the dropdown arrow next to plus icon), and run
cd ~
first. If you clone the repo into the Windows filesystem under/mnt
, you could run into filesystem issues. - If you want to test Algorand Compounder on
testnet
first, replacemainnet
withtestnet
above. Use the Algorand Dispenser to send yourself Algos ontestnet
. IMPORTANT: don't forget to switch back tomainnet
when you're ready to send 0 Algo transactions to your main wallet. You'll need to reset the sandbox. Refer to the Algorand Sandbox documentation for more information. Remember thatmainnet
holds Algos with real value andtestnet
does not. - The Algorand Sandbox can take a while to set up. Wait 30 minutes and come back later. If the Algo Compounder script later reports that your receiving wallet holds no Algos (even after the set up process has finished), wait a while and try again.
git clone https://github.com/randgoal/algo-compounder.git
cd algo-compounder
chmod +x algo-compounder.py
pip3 install -r requirements.txt
There are two wallet addresses: the sender and the receiver. The sender is automatically generated by Algo Compounder. It will be sending 0 Algo transactions to the receiver. The receiver would normally be your main Algo wallet.
After you run Algo Compounder for the first time and your sender wallet address is generated, you need to fund the sender wallet. I recommend 1 Algo. With transactions currently costing 0.001 Algo, you should be able to send 1,000 0 Algo transactions with 1 Algo in the sender wallet.
Algo Compounder will generate a text file and a QR code for the sender wallet address in the script directory. I recommend scanning the QR code with the official Algorand Wallet app (you must run Algorand Sandbox in mainnet
mode). It will also generate a settings.json
file with your private key and passphrase. You should back this up. If you lose it, you will lose access to Algos in the sender wallet.
To run Algo Compounder:
./algo-compounder.py
You can verify your 0 Algo transaction went through at Algo Explorer. Please note the network you're searching (mainnet
, testnet
) to the right of the blue search button.
If you're sending a 0 Algo transaction on mainnet, you should also get a notification on the Algorand Wallet app after about 5 seconds.
Depends on a few variables like your wallet balance and the staking rewards rate.
Edit and run compounding-calculator.py
to find out.
Here are some common examples (as of June 2021):
Algo Balance | Optimal Compounding Times |
---|---|
100 Algos | 4 times per year |
1,000 Algos | 13 times per year |
10,000 Algos | 42 times per year |
Create a cron job:
sudo crontab -e
Add this line to run Algo Compounder every day at 12:00 pm:
0 12 * * * /home/yourname/algo-compounder/algo-compounder.py > /dev/null 2>&1
Replace yourname
with your username. If you're not sure what your username is, run the whoami
command.
- Algorand Sandbox
- Algorand Developer Docs
- Algorand Example Scripts
- Algo Explorer
- Algorand TestNet Dispenser
If this script made you a few Algos and you want to share the love, you can tip me at:
RNDGLCAYOGYXXF4MKBUXWNDP7NBVFQAXIJMS4XFZDG57O4Q3CLO55MOVE4
Tips of any amount are greatly appreciated. Thank you!
Since Algo Compounder can involve cryptocurrency with real value, please don't run this script if you don't understand what it does. NEVER SEND MORE THAN 1 ALGO FROM YOUR MAINNET ALGORAND WALLET TO THE SENDER WALLET. If you lose your private keys or passphrases, send Algo to the wrong address, run Algorand Sandbox on the wrong network, or otherwise lose money, I cannot be held responsible. Refer to the license for more information.