code-423n4 / 2021-10-ambire-findings

0 stars 0 forks source link

Assignment Of Variable To Default (Identity.sol) #17

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

ye0lde

Vulnerability details

Impact

A variable is being assigned its default value which is unnecessary. Removing the assignment will save gas when deploying.

Proof of Concept

https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/Identity.sol#L9

Tools Used

Visual Studio Code, Remix

Recommended Mitigation Steps

Remove the assignment.

Ivshti commented 2 years ago

resolved here: https://github.com/AmbireTech/adex-protocol-eth/commit/a21a110050bc41bfee80dd63b72205ad40b71e4a

GalloDaSballo commented 2 years ago

Removing the assignment will indeed reduce deployment gas cost

The sponsor has applied the improvement