diff --git a/src/Warmup.sol b/src/Warmup.sol index 9238e0f..8071cfd 100644 --- a/src/Warmup.sol +++ b/src/Warmup.sol @@ -53,7 +53,9 @@ contract GhostWarmup is IGhostWarmup { if (msg.sender != STAKING) revert NotStakingContract(); Claim storage info = _warmupInfo[who]; + uint256 mm = mulmod(info.deposit, payout, info.payout); uint256 depositReduction = FullMath.mulDiv(info.deposit, payout, info.payout); + if (mm > 0) depositReduction += 1; info.deposit -= depositReduction; info.payout -= payout;