51771 sc low unsafe downcast of uint256 to uint8 will lead to silent overflow
Description
Brief/Intro
function determineReward(
uint256 randomness,
uint256 streakForReward
) internal view returns (string memory, uint256) {
uint256 probability = randomness % 1_000_000; // Normalize VRF range to 1M
// Determine the current week in the 12-week campaign
uint256 daysSinceStart = (block.timestamp - campaignStartDate) / 1 days;
uint8 weekNumber = uint8(getCurrentWeek());
uint8 dayOfWeek = uint8(daysSinceStart % 7);Vulnerability Details
Impact Details
References
Proof of Concept
Previous52849 sc high claimers who claim after slash inactive updaterewardpertokenforvalidator which advances validatorlastupdatetimes to be more than slashtimestamp will lose rewards for a segmentNext51992 sc high dust accumulation in arctoken during yield distribution
Was this helpful?