I want to distribute a fee from every transaction to a mapping(address=>uint) of 3000 addresses, evenly.
Now, that is an issue because the function will run out of gas, so I've heard, that instead of a push method, a pull method should be able to pull it off.
So instead, pool all fees together under one single uint and then let each of every 3k address pull their own share.
Now that brings new issues because the pool uint is forever increasing and decreasing (when people take their share out and new incoming fees from transactions) and how can I control one who may only take their share once but still continuously & evenly distributed?
Some direction here would be greatly appreciated on how to solve those distribution issues because my math is far from the strongest asset I possess.