code-423n4 / 2021-08-gravitybridge-findings

1 stars 0 forks source link

Set state_gravityId and state_powerThreshold variables as immutable in Gravity.sol #2

Closed code423n4 closed 2 years ago

code423n4 commented 3 years ago

Handle

patitonar

Vulnerability details

Impact

Gas improvement when reading the variables

Proof of Concept

https://github.com/althea-net/cosmos-gravity-bridge/blob/92d0e12cea813305e6472851beeb80bd2eaf858d/solidity/contracts/Gravity.sol#L58-L60

Tools Used

Manual review

Recommended Mitigation Steps

bytes32 public immutable state_gravityId; uint256 public immutable state_powerThreshold;

jkilpatr commented 2 years ago

duplicate of #48 #34