Let's say within a specific smart contract, that deals with updating tokens values (due to inflation) on an exchange, the main way of consistently updating is utilizing a preset multiplier called in various methods. I've been toying with how I could go about having the inflationary values updated on a per block basis and ridding myself of the need for the multiplier all together. What would be the best way to implement something like this?
1 Answer
You can't reliably have something executed on a per-block basis. You should always have logic be passive, meaning in your case, the calculation would be done when a transaction needs to depend on the calculation.