The VotingEscrowUpgradeable.checkpoint() function will call the internal _checkpoint() function which ultimately fills the
point history and potentially updates the epoch state variable.
function checkpoint() external {
_checkpoint(0, LockedBalance(0, 0), LockedBalance(0, 0));
}
function _checkpoint(uint _tokenId, LockedBalance memory old_locked, LockedBalance memory new_locked) internal {
. . . some code
}
Therefore, it is recommended to add the nonReentrant modifier to the VotingEscrowUpgradeable.checkpoint() function
Recommendations\
- function checkpoint() external {
+ function checkpoint() external nonReentrant {
_checkpoint(0, LockedBalance(0, 0), LockedBalance(0, 0));
}
Reference:
This is referenced from this issue found in Velodrome audit at spearbit
Github username: @0xRizwan Twitter username: 0xRizwann Submission hash (on-chain): 0xe6da78ec390d7752625af1732d9b3e8e8d2677a1a8b1a77d1e87ba137342af1d Severity: low
Description: Description\
The
VotingEscrowUpgradeable.checkpoint()
function will call the internal _checkpoint() function which ultimately fills the point history and potentially updates the epoch state variable.Therefore, it is recommended to add the
nonReentrant
modifier to theVotingEscrowUpgradeable.checkpoint()
functionRecommendations\
Reference:
This is referenced from this issue found in Velodrome audit at spearbit