Voting power inflation via Merge #2
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
🤖_02_group
AI based duplicate group recommendation
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2024-09-fenix-finance/blob/main/contracts/core/VotingEscrowUpgradeableV2.sol#L180
Vulnerability details
Where is the bug
The bug is in VotingEscrowUpgradeableV2.merge():
Impact
Allows for users to artificially inflate, their voting power through the NFT merging process. The issue occurs because the
merge
function incorrectly calculates the resulting voting power when combining two NFTs.By exploiting the bug, an attacker can:
Key consequences:
Proof of Concept
How it happens:
merge
function combines the locked token amounts from both NFTsHere is poc to show bug, put in VoterV2.test.ts and run using
npx hardhat test test/core/VoterV2/VoterV2.test.ts
:Test output:
As shown, the final power is more than
4
times the sum of the initial powers. This shows a critical bug in the merge function that allows for artificial inflation of voting power.Recommended Mitigation Steps
Assessed type
Context
The text was updated successfully, but these errors were encountered: