0

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?

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.