RioLRT::clock and RioLRT::CLOCK_MODE should be overriding the IERC6372::clock and IERC6372::CLOCK_MODE from OpenZeppelingUpgradableContracts but both functions (IERC6372::clock and IERC6372::CLOCK_MODE) miss the virtual keyword
Vulnerability Detail
The RioLRT::clock and RioLRT::CLOCK_MODE wont be able to override the functions from ERC6372 standard
Impact
The RioLRT::clock and RioLRT::CLOCK_MODE wont update the IERC6372::clock and IERC6372::CLOCK_MODE functions because of the missing keyword
interface IERC6372 {
/**
* @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
*/
function clock() external view returns (uint48);
/**
* @dev Description of the clock
*/
// solhint-disable-next-line func-name-mixedcase
function CLOCK_MODE() external view returns (string memory);
}
KiroBrejka
medium
[M-3] - Incorrect function overriding
Summary
RioLRT::clock
andRioLRT::CLOCK_MODE
should be overriding theIERC6372::clock
andIERC6372::CLOCK_MODE
fromOpenZeppelingUpgradableContracts
but both functions (IERC6372::clock
andIERC6372::CLOCK_MODE
) miss the virtual keywordVulnerability Detail
The
RioLRT::clock
andRioLRT::CLOCK_MODE
wont be able to override the functions fromERC6372
standardImpact
The
RioLRT::clock
andRioLRT::CLOCK_MODE
wont update theIERC6372::clock
andIERC6372::CLOCK_MODE
functions because of the missing keywordCode Snippet
RioLRT
functions: https://github.com/sherlock-audit/2024-02-rio-network-core-protocol/blob/main/rio-sherlock-audit/contracts/restaking/RioLRT.sol#L80-L87IERC6372
functions:Tool used
Manual Review
Recommendation
Put the
virtual
keyword in theIERC6372
functions