31418 - [SC - Critical] the killed gauge collect claim amount
Description
Brief/Intro
Vulnerability Details
function _updateFor(address _gauge) internal {
require(isGauge[_gauge], "invalid gauge");
address _pool = poolForGauge[_gauge];
uint256 _supplied = weights[_pool];
if (_supplied > 0) {
uint256 _supplyIndex = supplyIndex[_gauge];
uint256 _index = index; // get global index0 for accumulated distro
supplyIndex[_gauge] = _index; // update _gauge current position to global position
uint256 _delta = _index - _supplyIndex; // see if there is any difference that need to be accrued
if (_delta > 0) {
uint256 _share = (uint256(_supplied) * _delta) / 1e18; // add accrued difference for each supplied token
claimable[_gauge] += _share;
}
} else {
supplyIndex[_gauge] = index;
}
}
Impact Details
Proof of Concept
Previous31417 - [SC - Insight] Compound claiming transactions will revert if u...Next31420 - [SC - Insight] No array lengths check in VotersolclaimBribes
Last updated
Was this helpful?