Closed sherlock-admin2 closed 9 months ago
bareli
medium
Wrong implementation of chainid.
uint256 chainId; assembly { chainId := chainid() }
it is the wrong implementation of DOMAIN_SEPARATOR.
https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSP.sol#L83
Manual Review
chainId := chain.chainid()
Invalid, no issue here, implementation is correct
bareli
medium
Wrong implementation of chainid
Summary
Wrong implementation of chainid.
Vulnerability Detail
uint256 chainId; assembly { chainId := chainid() }
Impact
it is the wrong implementation of DOMAIN_SEPARATOR.
Code Snippet
https://github.com/sherlock-audit/2023-12-dodo-gsp/blob/main/dodo-gassaving-pool/contracts/GasSavingPool/impl/GSP.sol#L83
Tool used
Manual Review
Recommendation
chainId := chain.chainid()