0

The SafeMoon (and copycats) doing the rounds on BSC right now have a mechanism to distribute additional tokens to token holders over time.

I'm curious as to how this works. Presumably having it in the token contract every transaction would run up big gas fees, and I can't see any mechanism in the contract for doing so.

Here's the contract - https://tokensniffer.com/contract/0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3

I'm not sure if I'm missing something obvious or there's some other means of distro? Can anyone advise?

Thanks

1

1 Answer 1

1

As I see it, there are three alternatives:

  1. Really mint more tokens for each token holder. This is very costly and doesn't scale.

  2. Do some magic in the balanceOf function which calculates the holdings based on elapsed time. Remember that this function can do whatever you want - nothing dictates that it has to read the balance directly from a balance mapping.

  3. Burn tokens from the total supply. This is probably the easiest and cheapest way. As tokens get burned, the value of remaining tokens increases, and therefore the tokens the token holders have, become more valuable. Just need to figure out where to burn the tokens from; perhaps there is some initial stash reserved for this.

0

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.