-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Slither Finding
Detector: reentrancy-balance (HIGH severity)
Introduced by: Slither 0.11.5 (new detector not present in 0.11.3)
File: src/settlement-chain/DistributionManager.sol lines 376-392
Description
Slither's new reentrancy-balance detector flags a potential reentrancy issue in DistributionManager._makeWithdrawableAmount(uint96):
Reentrancy in DistributionManager._makeWithdrawableAmount(uint96) (src/settlement-chain/DistributionManager.sol#376-392):
External call allowing reentrancy:
- available_ += IPayerRegistryLike(payerRegistry).sendExcessToFeeDistributor() (line 383)
Balance read before the call:
- available_ = uint96(IERC20Like(feeToken).balanceOf(address(this))) (line 379)
Possible stale balance used after the call in a condition:
- available_ == 0 (line 388)
- stale variable `available_`
The function reads the fee token balance, then makes an external call to sendExcessToFeeDistributor(), and subsequently uses the pre-call balance value. The detector flags that available_ could be stale after the external call.
Current Mitigation
The reentrancy-balance detector has been added to detectors_to_exclude in slither.config.json to unblock CI. This should be reviewed and either:
- Confirmed as a false positive / acceptable pattern and kept excluded
- Fixed if it represents a real risk, then the exclusion removed
Reference
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status