Open code423n4 opened 3 years ago
Any function not used internally is best set to external
Here's a neat SO discussion that shows some of the gas math: https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices
The sponsor has applied the recommendation
Handle
loop
Vulnerability details
The
withdraw
function inIdentityFactory.sol
is declared as public but can be external since it is not used internally.Impact
Saves some gas in case it ever needs to be called.
Proof of Concept
https://github.com/code-423n4/2021-10-ambire/blob/main/contracts/IdentityFactory.sol#L52