Proud Tartan Lynx
Medium
In GovernanceStakerOnBehalf.sol
, the signature must include the ChainId.
N/A
N/A
N/A
If someone has a depositId on defferent chain, their signature could be valid on the other chain. In particular, the deposit's claimer on one chain, which is using larger nonce, can claim the deposit's from the other chain.
GovernanceStakerOnBehalf.sol
180: function alterClaimerOnBehalf(
DepositIdentifier _depositId,
address _newClaimer,
address _depositor,
uint256 _deadline,
bytes memory _signature
) external virtual {
Deposit storage deposit = deposits[_depositId];
_revertIfNotDepositOwner(deposit, _depositor);
_revertIfPastDeadline(_deadline);
_revertIfSignatureIsNotValidNow(
_depositor,
_hashTypedDataV4(
keccak256(
abi.encode(
ALTER_CLAIMER_TYPEHASH,
_depositId,
_newClaimer,
_depositor,
_useNonce(_depositor),
_deadline
)
)
),
_signature
);
_alterClaimer(deposit, _depositId, _newClaimer);
}
The Signature must contain the ChainId.