Hey!
I've an ERC20 token that implements RFI (=fee on each tx that gets distributed among all holders).
My problem is the following:
The voting power only updates when there is a transfer/delegation between address A and address B, but it doesn't update all other addresses. Let me explain.
With RFI, a part of the tx amount (from A->B) gets taken as fee and divided to all addresses that holds the token according to how many they hold.
Let's take an example:
Let TOK be our token.
Let the RFI fee be 10%.
Let there be a total supply of 1000, with holder A: 500, B:100, C:400
All 3 addresses already delegates to themselves, Voting power is for A,B,C is 500, 100, 400 respectively.
A sends 100TOK to B, B only receives 90TOK due to the RFI fee.
Updated balances:
A: ~ 404
B: ~ 192
C: 404
Voting power is updated for A and B only:
A: 400
B: 200
C: 400
You get the issue xd.
How can I update the voting power on each account?