If shares[1]
, shares[2]
, or shares[3]
are zero, the function still executes token burns and transfers unnecessarily.
function _processDistributions(uint256 totalFees, uint256[4] memory shares) internal {
uint256 contractBalance = raacToken.balanceOf(address(this));
if (contractBalance < totalFees) revert InsufficientBalance();
Instead of checking if (shares[x] > 0)
, add an explicit require at the start:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.