Skip to content

Instantly share code, notes, and snippets.

View oliverste's full-sized avatar

Oliver Stellbrink oliverste

View GitHub Profile
@apetresc
apetresc / redelegate-cro.sh
Last active March 28, 2023 05:44
A script to automatically claim Crypto.org CRO staking rewards and re-stake them
#!/bin/bash -e
# redelegate-cro.sh is a script that automatically claims all your delegation
# rewards (across any number of validators) in a single transaction (assuming a
# minimum reward threshold is met, to avoid spurious transactions). The rewards
# are then automatically redelegated to the provided validator address, leaving
# behind at least a 0.005 CRO buffer to ensure there is always enough for
# regular transaction fees.
#
# The idea is that it is safe to run this script on a fixed cron schedule and