sherlock-audit / 2023-12-dodo-gsp-judging

6 stars 5 forks source link

bareli - Wrong implementation of chainid #123

Closed sherlock-admin2 closed 9 months ago

sherlock-admin2 commented 9 months ago

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()

nevillehuang commented 9 months ago

Invalid, no issue here, implementation is correct