Users should not be allowed to increase the voting power of a locked NFT by calling the depositFor function as
locked NFTs are not supposed to vote. Thus, any increase in the voting balance of locked NFTs will not increase
the gauge weight, and as a consequence, the influence and yield of the deposited FLOW will be diminished
Impact
Users should not be allowed to increase the voting power of a locked NFT by calling the depositFor function as
locked NFTs are not supposed to vote
pseudoArtist
Medium
depositFor function should be restricted to approved NFT types.
Summary
As the title suggests,
depositFor
function should be restricted to approved NFT types.Vulnerability Detail
The
depositFor
function was found to accept NFT of all types (normal, locked, managed) without restriction.Users should not be allowed to increase the voting power of a locked NFT by calling the depositFor function as locked NFTs are not supposed to vote. Thus, any increase in the voting balance of locked NFTs will not increase the gauge weight, and as a consequence, the influence and yield of the deposited FLOW will be diminished
Impact
Users should not be allowed to increase the voting power of a locked NFT by calling the depositFor function as locked NFTs are not supposed to vote
Code Snippet
https://github.com/sherlock-audit/2024-06-velocimeter-NishithPat/blob/9aef376313ac3d154bf93cba633c7ae33e7e562f/v4-contracts/contracts/VotingEscrow.sol#L826
Tool used
Manual Review
Recommendation
Duplicate of #558