31076 - [SC - Critical] checkpointTotalSupply can checkpoint before a t...
Description
Brief/Intro
Vulnerability Details
function _checkpointTotalSupply() internal {
address ve = votingEscrow;
uint256 t = timeCursor;
uint256 roundedTimestamp = (block.timestamp / WEEK) * WEEK;
IVotingEscrow(ve).checkpoint();
for (uint256 i = 0; i < 20; i++) {
if (t > roundedTimestamp) {
break;
} else {
veSupply[t] = IVotingEscrow(ve).totalSupplyAtT(t);
}
t += WEEK;
}
timeCursor = t;
}Impact Details
References
Proof of Concept
Previous31071 - [SC - Critical] User can steal bribes and prevent other users f...Next31077 - [SC - Critical] RevenueHandler counts unclaimed tokens as new r...
Last updated
Was this helpful?