hardStudy question · answer published in Blockchain interview questions, so no pointssecuritygasdesign-patterns
Paying everyone in a loop
A contract pays rewards by looping over an array of all users and sending ETH to each in one transaction. As users grow, what breaks and what is the better design?
Discussion 0
Join free to post in the discussion.
Related questions
- What gas measuresBlockchain Developer
- storage, memory, calldataBlockchain Developer
- Calculating a transaction feeBlockchain Developer
- Do view functions cost gasBlockchain Developer
- Spot the reentrancy bugBlockchain Developer
- Using tx.origin for authBlockchain Developer
- Packing storage variablesBlockchain Developer
- Custom errorsBlockchain Developer