This project automates the process of minting to treasury for various Aave Pools across multiple networks. It includes scheduled scripts that run daily for L2 networks and weekly for MAINNET, with Telegram notifications for monitoring.
- Gas Efficient: Checks
accruedToTreasurybefore minting, skips reserves with nothing to collect - Multi-Network: Supports 18 networks with automatic legacy gas pricing where needed (METIS, BNB, CELO)
- Secure: Private key stored in separate
.keyfilewith restricted permissions, never exposed in command line output - Monitored: Telegram notifications with detailed summary reports and transaction hashes
-
Clone the repository:
git clone cd dolce_vita_collector -
Install Foundry if you haven't already:
curl -L https://foundry.paradigm.xyz | bash foundryup -
Copy
.env.exampleto.envand fill in RPC URLs and other config:cp .env.example .env -
Create a
.keyfilewith your private key (keeps it out of command line):echo "0xYOUR_PRIVATE_KEY" > .keyfile chmod 600 .keyfile -
Build the project:
forge build -
Set up the automated script and Telegram notifications:
- Ensure the
dolce_vita_collector_with_notifications.shscript is executable:chmod +x dolce_vita_collector_with_notifications.sh - Set up systemd services and timers for daily and weekly runs (see "Automated Runs" section).
- Configure the Telegram bot token and chat ID in the
.envfile.
- Ensure the
-
To fetch reserves for all networks:
make fetch-reserves -
To mint to treasury for a specific network:
make mint NETWORK=MAINNET -
The automated script runs daily for L2 networks and weekly for MAINNET at 8:00 AM UTC.
To set up automated runs, you need to create systemd service and timer files.
-
Create and edit service files:
sudo nano /etc/systemd/system/dolce-vita-daily.service sudo nano /etc/systemd/system/dolce-vita-weekly.service -
Create and edit timer files:
sudo nano /etc/systemd/system/dolce-vita-daily.timer sudo nano /etc/systemd/system/dolce-vita-weekly.timer -
Enable and start the timers:
sudo systemctl daemon-reload sudo systemctl enable dolce-vita-daily.timer dolce-vita-weekly.timer sudo systemctl start dolce-vita-daily.timer dolce-vita-weekly.timer
Refer to the provided service and timer file templates in the systemd directory and adjust paths as necessary.
Note: After cloning the repository, make sure to update the paths in the systemd service files to match the location where you've cloned the project. Replace /home/yourusername/ with the path to your home directory or wherever you've placed the project.
The script sends Telegram notifications for:
- Start of each run
- Summary report with success/failure counts
- Transaction hashes for successful mints
- Error details for failed networks
To manually trigger a run:
./dolce_vita_collector_with_notifications.sh --l2s-only
For a MAINNET run:
./dolce_vita_collector_with_notifications.sh --mainnet-only
Note: Make sure you're in the project directory when running these commands, or use the full path to the script from your home directory:
~/dolce_vita_collector/dolce_vita_collector_with_notifications.sh --l2s-only
or
~/dolce_vita_collector/dolce_vita_collector_with_notifications.sh --mainnet-only
Logs are stored in the logs directory within the project folder:
dolce_vita_collector_log.txt: Contains logs for both daily and weekly runs
When setting up this project, make sure to:
- Update all paths in the scripts and service files to match your system's directory structure.
- Configure your own Telegram bot token and chat ID in the
.envfile. - Adjust the systemd service files to use the correct user and group for your system.
- If you've cloned this repository to a different location, update the paths in the systemd service files accordingly.
The script supports the following networks:
Mainnet (weekly run):
- MAINNET (includes MAIN, LIDO, ETHERFI, HORIZON pools)
L2 Networks (daily run):
- AVALANCHE
- OPTIMISM
- POLYGON
- ARBITRUM
- BASE
- GNOSIS
- BNB
- SCROLL
- METIS
- LINEA
- SONIC
- CELO
- PLASMA
- SONEIUM
- MANTLE
- MEGAETH
- INK
L2 networks are processed in the daily run, while MAINNET is processed in the weekly run.
Note: ZkSync is not supported due to foundry incompatibility with zkEVM.
If you encounter any issues:
- Check the log file for error messages.
- Ensure all environment variables in the
.envfile are correctly set. - Verify that the systemd services and timers are correctly configured and running.
- Check your Telegram bot setup if you're not receiving notifications.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.