Current implementation of isValidSignatureNow
will be broken due to EIP7377
#71
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Lines of code
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/main/src/UniStaker.sol#L803-L809
Vulnerability details
Preface
It's important to note that these two areas were important for us participants to explore, as per README.md:
This is important to keep in mind for our report.
Description
Inside
UniStaker.sol
, the_revertIfSignatureIsNotValidNow
function gets invoked in different places:Inside of
_revertIfSignatureIsNotValidNow
, theisValidSignatureNow
function is called:However, at the moment of writing, there is a problem with this function which, in the light of these contracts being immutable, will pose a problem due to network upgrades.
When EIP7377 gets implemented, deployers will have a private key for a contract because it would be possible to deploy code at its address. The current implementation of
isValidSignatureNow
assumes that every contract address interacting with the function has no known private key.This issue has been notified here by an OpenZeppelin Engineer and a current mitigation has been proposed. Due to the fact that the Sponsor was interested in findings regarding changes in network conditions and bugs caused by AA, we are submitting this report.
Tools Used
Manual Review
Recommended Mitigation Steps
Use the recommendation by one of the Openzeppelin Engineers:
Assessed type
Other
The text was updated successfully, but these errors were encountered: