Auto distribute 2% fees of transactions to all holders

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?


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?


Check this topic

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…

Hi! I’ve created a discord server for mutual help on the RFI smart contract works: