Are there are any design patterns or gas efficient methods of mass updating user balances (for ERC20 tokens)?
For instance, say I wanted to run a casino where, after Block number X, all of the accounts such that Hash(Account address + hash of block number X) is even get one token added to their balance and if the value is odd, one token is deducted from their balance.
Are there any good methods out there for choregraphing such a process? The obvious way is to send a transaction after that block which updates all the balances, yet as the number of accounts becomes large, such a function call is very expensive. Any ideas? Thanks