In Osmosis and other cosmos chain you can re-invest your reward with simple scheduled script. This re-invest just delegate your balance to specific validator.
Clone this repository.
git clone https://github.com/alighasemzadeh/reinvest
cd reinvest
cp .env.sample .env
npm install
Set your chain and wallet data in .env
.
To run reinvest just run npm run reinvest
sudo vim /etc/systemd/system/reinvest.service
[Unit]
Description=Reinvest
Wants=reinvest.timer
[Service]
Type=oneshot
WorkingDirectory=/root/restake
ExecStart=npm run reinvest
[Install]
WantedBy=multi-user.target
sudo vim /etc/systemd/system/reinvest.timer
[Unit]
Description=Reinvest
[Timer]
AccuracySec=1min
OnCalendar=*-*-* 21:00:00
[Install]
WantedBy=timers.target
systemctl enable reinvest.service
systemctl enable reinvest.timer
systemctl start reinvest.timer