31519 - [SC - Low] Lack of revert statement in Votersolpoke result...
Description
Brief/Intro
Vulnerability Details
function poke(uint256 _tokenId) public {
// Previous boost will be taken into account with weights being pulled from the votes mapping
uint256 _boost = 0;
if (msg.sender != admin) {
require(IVotingEscrow(veALCX).isApprovedOrOwner(msg.sender, _tokenId), "not approved or owner");
}
address[] memory _poolVote = poolVote[_tokenId];
@> uint256 _poolCnt = _poolVote.length; //Ideally should revert if 0
uint256[] memory _weights = new uint256[](_poolCnt);
for (uint256 i = 0; i < _poolCnt; i++) {
_weights[i] = votes[_tokenId][_poolVote[i]];
}
_vote(_tokenId, _poolVote, _weights, _boost);
}Impact Details
Recommendation / Suggestion
References
Proof of Concept
Previous31514 - [SC - Medium] Malicious users can cause pokeTokens to revertNext31520 - [SC - Critical] Incorrect accounting of totalVoting leads to pe...
Last updated
Was this helpful?