code-423n4 / 2021-11-streaming-findings

0 stars 0 forks source link

Assigned operations to constant variables #173

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

pauliax

Vulnerability details

Impact

Assigned operations to constant variables are re-evaluated every time.

  bytes32 public constant PERMIT_TYPEHASH =
    keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

See https://github.com/ethereum/solidity/issues/9232

Change from 'constant' to 'immutable'.

0xean commented 2 years ago

dupe of #231