40,000 USDC
View results
Submission Details
Severity: gas

Mark functions as payable(with care)

Summary

You can mark public or external functions as payable to save gas. Functions that are not payable have additional logic to check if there was a value sent with a call, however, making a function payable eliminates this check. This optimization should be carefully considered due to potentially unwanted behavior when a function does not need to accept ether.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.