A smart contract function intended for distributing rewards iterates through a dynamically-sized array of recipient addresses, sending funds to each one. As the number of recipients grows, transactions calling this function begin to consistently fail. What is the MOST likely cause of this failure?
-
A
A reentrancy vulnerability in the fund transfer logic.
-
B
An integer underflow when calculating the remaining contract balance.
-
C
The transaction's cumulative gas cost exceeds the block gas limit.
-
D
Incorrect access control allowing non-recipients to be added to the array.