There are various platforms and tokens which distributes some sort of reward either via staking or interest to token holders proportionally to their token holdings on a regular basis, what are general approaches for doing this without requiring a lot of gas? I assume that protocols don't simply iterate through all the token holders calculating their fair share since that would cost a lot of gas.

  • Either in batches of transfers, executed from a contract function, or using an encoded Merkle-Tree deployment, where all the data is encoded at constructions, and each user can claim his reward (i.e., each user pays for the gas). – goodvibration Jun 25 '20 at 18:28

Your Answer

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

Browse other questions tagged or ask your own question.