Closed code423n4 closed 2 years ago
TomFrench
Gas costs
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.
createEmission
Listed above.
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.