Hi, I have to distribute reward after every 10 block mined, initial reward started at 21000 and decay rate is 0.2!
I think my logic is failing where I'm doing multiply operation in distrbutionAmount. Can anybody think of it where I went wrong? if you want I can give my math as well. Rescue me frowning
if (block.number - checkpoint >= 10) {
            uint256 rewardAfterInterval =
                (block.number - checkpoint).div(10);
            uint256 denominator = 10**(rewardAfterInterval - 1);
            uint256 distributionAmount =
                (21000.mul(2)**(rewardAfterInterval - 1)).div(
                    denominator
                );
}
Basically I want to know how can I code (reward*(A^b))/c ?
 Mar 26, 2021, 3:26 PM
  21000.mul(2)**() => 21000.mul(2**)
 Mar 26, 2021, 3:44 PM
  I just figured it out.. thanks man!
 Mar 26, 2021, 3:44 PM
  Double check. Just my guess
 Mar 26, 2021, 3:46 PM