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

1 stars 0 forks source link

state variable that are not updated throughout the contract they should be declared as constant #44

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

JMukesh

Vulnerability details

Impact

state variable that are not updated throughout the contract they should be declared as constant to save gas

Proof of Concept

https://github.com/althea-net/cosmos-gravity-bridge/blob/92d0e12cea813305e6472851beeb80bd2eaf858d/solidity/contracts/CosmosToken.sol#L5

Tools Used

manual review

Recommended Mitigation Steps

declare it as constant

jkilpatr commented 2 years ago

Duplicate (although not exactly) of #48 but with less details.