Block timestamp is typecasted differently in different parts of the code leading to inconsistency and potentially bricking the system due to interoperability issues with different components typecasting it differently
Vulnerability Detail
RioLRT.sol
function clock() public view override returns (uint48) {
return uint48(block.timestamp);
}
0xumarkhatab
medium
M-6 Discrepencies in block.timestamp typecasting
Summary
Block timestamp is typecasted differently in different parts of the code leading to inconsistency and potentially bricking the system due to interoperability issues with different components typecasting it differently
Vulnerability Detail
RioLRT.sol
RioLRT#rebalance()
RioToken.sol
RioDeployer.sol
Impact
inconsistency and potentially bricking the system due to interoperability issues with different components
Code Snippet
Adding one of the lines for reference https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/main/rio-sherlock-audit/contracts/restaking/RioLRTCoordinator.sol#L148
Tool used
Manual Review
Recommendation
Consider having a uniform typecasting, like uint48 in all the places