## Summary
In `Pot::closePot` integer division of Odd `remainingRewards` with `managerCutPercent = 10` can lead to inaccurate reward distribution
## Vulnerability Details
When `remainingRewards` is an odd number, the operation will result in integer division. In Solidity, integer division truncates any remainder and rounds the result down to the nearest whole number.
Example Scenarios:
1. If `remainingRewards` = 9:
Calculation: 9 / 10 = 0.9.
Result: `managerCut` = 0 (due to truncation).
2. If remainingRewards = 11:
Calculation: 11 / 10 = 1.1.
Result: `managerCut` = 1 (remainder is discarded).
```solidity
function closePot() external onlyOwner {
if (block.timestamp - i_deployedAt < 90 days) {
revert Pot__StillOpenForClaim();
}
if (remainingRewards > 0) {
uint256 managerCut = remainingRewards / managerCutPercent;
i_token.transfer(msg.sender, managerCut);
uint256 claimantCut = (remainingRewards - managerCut) /
i_players.length;
for (uint256 i = 0; i < claimants.length; i++) {
_transferReward(claimants[i], claimantCut);
}
}
```
## Impact
When dividing an odd number of `remainingRewards` by 10, the fractional part will always be discarded. This means:
Any remainder from the division is ignored, resulting in a lower value for `managerCut`.
If the `remainingRewards` is smaller than 10, the `managerCut` will always be 0.
## Tools Used
## Recommendations