dettachFromManagedNFT
might revert and temporarily prevent users from detaching in certain situation
#5
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
edited-by-warden
M-05
🤖_primary
AI based primary recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2024-09-fenix-finance/blob/main/contracts/core/VoterUpgradeableV2.sol#L564
Vulnerability details
Impact
Users' veNFT might be temporarily undetachable, preventing users from performing action on their own veNFT.
Proof-of-Concept
When users invoke
dettachFromManagedNFT
to get their veNFT back from ManagedNFT,_poke
is called at the end of the function to update voting power across gauges voted by this ManagedNFT._poke
loads a list of pools and weights voted by ManagedNFT then recast votes again to the same set of pools and weights via calling into_vote
.However,
_vote
reverts when one of the pool/gauge has already been killed.Now consider this situation:
_poke
will attempt to recast the vote on gaugeB.As a result, users' veNFT might be temporarily undetachable when the described scenario happens.
Recommended Mitigations
Users are expected to only include active pools in normal
vote
flow.If one of the pool is inactive, we can safely set its weight to zero and skip over it (gracefully ignore it).
Assessed type
DoS
The text was updated successfully, but these errors were encountered: