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 30, 2018 in Blockchain by Perry
• 17,100 points
675 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 30, 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 aryya
• 7,450 points
484 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
1,705 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,237 views
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
• 69,210 points
1,253 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 1,364 views
+15 votes
5 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP