A future Ethereum upgrade to introduce quantum-resistant signatures and hashes could break core assumptions in UniStaker around encoding and validation.
Affected Logic:
The primary risk vector is signature validation encoding, as used here: stakeOnBehalf
If and when Ethereum upgrades to a post-quantum signature scheme like BLISS or Dilithium, the ecrecover style validation and EIP712 digest domain separation would fail. stakeOnBehalf and all signature flows break.
Likelihood:
Ethereum has indicated intent to upgrade to quantum-resistant cryptography in the next 5-10 years. Thus the breakage risks are high.
Effects:
Breaking signature validation would block depositors from taking permitted actions through the staking contract, preventing value access and harming liquidity.
Proof of Concept
A future Ethereum upgrade to post-quantum signatures would invalidate UniStaker's signature verification, blocking depositors from permitted actions. Unable to access funds, stakers would flee and liquidity would vanish.
Ethereum announces upgrade to BLISS signatures in 18 months
UniStaker continues using SECP256k1 and EIP-712 encoding
Lines of code
https://github.com/code-423n4/2024-02-uniswap-foundation/blob/5298812a129f942555466ebaa6ea9a2af4be0ccc/src/UniStaker.sol#L315-L334
Vulnerability details
Impact
A future Ethereum upgrade to introduce quantum-resistant signatures and hashes could break core assumptions in UniStaker around encoding and validation.
Affected Logic:
The primary risk vector is signature validation encoding, as used here: stakeOnBehalf
Failure Conditions:
If and when Ethereum upgrades to a post-quantum signature scheme like BLISS or Dilithium, the
ecrecover
style validation andEIP712
digest domain separation would fail.stakeOnBehalf
and all signature flows break.Likelihood:
Ethereum has indicated intent to upgrade to quantum-resistant cryptography in the next 5-10 years. Thus the breakage risks are high.
Effects:
Breaking signature validation would block depositors from taking permitted actions through the staking contract, preventing value access and harming liquidity.
Proof of Concept
A future Ethereum upgrade to post-quantum signatures would invalidate UniStaker's signature verification, blocking depositors from permitted actions. Unable to access funds, stakers would flee and liquidity would vanish.
stakeOnBehalf
and all signature flows now revertTechnical
The signature validation in
stakeOnBehalf
relies on cryptographic assumptions:A move to quantum-resistant signatures would break these encoding and validation steps.
Tools Used
VS
Recommended Mitigation Steps
Isolate signature validation into a versioned contract that can be upgraded if crypto primitives change. Add support for multiple schemes.
This would future-proof UniStaker against planned cryptographic upgrades.
Assessed type
en/de-code