0

I'm trying to create a dividend contract that contains a balance of token A which should be divided among holders of token B in proportion to what they have. but every solution I run into seems to require users to "claim" the dividends by initiating a transaction. is there any way to do this the same way reflection tokens get distributed?

1 Answer 1

0
  1. It depends if your token A balance of the dividend contract is changed over time, and it's needed to save each change with the token B holders portions. Without this information, it's hard to understand your task.

  2. But in short, any change(state saving/token transfer)in blockchain requires a transaction to be called. So in any case there is a transaction needed for some step.

  3. And if you need to transfer token A to holders of B, you can implement it either the way so each holder calls "claim" OR you call transfer yourself.

3
  • how do reflection tokens manage to do it? Commented Nov 20, 2022 at 18:31
  • It goes beyond the default parameters of ERC20. So each is implemented in a different way. Please, provide me with example Commented Nov 21, 2022 at 13:38
  • in reflection tokens when someone buys and sells the coin and the fee has to be distributed every one of the holders' addresses is instantly update with their new amount balance. Here's an example etherscan.io/address/… Commented Nov 21, 2022 at 17:46

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.