code-423n4 / 2021-11-vader-findings

0 stars 0 forks source link

Check that all transfers don't result in violation of max supply is unnecessary #220

Closed code423n4 closed 2 years ago

code423n4 commented 3 years ago

Handle

TomFrench

Vulnerability details

Impact

Gas costs

Proof of Concept

On every transfer of VADER, it is checked whether the transfer is from the zero address and if so that the transfer satisfies the max supply condition.

https://github.com/code-423n4/2021-11-vader/blob/607d2b9e253d59c782e921bfc2951184d3f65825/contracts/tokens/Vader.sol#L228-L244

This is only relevant for when minting tokens so this check can be moved to the createEmission function to reduce costs of transfering tokens.

Recommended Mitigation Steps

Listed above.