You let a dapp do this for you and in this way you maximize the apr received We first need to define the time limit and the compounding period. For the cosmos ecosystem we can use restake app built by eco stake
It’s designed to automatically reinvest your rewards—think of them as the interest you earn from lending or staking your crypto—back into the same investment This way we keep growing our stake given the generated compounded rewards on such staked amount This process, known as compounding, helps your earnings grow faster over time without you having to lift a finger.
We can write a script helping us to claim rewards and delegating the rewarded tokens back to the validator of choice