0

So, I've seen the code of this token: https://bscscan.com/address/0xa5360c2070faecfc231fd6bd743fe88382f2991d#code

They charge a 10% fee for each tx, 5% of those go to all the people that hold that coin.

I dont understand how they're doing it if there not looping through all the available wallets?

How can that be accomplished without looping which would be very expensive.

0

You can write a custom ERC-20 implementation that charges sender or receiver for the transaction. However this logic is incompatible with most of the exchanges and this kind of token cannot be in serious use.

3
  • Hey thanks, I know how to rest fees from the sender or receiver. my question is, how could I split those between all the wallets? My only idea is looping through all addresses and adding the fee that corresponds to each wallet, but that is wrong. Actually, this token is being exchanged on descentralized exchanges, like pancakeswap, etc.
    – redigaffi
    Apr 20 at 16:08
  • Yes you can split the fees many ways. Apr 21 at 7:48
  • Could you tell me an example please? I dont want to iterate over all the addresses which seems wrong.
    – redigaffi
    Apr 21 at 14:48

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.