An unneccessery declare of varriable in function generateNewTokenId(uint256 points) internal view returns (uint256 tokenId_) , cause to gas waste for user.
This is invalid as this does not waste any gas, and was done to conform to function prototype standards/style to always have named outputs. The return variable already exists, it costs nothing to give it a name.
Handle
certora
Vulnerability details
Impact
An unneccessery declare of varriable in function generateNewTokenId(uint256 points) internal view returns (uint256 tokenId_) , cause to gas waste for user.
Proof of Concept
https://github.com/XDeFi-tech/xdefi-distribution/blob/master/contracts/XDEFIDistribution.sol#L240
Tools Used
vscode
Recommended Mitigation Steps
remove decleration of the varriable uint256 tokenId_