31087 - [SC - Low] Colition between approve and _isApprovedOrOwner...
Last updated
Was this helpful?
Last updated
Was this helpful?
Submitted on May 12th 2024 at 14:40:44 UTC by @Ch301 for
Report ID: #31087
Report type: Smart Contract
Report severity: Low
Target: https://github.com/alchemix-finance/alchemix-v2-dao/blob/main/src/VotingEscrow.sol
Impacts:
Contract fails to deliver promised returns, but doesn't lose value
Users with approve()
can't trigger merge()
function.
When a user (has the approve) triggers VotingEscrow.sol#merge()
the _burn()
function will sub-call to approve()
However, the approve()
will revert if: msg.sender
is not the owner and (ownerToOperators[owner])[msg.sender]
returns false.
The owner sets both the NFTs approve()
to the user. however, he cannot call merge()
successfully.
non
Foundry PoC:
Please copy the following POC in VotingEscrow.t.sol
Test result: