Note: While this is a fact that can be brought to the sponsor's attention for him to make his own choice (and this can save several hundreds of gas in this solution), I would not recommend it, as it could bring new security issues.
Functions marked as payable are 24 gas cheaper than their counterpart (in non-payable functions, Solidity adds an extra check to ensure msg.value is zero).
Handle
Dravee
Vulnerability details
Note: While this is a fact that can be brought to the sponsor's attention for him to make his own choice (and this can save several hundreds of gas in this solution), I would not recommend it, as it could bring new security issues.
Functions marked as
payable
are 24 gas cheaper than their counterpart (in non-payable functions, Solidity adds an extra check to ensure msg.value is zero).