Auto distribute 2% fees of transactions to all holders

Hello!
Im creating a token with OpenZepellin contracts (erc20) and i already created a burn function for transactions, but now im struggling with making an auto distribution of tokens to all holders when a wallet makes a transaction (2% fee) like safemoon does.

Is this possible? How?

Thanks!

Safemoon uses Reflective Finance fee algorithm. So you can copy-paste it. Just read the source to understand the mechanism

Is this the source code you are talking about?

In what part of it is this system?

Thanks.

Check this topic

1 Like

Oh i see, well, i didnt understand too, i suppose it should be a for loop for all the wallets with a minimum balance and then add the money? Its strange…