How to issue regular payouts to multiple wallets?

0 votes
I'm trying to create a contract that will dish out regular inflation to all holders of the token. Every x period, it needs to scan the addresses and calculate their inflation, minting new tokens and adding it to their total.

What is the most cost efficient way to do this? Is it cheapest to iterate over the map and update each address, or better to calculate all values in memory and replace the map? Perhaps there is a better way I'm not thinking of.

Not sure how big the map could get, but cost efficiency is key here.
Oct 29, 2018 in Blockchain by Perry
• 17,020 points
24 views

1 answer to this question.

0 votes
The cheapest way to do this is to have a smart contract function that allows a wallet holder to "claim" their inflation payment. e.g. instead of iterating over every address, you let the wallet holders to do the inflation calculation just for their address.

The cost to you is 0, just have to ensure the smart contract logic is correct
answered Oct 29, 2018 by Christine
• 15,790 points

Related Questions In Blockchain

0 votes
1 answer

How to make my Dapp work on regular browsers?

There are ethereum supporting browsers like Metamask, ...READ MORE

answered Jun 20, 2018 in Blockchain by ariaholic
• 7,340 points
38 views
0 votes
2 answers
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
138 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 67,380 points
76 views
0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 93 views
+15 votes
5 answers