2

I want to reduce the balance of everyone say by 5% after say every 10 million blocks. It's not possible to loop over all balances, as that will be inefficient. AMPL solves it with using Gons

tokens= gonsBalance[account]/gonsPerToken

I am using balance pallet. What is the best way of doing using balance pallet? Will I have to fork it and modify it or it can be done by calling some functions in it.

1 Answer 1

2

The balances pallet does not have a feature like this, nor do I think it should introduce this.

So yes, I think the best thing would be for you to write or fork your own solution for this kind of behavior.

1
  • 1
    It will be a good feature add that changes everyone's balances in the hook Commented Jun 16, 2022 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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