code-423n4 / 2022-01-livepeer-findings

0 stars 0 forks source link

Use `immutable` for `AccessControl`'s role declarations #209

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

byterocket

Vulnerability details

Impact

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

Therefore, refactor following AccessControl roles from being constant to immutable:

arbitrum-lpt-bridge:
  - L2/gateway/L2Migrator
    * GOVERNOR_ROLE
  - ControlledGateway
    * GOVERNOR_ROLE
  - L1/gateway/L1Migrator
    * GOVERNOR_ROLE
  - token/LivepeerToken
    * MINTER_ROLE
    * BURNER_ROLE
yondonfu commented 2 years ago

Duplicate of https://github.com/code-423n4/2022-01-livepeer-findings/issues/172