code-423n4 / 2021-09-wildcredit-findings

0 stars 0 forks source link

Declare the value when the variable is created #6

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

jah

Vulnerability details

Impact

Declare the value of name and symbol variable when the variable is created as it is WILD-LP and remove the declaration from the constructor to save gas

Proof of Concept

https://github.com/code-423n4/2021-09-wildcredit/blob/edfc97a8b75bb290a7f7f61cda62d586ed42c73e/contracts/LPTokenMaster.sol#L23-L24

Tools Used

manual analysis

Recommended Mitigation Steps

string public name = "WILD-LP" string public symbol = "WILD-LP"